generated-configure.sh revision 725:44259699e0b5
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 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.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_JAVA
603JOBS
604MEMORY_SIZE
605NUM_CORES
606ENABLE_INTREE_EC
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611LLVM_LIBS
612LLVM_LDFLAGS
613LLVM_CFLAGS
614LLVM_CONFIG
615LIBFFI_LIBS
616LIBFFI_CFLAGS
617STATIC_CXX_SETTING
618LIBDL
619LIBM
620LIBZIP_CAN_USE_MMAP
621USE_EXTERNAL_LIBZ
622USE_EXTERNAL_LIBGIF
623USE_EXTERNAL_LIBJPEG
624ALSA_LIBS
625ALSA_CFLAGS
626FREETYPE2_LIB_PATH
627USING_SYSTEM_FT_LIB
628FREETYPE2_LIBS
629FREETYPE2_CFLAGS
630CUPS_CFLAGS
631OPENWIN_HOME
632X_EXTRA_LIBS
633X_LIBS
634X_PRE_LIBS
635X_CFLAGS
636XMKMF
637CXXFLAGS_DEBUG_SYMBOLS
638CFLAGS_DEBUG_SYMBOLS
639ZIP_DEBUGINFO_FILES
640ENABLE_DEBUG_SYMBOLS
641COMPILER_SUPPORTS_TARGET_BITS_FLAG
642ZERO_ARCHFLAG
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_VERSION_MIN
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683COMPILER_NAME
684JTREGEXE
685JT_HOME
686LIPO
687ac_ct_OBJDUMP
688OBJDUMP
689ac_ct_OBJCOPY
690OBJCOPY
691MCS
692STRIP
693GNM
694NM
695AS
696CXXCPP
697CPP
698COMPILER_TYPE
699RC_FLAGS
700DUMPBIN
701WINAR
702HOTSPOT_RC
703HOTSPOT_MT
704RC
705MT
706WINLD
707HOTSPOT_LD
708HOTSPOT_CXX
709ARFLAGS
710AR
711LDEXECXX
712LDCXX
713LDEXE
714LD
715ac_ct_OBJC
716OBJCFLAGS
717OBJC
718ac_ct_CXX
719CXXFLAGS
720CXX
721ac_ct_PROPER_COMPILER_CXX
722PROPER_COMPILER_CXX
723POTENTIAL_CXX
724TOOLS_DIR_CXX
725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732ac_ct_PROPER_COMPILER_CC
733PROPER_COMPILER_CC
734POTENTIAL_CC
735TOOLS_DIR_CC
736BUILD_LD
737BUILD_CXX
738BUILD_CC
739MSVCR_DLL
740DXSDK_INCLUDE_PATH
741DXSDK_LIB_PATH
742VS_PATH
743VS_LIB
744VS_INCLUDE
745CYGWIN_LINK
746AR_OUT_OPTION
747LD_OUT_OPTION
748EXE_OUT_OPTION
749CC_OUT_OPTION
750BUILD_HOTSPOT
751HOTSPOT_DIST
752BUILD_OUTPUT
753OVERRIDE_SRC_ROOT
754ADD_SRC_ROOT
755JDK_TOPDIR
756NASHORN_TOPDIR
757HOTSPOT_TOPDIR
758JAXWS_TOPDIR
759JAXP_TOPDIR
760CORBA_TOPDIR
761LANGTOOLS_TOPDIR
762BOOT_JDK_JVMARGS
763JAVAC_FLAGS
764BOOT_JDK_SOURCETARGET
765BOOT_JDK
766BOOT_TOOLSJAR
767BOOT_RTJAR
768JAVA_CHECK
769JAVAC_CHECK
770COOKED_BUILD_NUMBER
771JDK_VERSION
772COPYRIGHT_YEAR
773MACOSX_BUNDLE_ID_BASE
774MACOSX_BUNDLE_NAME_BASE
775COMPANY_NAME
776JDK_RC_PLATFORM_NAME
777PRODUCT_SUFFIX
778PRODUCT_NAME
779LAUNCHER_NAME
780MILESTONE
781JDK_BUILD_NUMBER
782JDK_UPDATE_VERSION
783JDK_MICRO_VERSION
784JDK_MINOR_VERSION
785JDK_MAJOR_VERSION
786USER_RELEASE_SUFFIX
787COMPRESS_JARS
788UNLIMITED_CRYPTO
789CACERTS_FILE
790TEST_IN_BUILD
791BUILD_HEADLESS
792SUPPORT_HEADFUL
793SUPPORT_HEADLESS
794BDEPS_FTP
795BDEPS_UNZIP
796OS_VERSION_MICRO
797OS_VERSION_MINOR
798OS_VERSION_MAJOR
799PKG_CONFIG
800CODESIGN
801XATTR
802TIME
803STAT
804HG
805READELF
806OTOOL
807LDD
808ZIP
809UNZIP
810FIND_DELETE
811MAKE
812CHECK_TOOLSDIR_MAKE
813CHECK_TOOLSDIR_GMAKE
814CHECK_MAKE
815CHECK_GMAKE
816PKGHANDLER
817OUTPUT_ROOT
818CONF_NAME
819SPEC
820BUILD_VARIANT_RELEASE
821DEBUG_CLASSFILES
822FASTDEBUG
823VARIANT
824DEBUG_LEVEL
825MACOSX_UNIVERSAL
826INCLUDE_SA
827JVM_VARIANT_ZEROSHARK
828JVM_VARIANT_ZERO
829JVM_VARIANT_KERNEL
830JVM_VARIANT_MINIMAL1
831JVM_VARIANT_CLIENT
832JVM_VARIANT_SERVER
833JVM_VARIANTS
834JDK_VARIANT
835SET_OPENJDK
836BUILD_LOG_WRAPPER
837BUILD_LOG_PREVIOUS
838BUILD_LOG
839SYS_ROOT
840PATH_SEP
841SRC_ROOT
842ZERO_ARCHDEF
843DEFINE_CROSS_COMPILE_ARCH
844LP64
845OPENJDK_TARGET_OS_API_DIR
846OPENJDK_TARGET_CPU_JLI_CFLAGS
847OPENJDK_TARGET_CPU_OSARCH
848OPENJDK_TARGET_CPU_ISADIR
849OPENJDK_TARGET_CPU_LIBDIR
850OPENJDK_TARGET_CPU_LEGACY_LIB
851OPENJDK_TARGET_CPU_LEGACY
852REQUIRED_OS_VERSION
853REQUIRED_OS_NAME
854COMPILE_TYPE
855OPENJDK_TARGET_CPU_ENDIAN
856OPENJDK_TARGET_CPU_BITS
857OPENJDK_TARGET_CPU_ARCH
858OPENJDK_TARGET_CPU
859OPENJDK_TARGET_OS_API
860OPENJDK_TARGET_OS
861OPENJDK_BUILD_CPU_ENDIAN
862OPENJDK_BUILD_CPU_BITS
863OPENJDK_BUILD_CPU_ARCH
864OPENJDK_BUILD_CPU
865OPENJDK_BUILD_OS_API
866OPENJDK_BUILD_OS
867OPENJDK_BUILD_AUTOCONF_NAME
868OPENJDK_TARGET_AUTOCONF_NAME
869target_os
870target_vendor
871target_cpu
872target
873host_os
874host_vendor
875host_cpu
876host
877build_os
878build_vendor
879build_cpu
880build
881SETFILE
882DF
883READLINK
884CYGPATH
885NAWK
886SED
887FGREP
888EGREP
889GREP
890AWK
891XARGS
892WHICH
893WC
894UNIQ
895UNAME
896TR
897TOUCH
898TEE
899TAR
900TAIL
901SORT
902SH
903RM
904PRINTF
905MV
906MKTEMP
907MKDIR
908LS
909LN
910HEAD
911FIND
912FILE
913EXPR
914ECHO
915DIRNAME
916DIFF
917DATE
918CUT
919CPIO
920CP
921COMM
922CMP
923CHMOD
924CAT
925BASH
926BASENAME
927DATE_WHEN_CONFIGURED
928CONFIGURE_COMMAND_LINE
929CUSTOM_MAKE_DIR
930target_alias
931host_alias
932build_alias
933LIBS
934ECHO_T
935ECHO_N
936ECHO_C
937DEFS
938mandir
939localedir
940libdir
941psdir
942pdfdir
943dvidir
944htmldir
945infodir
946docdir
947oldincludedir
948includedir
949localstatedir
950sharedstatedir
951sysconfdir
952datadir
953datarootdir
954libexecdir
955sbindir
956bindir
957program_transform_name
958prefix
959exec_prefix
960PACKAGE_URL
961PACKAGE_BUGREPORT
962PACKAGE_STRING
963PACKAGE_VERSION
964PACKAGE_TARNAME
965PACKAGE_NAME
966PATH_SEPARATOR
967SHELL'
968ac_subst_files=''
969ac_user_opts='
970enable_option_checking
971with_custom_make_dir
972with_target_bits
973with_sys_root
974with_tools_dir
975with_devkit
976enable_openjdk_only
977with_jdk_variant
978with_jvm_variants
979enable_debug
980with_debug_level
981with_conf_name
982with_builddeps_conf
983with_builddeps_server
984with_builddeps_dir
985with_builddeps_group
986enable_headful
987enable_hotspot_test_in_build
988with_cacerts_file
989enable_unlimited_crypto
990with_milestone
991with_update_version
992with_build_number
993with_user_release_suffix
994with_boot_jdk
995with_boot_jdk_jvmargs
996with_add_source_root
997with_override_source_root
998with_adds_and_overrides
999with_override_langtools
1000with_override_corba
1001with_override_jaxp
1002with_override_jaxws
1003with_override_hotspot
1004with_override_jdk
1005with_import_hotspot
1006with_msvcr_dll
1007with_dxsdk
1008with_dxsdk_lib
1009with_dxsdk_include
1010with_jtreg
1011with_extra_cflags
1012with_extra_cxxflags
1013with_extra_ldflags
1014enable_debug_symbols
1015enable_zip_debug_info
1016enable_macosx_runtime_support
1017with_x
1018with_cups
1019with_cups_include
1020with_freetype
1021with_alsa
1022with_alsa_include
1023with_alsa_lib
1024with_giflib
1025with_zlib
1026with_stdc__lib
1027with_num_cores
1028with_memory_size
1029with_jobs
1030with_sjavac_server_java
1031enable_sjavac
1032enable_precompiled_headers
1033enable_ccache
1034with_ccache_dir
1035'
1036      ac_precious_vars='build_alias
1037host_alias
1038target_alias
1039PKG_CONFIG
1040CC
1041CFLAGS
1042LDFLAGS
1043LIBS
1044CPPFLAGS
1045CXX
1046CXXFLAGS
1047CCC
1048OBJC
1049OBJCFLAGS
1050CPP
1051CXXCPP
1052XMKMF
1053FREETYPE2_CFLAGS
1054FREETYPE2_LIBS
1055ALSA_CFLAGS
1056ALSA_LIBS
1057LIBFFI_CFLAGS
1058LIBFFI_LIBS'
1059
1060
1061# Initialize some variables set by options.
1062ac_init_help=
1063ac_init_version=false
1064ac_unrecognized_opts=
1065ac_unrecognized_sep=
1066# The variables have the same names as the options, with
1067# dashes changed to underlines.
1068cache_file=/dev/null
1069exec_prefix=NONE
1070no_create=
1071no_recursion=
1072prefix=NONE
1073program_prefix=NONE
1074program_suffix=NONE
1075program_transform_name=s,x,x,
1076silent=
1077site=
1078srcdir=
1079verbose=
1080x_includes=NONE
1081x_libraries=NONE
1082
1083# Installation directory options.
1084# These are left unexpanded so users can "make install exec_prefix=/foo"
1085# and all the variables that are supposed to be based on exec_prefix
1086# by default will actually change.
1087# Use braces instead of parens because sh, perl, etc. also accept them.
1088# (The list follows the same order as the GNU Coding Standards.)
1089bindir='${exec_prefix}/bin'
1090sbindir='${exec_prefix}/sbin'
1091libexecdir='${exec_prefix}/libexec'
1092datarootdir='${prefix}/share'
1093datadir='${datarootdir}'
1094sysconfdir='${prefix}/etc'
1095sharedstatedir='${prefix}/com'
1096localstatedir='${prefix}/var'
1097includedir='${prefix}/include'
1098oldincludedir='/usr/include'
1099docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100infodir='${datarootdir}/info'
1101htmldir='${docdir}'
1102dvidir='${docdir}'
1103pdfdir='${docdir}'
1104psdir='${docdir}'
1105libdir='${exec_prefix}/lib'
1106localedir='${datarootdir}/locale'
1107mandir='${datarootdir}/man'
1108
1109ac_prev=
1110ac_dashdash=
1111for ac_option
1112do
1113  # If the previous option needs an argument, assign it.
1114  if test -n "$ac_prev"; then
1115    eval $ac_prev=\$ac_option
1116    ac_prev=
1117    continue
1118  fi
1119
1120  case $ac_option in
1121  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122  *=)   ac_optarg= ;;
1123  *)    ac_optarg=yes ;;
1124  esac
1125
1126  # Accept the important Cygnus configure options, so we can diagnose typos.
1127
1128  case $ac_dashdash$ac_option in
1129  --)
1130    ac_dashdash=yes ;;
1131
1132  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133    ac_prev=bindir ;;
1134  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135    bindir=$ac_optarg ;;
1136
1137  -build | --build | --buil | --bui | --bu)
1138    ac_prev=build_alias ;;
1139  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140    build_alias=$ac_optarg ;;
1141
1142  -cache-file | --cache-file | --cache-fil | --cache-fi \
1143  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144    ac_prev=cache_file ;;
1145  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147    cache_file=$ac_optarg ;;
1148
1149  --config-cache | -C)
1150    cache_file=config.cache ;;
1151
1152  -datadir | --datadir | --datadi | --datad)
1153    ac_prev=datadir ;;
1154  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155    datadir=$ac_optarg ;;
1156
1157  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158  | --dataroo | --dataro | --datar)
1159    ac_prev=datarootdir ;;
1160  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162    datarootdir=$ac_optarg ;;
1163
1164  -disable-* | --disable-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid feature name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"enable_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval enable_$ac_useropt=no ;;
1179
1180  -docdir | --docdir | --docdi | --doc | --do)
1181    ac_prev=docdir ;;
1182  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183    docdir=$ac_optarg ;;
1184
1185  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186    ac_prev=dvidir ;;
1187  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188    dvidir=$ac_optarg ;;
1189
1190  -enable-* | --enable-*)
1191    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192    # Reject names that are not valid shell variable names.
1193    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194      as_fn_error $? "invalid feature name: $ac_useropt"
1195    ac_useropt_orig=$ac_useropt
1196    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197    case $ac_user_opts in
1198      *"
1199"enable_$ac_useropt"
1200"*) ;;
1201      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202	 ac_unrecognized_sep=', ';;
1203    esac
1204    eval enable_$ac_useropt=\$ac_optarg ;;
1205
1206  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208  | --exec | --exe | --ex)
1209    ac_prev=exec_prefix ;;
1210  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212  | --exec=* | --exe=* | --ex=*)
1213    exec_prefix=$ac_optarg ;;
1214
1215  -gas | --gas | --ga | --g)
1216    # Obsolete; use --with-gas.
1217    with_gas=yes ;;
1218
1219  -help | --help | --hel | --he | -h)
1220    ac_init_help=long ;;
1221  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222    ac_init_help=recursive ;;
1223  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224    ac_init_help=short ;;
1225
1226  -host | --host | --hos | --ho)
1227    ac_prev=host_alias ;;
1228  -host=* | --host=* | --hos=* | --ho=*)
1229    host_alias=$ac_optarg ;;
1230
1231  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232    ac_prev=htmldir ;;
1233  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234  | --ht=*)
1235    htmldir=$ac_optarg ;;
1236
1237  -includedir | --includedir | --includedi | --included | --include \
1238  | --includ | --inclu | --incl | --inc)
1239    ac_prev=includedir ;;
1240  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241  | --includ=* | --inclu=* | --incl=* | --inc=*)
1242    includedir=$ac_optarg ;;
1243
1244  -infodir | --infodir | --infodi | --infod | --info | --inf)
1245    ac_prev=infodir ;;
1246  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247    infodir=$ac_optarg ;;
1248
1249  -libdir | --libdir | --libdi | --libd)
1250    ac_prev=libdir ;;
1251  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252    libdir=$ac_optarg ;;
1253
1254  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255  | --libexe | --libex | --libe)
1256    ac_prev=libexecdir ;;
1257  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258  | --libexe=* | --libex=* | --libe=*)
1259    libexecdir=$ac_optarg ;;
1260
1261  -localedir | --localedir | --localedi | --localed | --locale)
1262    ac_prev=localedir ;;
1263  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264    localedir=$ac_optarg ;;
1265
1266  -localstatedir | --localstatedir | --localstatedi | --localstated \
1267  | --localstate | --localstat | --localsta | --localst | --locals)
1268    ac_prev=localstatedir ;;
1269  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271    localstatedir=$ac_optarg ;;
1272
1273  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274    ac_prev=mandir ;;
1275  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276    mandir=$ac_optarg ;;
1277
1278  -nfp | --nfp | --nf)
1279    # Obsolete; use --without-fp.
1280    with_fp=no ;;
1281
1282  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283  | --no-cr | --no-c | -n)
1284    no_create=yes ;;
1285
1286  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288    no_recursion=yes ;;
1289
1290  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292  | --oldin | --oldi | --old | --ol | --o)
1293    ac_prev=oldincludedir ;;
1294  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297    oldincludedir=$ac_optarg ;;
1298
1299  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300    ac_prev=prefix ;;
1301  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302    prefix=$ac_optarg ;;
1303
1304  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305  | --program-pre | --program-pr | --program-p)
1306    ac_prev=program_prefix ;;
1307  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309    program_prefix=$ac_optarg ;;
1310
1311  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312  | --program-suf | --program-su | --program-s)
1313    ac_prev=program_suffix ;;
1314  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316    program_suffix=$ac_optarg ;;
1317
1318  -program-transform-name | --program-transform-name \
1319  | --program-transform-nam | --program-transform-na \
1320  | --program-transform-n | --program-transform- \
1321  | --program-transform | --program-transfor \
1322  | --program-transfo | --program-transf \
1323  | --program-trans | --program-tran \
1324  | --progr-tra | --program-tr | --program-t)
1325    ac_prev=program_transform_name ;;
1326  -program-transform-name=* | --program-transform-name=* \
1327  | --program-transform-nam=* | --program-transform-na=* \
1328  | --program-transform-n=* | --program-transform-=* \
1329  | --program-transform=* | --program-transfor=* \
1330  | --program-transfo=* | --program-transf=* \
1331  | --program-trans=* | --program-tran=* \
1332  | --progr-tra=* | --program-tr=* | --program-t=*)
1333    program_transform_name=$ac_optarg ;;
1334
1335  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336    ac_prev=pdfdir ;;
1337  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338    pdfdir=$ac_optarg ;;
1339
1340  -psdir | --psdir | --psdi | --psd | --ps)
1341    ac_prev=psdir ;;
1342  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343    psdir=$ac_optarg ;;
1344
1345  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346  | -silent | --silent | --silen | --sile | --sil)
1347    silent=yes ;;
1348
1349  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350    ac_prev=sbindir ;;
1351  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352  | --sbi=* | --sb=*)
1353    sbindir=$ac_optarg ;;
1354
1355  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357  | --sharedst | --shareds | --shared | --share | --shar \
1358  | --sha | --sh)
1359    ac_prev=sharedstatedir ;;
1360  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363  | --sha=* | --sh=*)
1364    sharedstatedir=$ac_optarg ;;
1365
1366  -site | --site | --sit)
1367    ac_prev=site ;;
1368  -site=* | --site=* | --sit=*)
1369    site=$ac_optarg ;;
1370
1371  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372    ac_prev=srcdir ;;
1373  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374    srcdir=$ac_optarg ;;
1375
1376  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377  | --syscon | --sysco | --sysc | --sys | --sy)
1378    ac_prev=sysconfdir ;;
1379  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381    sysconfdir=$ac_optarg ;;
1382
1383  -target | --target | --targe | --targ | --tar | --ta | --t)
1384    ac_prev=target_alias ;;
1385  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386    target_alias=$ac_optarg ;;
1387
1388  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389    verbose=yes ;;
1390
1391  -version | --version | --versio | --versi | --vers | -V)
1392    ac_init_version=: ;;
1393
1394  -with-* | --with-*)
1395    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396    # Reject names that are not valid shell variable names.
1397    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398      as_fn_error $? "invalid package name: $ac_useropt"
1399    ac_useropt_orig=$ac_useropt
1400    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401    case $ac_user_opts in
1402      *"
1403"with_$ac_useropt"
1404"*) ;;
1405      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406	 ac_unrecognized_sep=', ';;
1407    esac
1408    eval with_$ac_useropt=\$ac_optarg ;;
1409
1410  -without-* | --without-*)
1411    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412    # Reject names that are not valid shell variable names.
1413    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414      as_fn_error $? "invalid package name: $ac_useropt"
1415    ac_useropt_orig=$ac_useropt
1416    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417    case $ac_user_opts in
1418      *"
1419"with_$ac_useropt"
1420"*) ;;
1421      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422	 ac_unrecognized_sep=', ';;
1423    esac
1424    eval with_$ac_useropt=no ;;
1425
1426  --x)
1427    # Obsolete; use --with-x.
1428    with_x=yes ;;
1429
1430  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431  | --x-incl | --x-inc | --x-in | --x-i)
1432    ac_prev=x_includes ;;
1433  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435    x_includes=$ac_optarg ;;
1436
1437  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439    ac_prev=x_libraries ;;
1440  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442    x_libraries=$ac_optarg ;;
1443
1444  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445Try \`$0 --help' for more information"
1446    ;;
1447
1448  *=*)
1449    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450    # Reject names that are not valid shell variable names.
1451    case $ac_envvar in #(
1452      '' | [0-9]* | *[!_$as_cr_alnum]* )
1453      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454    esac
1455    eval $ac_envvar=\$ac_optarg
1456    export $ac_envvar ;;
1457
1458  *)
1459    # FIXME: should be removed in autoconf 3.0.
1460    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1464    ;;
1465
1466  esac
1467done
1468
1469if test -n "$ac_prev"; then
1470  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471  as_fn_error $? "missing argument to $ac_option"
1472fi
1473
1474if test -n "$ac_unrecognized_opts"; then
1475  case $enable_option_checking in
1476    no) ;;
1477    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479  esac
1480fi
1481
1482# Check all directory arguments for consistency.
1483for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484		datadir sysconfdir sharedstatedir localstatedir includedir \
1485		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486		libdir localedir mandir
1487do
1488  eval ac_val=\$$ac_var
1489  # Remove trailing slashes.
1490  case $ac_val in
1491    */ )
1492      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493      eval $ac_var=\$ac_val;;
1494  esac
1495  # Be sure to have absolute directory names.
1496  case $ac_val in
1497    [\\/$]* | ?:[\\/]* )  continue;;
1498    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499  esac
1500  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501done
1502
1503# There might be people who depend on the old broken behavior: `$host'
1504# used to hold the argument of --host etc.
1505# FIXME: To remove some day.
1506build=$build_alias
1507host=$host_alias
1508target=$target_alias
1509
1510# FIXME: To remove some day.
1511if test "x$host_alias" != x; then
1512  if test "x$build_alias" = x; then
1513    cross_compiling=maybe
1514    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515    If a cross compiler is detected then cross compile mode will be used" >&2
1516  elif test "x$build_alias" != "x$host_alias"; then
1517    cross_compiling=yes
1518  fi
1519fi
1520
1521ac_tool_prefix=
1522test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523
1524test "$silent" = yes && exec 6>/dev/null
1525
1526
1527ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528ac_ls_di=`ls -di .` &&
1529ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530  as_fn_error $? "working directory cannot be determined"
1531test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532  as_fn_error $? "pwd does not report name of working directory"
1533
1534
1535# Find the source files, if location was not specified.
1536if test -z "$srcdir"; then
1537  ac_srcdir_defaulted=yes
1538  # Try the directory containing this script, then the parent directory.
1539  ac_confdir=`$as_dirname -- "$as_myself" ||
1540$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541	 X"$as_myself" : 'X\(//\)[^/]' \| \
1542	 X"$as_myself" : 'X\(//\)$' \| \
1543	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544$as_echo X"$as_myself" |
1545    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546	    s//\1/
1547	    q
1548	  }
1549	  /^X\(\/\/\)[^/].*/{
1550	    s//\1/
1551	    q
1552	  }
1553	  /^X\(\/\/\)$/{
1554	    s//\1/
1555	    q
1556	  }
1557	  /^X\(\/\).*/{
1558	    s//\1/
1559	    q
1560	  }
1561	  s/.*/./; q'`
1562  srcdir=$ac_confdir
1563  if test ! -r "$srcdir/$ac_unique_file"; then
1564    srcdir=..
1565  fi
1566else
1567  ac_srcdir_defaulted=no
1568fi
1569if test ! -r "$srcdir/$ac_unique_file"; then
1570  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572fi
1573ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574ac_abs_confdir=`(
1575	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576	pwd)`
1577# When building in place, set srcdir=.
1578if test "$ac_abs_confdir" = "$ac_pwd"; then
1579  srcdir=.
1580fi
1581# Remove unnecessary trailing slashes from srcdir.
1582# Double slashes in file names in object file debugging info
1583# mess up M-x gdb in Emacs.
1584case $srcdir in
1585*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586esac
1587for ac_var in $ac_precious_vars; do
1588  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589  eval ac_env_${ac_var}_value=\$${ac_var}
1590  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592done
1593
1594#
1595# Report the --help message.
1596#
1597if test "$ac_init_help" = "long"; then
1598  # Omit some internal or obsolete options to make the list less imposing.
1599  # This message is too long to be a string in the A/UX 3.1 sh.
1600  cat <<_ACEOF
1601\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602
1603Usage: $0 [OPTION]... [VAR=VALUE]...
1604
1605To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606VAR=VALUE.  See below for descriptions of some of the useful variables.
1607
1608Defaults for the options are specified in brackets.
1609
1610Configuration:
1611  -h, --help              display this help and exit
1612      --help=short        display options specific to this package
1613      --help=recursive    display the short help of all the included packages
1614  -V, --version           display version information and exit
1615  -q, --quiet, --silent   do not print \`checking ...' messages
1616      --cache-file=FILE   cache test results in FILE [disabled]
1617  -C, --config-cache      alias for \`--cache-file=config.cache'
1618  -n, --no-create         do not create output files
1619      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620
1621Installation directories:
1622  --prefix=PREFIX         install architecture-independent files in PREFIX
1623                          [$ac_default_prefix]
1624  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                          [PREFIX]
1626
1627By default, \`make install' will install all the files in
1628\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630for instance \`--prefix=\$HOME'.
1631
1632For better control, use the options below.
1633
1634Fine tuning of the installation directories:
1635  --bindir=DIR            user executables [EPREFIX/bin]
1636  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637  --libexecdir=DIR        program executables [EPREFIX/libexec]
1638  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641  --libdir=DIR            object code libraries [EPREFIX/lib]
1642  --includedir=DIR        C header files [PREFIX/include]
1643  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646  --infodir=DIR           info documentation [DATAROOTDIR/info]
1647  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648  --mandir=DIR            man documentation [DATAROOTDIR/man]
1649  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650  --htmldir=DIR           html documentation [DOCDIR]
1651  --dvidir=DIR            dvi documentation [DOCDIR]
1652  --pdfdir=DIR            pdf documentation [DOCDIR]
1653  --psdir=DIR             ps documentation [DOCDIR]
1654_ACEOF
1655
1656  cat <<\_ACEOF
1657
1658X features:
1659  --x-includes=DIR    X include files are in DIR
1660  --x-libraries=DIR   X library files are in DIR
1661
1662System types:
1663  --build=BUILD     configure for building on BUILD [guessed]
1664  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665  --target=TARGET   configure for building compilers for TARGET [HOST]
1666_ACEOF
1667fi
1668
1669if test -n "$ac_init_help"; then
1670  case $ac_init_help in
1671     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672   esac
1673  cat <<\_ACEOF
1674
1675Optional Features:
1676  --disable-option-checking  ignore unrecognized --enable/--with options
1677  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679  --enable-openjdk-only   suppress building custom source even if present
1680                          [disabled]
1681  --enable-debug          set the debug level to fastdebug (shorthand for
1682                          --with-debug-level=fastdebug) [disabled]
1683  --disable-headful       disable building headful support (graphical UI
1684                          support) [enabled]
1685  --enable-hotspot-test-in-build
1686                          run the Queens test after Hotspot build [disabled]
1687  --enable-unlimited-crypto
1688                          Enable unlimited crypto policy [disabled]
1689  --disable-debug-symbols disable generation of debug symbols [enabled]
1690  --disable-zip-debug-info
1691                          disable zipping of debug-info files [enabled]
1692  --disable-macosx-runtime-support
1693                          disable the use of MacOSX Java runtime support
1694                          framework [enabled]
1695  --enable-sjavac         use sjavac to do fast incremental compiles
1696                          [disabled]
1697  --disable-precompiled-headers
1698                          disable using precompiled headers when compiling C++
1699                          [enabled]
1700  --disable-ccache        disable using ccache to speed up recompilations
1701                          [enabled]
1702
1703Optional Packages:
1704  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706  --with-custom-make-dir  use this directory for custom build/make files
1707  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                          support it), e.g. --with-target-bits=32 [guessed]
1709  --with-sys-root         pass this sys-root to the compilers and tools (for
1710                          cross-compiling)
1711  --with-tools-dir        search this directory for compilers and tools (for
1712                          cross-compiling)
1713  --with-devkit           use this directory as base for tools-dir and
1714                          sys-root (for cross-compiling)
1715  --with-jdk-variant      JDK variant to build (normal) [normal]
1716  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                          client, minimal1, kernel, zero, zeroshark) [server]
1718  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                          [release]
1720  --with-conf-name        use this as the name of the configuration [generated
1721                          from important configuration options]
1722  --with-builddeps-conf   use this configuration file for the builddeps
1723  --with-builddeps-server download and use build dependencies from this server
1724                          url
1725  --with-builddeps-dir    store downloaded build dependencies here
1726                          [/localhome/builddeps]
1727  --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                          group
1729  --with-cacerts-file     specify alternative cacerts file
1730  --with-milestone        Set milestone value for build [internal]
1731  --with-update-version   Set update version value for build [b00]
1732  --with-build-number     Set build number value for build [b00]
1733  --with-user-release-suffix
1734                          Add a custom string to the version string if build
1735                          number isn't set.[username_builddateb00]
1736  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1737  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1738                          invocations of the Boot JDK, overriding the default
1739                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1740                          -enableassertions"
1741  --with-add-source-root  for each and every source directory, look in this
1742                          additional source root for the same directory; if it
1743                          exists and have files in it, include it in the build
1744  --with-override-source-root
1745                          for each and every source directory, look in this
1746                          override source root for the same directory; if it
1747                          exists, use that directory instead and ignore the
1748                          directory in the original source root
1749  --with-adds-and-overrides
1750                          use the subdirs 'adds' and 'overrides' in the
1751                          specified directory as add-source-root and
1752                          override-source-root
1753  --with-override-langtools
1754                          use this langtools dir for the build
1755  --with-override-corba   use this corba dir for the build
1756  --with-override-jaxp    use this jaxp dir for the build
1757  --with-override-jaxws   use this jaxws dir for the build
1758  --with-override-hotspot use this hotspot dir for the build
1759  --with-override-jdk     use this jdk dir for the build
1760  --with-import-hotspot   import hotspot binaries from this jdk image or
1761                          hotspot build dist dir instead of building from
1762                          source
1763  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1764                          only) [probed]
1765  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1766  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1767                          [probed]
1768  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1769                          [probed]
1770  --with-jtreg            Regression Test Harness [probed]
1771  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1772  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1773  --with-extra-ldflags    extra flags to be used when linking jdk
1774  --with-x                use the X Window System
1775  --with-cups             specify prefix directory for the cups package
1776                          (expecting the headers under PATH/include)
1777  --with-cups-include     specify directory for the cups include files
1778  --with-freetype         specify prefix directory for the freetype2 package
1779                          (expecting the libraries under PATH/lib and the
1780                          headers under PATH/include)
1781  --with-alsa             specify prefix directory for the alsa package
1782                          (expecting the libraries under PATH/lib and the
1783                          headers under PATH/include)
1784  --with-alsa-include     specify directory for the alsa include files
1785  --with-alsa-lib         specify directory for the alsa library
1786  --with-giflib           use giflib from build system or OpenJDK source
1787                          (system, bundled) [bundled]
1788  --with-zlib             use zlib from build system or OpenJDK source
1789                          (system, bundled) [bundled]
1790  --with-stdc++lib=<static>,<dynamic>,<default>
1791                          force linking of the C++ runtime on Linux to either
1792                          static or dynamic, default is static with dynamic as
1793                          fallback
1794  --with-num-cores        number of cores in the build system, e.g.
1795                          --with-num-cores=8 [probed]
1796  --with-memory-size      memory (in MB) available in the build system, e.g.
1797                          --with-memory-size=1024 [probed]
1798  --with-jobs             number of parallel jobs to let make run [calculated
1799                          based on cores and memory]
1800  --with-sjavac-server-java
1801                          use this java binary for running the sjavac
1802                          background server [Boot JDK java]
1803  --with-ccache-dir       where to store ccache files [~/.ccache]
1804
1805Some influential environment variables:
1806  PKG_CONFIG  path to pkg-config utility
1807  CC          C compiler command
1808  CFLAGS      C compiler flags
1809  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1810              nonstandard directory <lib dir>
1811  LIBS        libraries to pass to the linker, e.g. -l<library>
1812  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813              you have headers in a nonstandard directory <include dir>
1814  CXX         C++ compiler command
1815  CXXFLAGS    C++ compiler flags
1816  OBJC        Objective C compiler command
1817  OBJCFLAGS   Objective C compiler flags
1818  CPP         C preprocessor
1819  CXXCPP      C++ preprocessor
1820  XMKMF       Path to xmkmf, Makefile generator for X Window System
1821  FREETYPE2_CFLAGS
1822              C compiler flags for FREETYPE2, overriding pkg-config
1823  FREETYPE2_LIBS
1824              linker flags for FREETYPE2, overriding pkg-config
1825  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1826  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1827  LIBFFI_CFLAGS
1828              C compiler flags for LIBFFI, overriding pkg-config
1829  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1830
1831Use these variables to override the choices made by `configure' or to help
1832it to find libraries and programs with nonstandard names/locations.
1833
1834Report bugs to <build-dev@openjdk.java.net>.
1835OpenJDK home page: <http://openjdk.java.net>.
1836_ACEOF
1837ac_status=$?
1838fi
1839
1840if test "$ac_init_help" = "recursive"; then
1841  # If there are subdirs, report their specific --help.
1842  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1843    test -d "$ac_dir" ||
1844      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1845      continue
1846    ac_builddir=.
1847
1848case "$ac_dir" in
1849.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850*)
1851  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1852  # A ".." for each directory in $ac_dir_suffix.
1853  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1854  case $ac_top_builddir_sub in
1855  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1857  esac ;;
1858esac
1859ac_abs_top_builddir=$ac_pwd
1860ac_abs_builddir=$ac_pwd$ac_dir_suffix
1861# for backward compatibility:
1862ac_top_builddir=$ac_top_build_prefix
1863
1864case $srcdir in
1865  .)  # We are building in place.
1866    ac_srcdir=.
1867    ac_top_srcdir=$ac_top_builddir_sub
1868    ac_abs_top_srcdir=$ac_pwd ;;
1869  [\\/]* | ?:[\\/]* )  # Absolute name.
1870    ac_srcdir=$srcdir$ac_dir_suffix;
1871    ac_top_srcdir=$srcdir
1872    ac_abs_top_srcdir=$srcdir ;;
1873  *) # Relative name.
1874    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1875    ac_top_srcdir=$ac_top_build_prefix$srcdir
1876    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1877esac
1878ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1879
1880    cd "$ac_dir" || { ac_status=$?; continue; }
1881    # Check for guested configure.
1882    if test -f "$ac_srcdir/configure.gnu"; then
1883      echo &&
1884      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1885    elif test -f "$ac_srcdir/configure"; then
1886      echo &&
1887      $SHELL "$ac_srcdir/configure" --help=recursive
1888    else
1889      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1890    fi || ac_status=$?
1891    cd "$ac_pwd" || { ac_status=$?; break; }
1892  done
1893fi
1894
1895test -n "$ac_init_help" && exit $ac_status
1896if $ac_init_version; then
1897  cat <<\_ACEOF
1898OpenJDK configure jdk8
1899generated by GNU Autoconf 2.67
1900
1901Copyright (C) 2010 Free Software Foundation, Inc.
1902This configure script is free software; the Free Software Foundation
1903gives unlimited permission to copy, distribute and modify it.
1904_ACEOF
1905  exit
1906fi
1907
1908## ------------------------ ##
1909## Autoconf initialization. ##
1910## ------------------------ ##
1911
1912# ac_fn_c_try_compile LINENO
1913# --------------------------
1914# Try to compile conftest.$ac_ext, and return whether this succeeded.
1915ac_fn_c_try_compile ()
1916{
1917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918  rm -f conftest.$ac_objext
1919  if { { ac_try="$ac_compile"
1920case "(($ac_try" in
1921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922  *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926  (eval "$ac_compile") 2>conftest.err
1927  ac_status=$?
1928  if test -s conftest.err; then
1929    grep -v '^ *+' conftest.err >conftest.er1
1930    cat conftest.er1 >&5
1931    mv -f conftest.er1 conftest.err
1932  fi
1933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934  test $ac_status = 0; } && {
1935	 test -z "$ac_c_werror_flag" ||
1936	 test ! -s conftest.err
1937       } && test -s conftest.$ac_objext; then :
1938  ac_retval=0
1939else
1940  $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943	ac_retval=1
1944fi
1945  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946  as_fn_set_status $ac_retval
1947
1948} # ac_fn_c_try_compile
1949
1950# ac_fn_cxx_try_compile LINENO
1951# ----------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_cxx_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_cxx_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_cxx_try_compile
1987
1988# ac_fn_objc_try_compile LINENO
1989# -----------------------------
1990# Try to compile conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_objc_try_compile ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  rm -f conftest.$ac_objext
1995  if { { ac_try="$ac_compile"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_compile") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } && {
2011	 test -z "$ac_objc_werror_flag" ||
2012	 test ! -s conftest.err
2013       } && test -s conftest.$ac_objext; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019	ac_retval=1
2020fi
2021  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_objc_try_compile
2025
2026# ac_fn_c_try_cpp LINENO
2027# ----------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_c_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_c_try_cpp
2062
2063# ac_fn_cxx_try_cpp LINENO
2064# ------------------------
2065# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066ac_fn_cxx_try_cpp ()
2067{
2068  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069  if { { ac_try="$ac_cpp conftest.$ac_ext"
2070case "(($ac_try" in
2071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072  *) ac_try_echo=$ac_try;;
2073esac
2074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075$as_echo "$ac_try_echo"; } >&5
2076  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077  ac_status=$?
2078  if test -s conftest.err; then
2079    grep -v '^ *+' conftest.err >conftest.er1
2080    cat conftest.er1 >&5
2081    mv -f conftest.er1 conftest.err
2082  fi
2083  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084  test $ac_status = 0; } > conftest.i && {
2085	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2086	 test ! -s conftest.err
2087       }; then :
2088  ac_retval=0
2089else
2090  $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093    ac_retval=1
2094fi
2095  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096  as_fn_set_status $ac_retval
2097
2098} # ac_fn_cxx_try_cpp
2099
2100# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2101# ---------------------------------------------------------
2102# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2103# the include files in INCLUDES and setting the cache variable VAR
2104# accordingly.
2105ac_fn_cxx_check_header_mongrel ()
2106{
2107  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108  if eval "test \"\${$3+set}\"" = set; then :
2109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110$as_echo_n "checking for $2... " >&6; }
2111if eval "test \"\${$3+set}\"" = set; then :
2112  $as_echo_n "(cached) " >&6
2113fi
2114eval ac_res=\$$3
2115	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116$as_echo "$ac_res" >&6; }
2117else
2118  # Is the header compilable?
2119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2120$as_echo_n "checking $2 usability... " >&6; }
2121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h.  */
2123$4
2124#include <$2>
2125_ACEOF
2126if ac_fn_cxx_try_compile "$LINENO"; then :
2127  ac_header_compiler=yes
2128else
2129  ac_header_compiler=no
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2133$as_echo "$ac_header_compiler" >&6; }
2134
2135# Is the header present?
2136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2137$as_echo_n "checking $2 presence... " >&6; }
2138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h.  */
2140#include <$2>
2141_ACEOF
2142if ac_fn_cxx_try_cpp "$LINENO"; then :
2143  ac_header_preproc=yes
2144else
2145  ac_header_preproc=no
2146fi
2147rm -f conftest.err conftest.i conftest.$ac_ext
2148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2149$as_echo "$ac_header_preproc" >&6; }
2150
2151# So?  What about this header?
2152case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2153  yes:no: )
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2155$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2157$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2158    ;;
2159  no:yes:* )
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2161$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2163$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2165$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2167$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2168    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2169$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2170( $as_echo "## ----------------------------------------- ##
2171## Report this to build-dev@openjdk.java.net ##
2172## ----------------------------------------- ##"
2173     ) | sed "s/^/$as_me: WARNING:     /" >&2
2174    ;;
2175esac
2176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
2178if eval "test \"\${$3+set}\"" = set; then :
2179  $as_echo_n "(cached) " >&6
2180else
2181  eval "$3=\$ac_header_compiler"
2182fi
2183eval ac_res=\$$3
2184	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185$as_echo "$ac_res" >&6; }
2186fi
2187  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188
2189} # ac_fn_cxx_check_header_mongrel
2190
2191# ac_fn_cxx_try_run LINENO
2192# ------------------------
2193# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2194# that executables *can* be run.
2195ac_fn_cxx_try_run ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  if { { ac_try="$ac_link"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_link") 2>&5
2206  ac_status=$?
2207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2209  { { case "(($ac_try" in
2210  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2211  *) ac_try_echo=$ac_try;;
2212esac
2213eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2214$as_echo "$ac_try_echo"; } >&5
2215  (eval "$ac_try") 2>&5
2216  ac_status=$?
2217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2218  test $ac_status = 0; }; }; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: program exited with status $ac_status" >&5
2222       $as_echo "$as_me: failed program was:" >&5
2223sed 's/^/| /' conftest.$ac_ext >&5
2224
2225       ac_retval=$ac_status
2226fi
2227  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2228  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229  as_fn_set_status $ac_retval
2230
2231} # ac_fn_cxx_try_run
2232
2233# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2234# ---------------------------------------------------------
2235# Tests whether HEADER exists and can be compiled using the include files in
2236# INCLUDES, setting the cache variable VAR accordingly.
2237ac_fn_cxx_check_header_compile ()
2238{
2239  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2241$as_echo_n "checking for $2... " >&6; }
2242if eval "test \"\${$3+set}\"" = set; then :
2243  $as_echo_n "(cached) " >&6
2244else
2245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248#include <$2>
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  eval "$3=yes"
2252else
2253  eval "$3=no"
2254fi
2255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256fi
2257eval ac_res=\$$3
2258	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259$as_echo "$ac_res" >&6; }
2260  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261
2262} # ac_fn_cxx_check_header_compile
2263
2264# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2265# ----------------------------------------------
2266# Tries to find the compile-time value of EXPR in a program that includes
2267# INCLUDES, setting VAR accordingly. Returns whether the value could be
2268# computed
2269ac_fn_cxx_compute_int ()
2270{
2271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272  if test "$cross_compiling" = yes; then
2273    # Depending upon the size, compute the lo and hi bounds.
2274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277int
2278main ()
2279{
2280static int test_array [1 - 2 * !(($2) >= 0)];
2281test_array [0] = 0
2282
2283  ;
2284  return 0;
2285}
2286_ACEOF
2287if ac_fn_cxx_try_compile "$LINENO"; then :
2288  ac_lo=0 ac_mid=0
2289  while :; do
2290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293int
2294main ()
2295{
2296static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2297test_array [0] = 0
2298
2299  ;
2300  return 0;
2301}
2302_ACEOF
2303if ac_fn_cxx_try_compile "$LINENO"; then :
2304  ac_hi=$ac_mid; break
2305else
2306  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2307			if test $ac_lo -le $ac_mid; then
2308			  ac_lo= ac_hi=
2309			  break
2310			fi
2311			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314  done
2315else
2316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h.  */
2318$4
2319int
2320main ()
2321{
2322static int test_array [1 - 2 * !(($2) < 0)];
2323test_array [0] = 0
2324
2325  ;
2326  return 0;
2327}
2328_ACEOF
2329if ac_fn_cxx_try_compile "$LINENO"; then :
2330  ac_hi=-1 ac_mid=-1
2331  while :; do
2332    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h.  */
2334$4
2335int
2336main ()
2337{
2338static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2339test_array [0] = 0
2340
2341  ;
2342  return 0;
2343}
2344_ACEOF
2345if ac_fn_cxx_try_compile "$LINENO"; then :
2346  ac_lo=$ac_mid; break
2347else
2348  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2349			if test $ac_mid -le $ac_hi; then
2350			  ac_lo= ac_hi=
2351			  break
2352			fi
2353			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356  done
2357else
2358  ac_lo= ac_hi=
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363# Binary search between lo and hi bounds.
2364while test "x$ac_lo" != "x$ac_hi"; do
2365  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h.  */
2368$4
2369int
2370main ()
2371{
2372static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2373test_array [0] = 0
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_compile "$LINENO"; then :
2380  ac_hi=$ac_mid
2381else
2382  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385done
2386case $ac_lo in #((
2387?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2388'') ac_retval=1 ;;
2389esac
2390  else
2391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h.  */
2393$4
2394static long int longval () { return $2; }
2395static unsigned long int ulongval () { return $2; }
2396#include <stdio.h>
2397#include <stdlib.h>
2398int
2399main ()
2400{
2401
2402  FILE *f = fopen ("conftest.val", "w");
2403  if (! f)
2404    return 1;
2405  if (($2) < 0)
2406    {
2407      long int i = longval ();
2408      if (i != ($2))
2409	return 1;
2410      fprintf (f, "%ld", i);
2411    }
2412  else
2413    {
2414      unsigned long int i = ulongval ();
2415      if (i != ($2))
2416	return 1;
2417      fprintf (f, "%lu", i);
2418    }
2419  /* Do not output a trailing newline, as this causes \r\n confusion
2420     on some platforms.  */
2421  return ferror (f) || fclose (f) != 0;
2422
2423  ;
2424  return 0;
2425}
2426_ACEOF
2427if ac_fn_cxx_try_run "$LINENO"; then :
2428  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2429else
2430  ac_retval=1
2431fi
2432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2433  conftest.$ac_objext conftest.beam conftest.$ac_ext
2434rm -f conftest.val
2435
2436  fi
2437  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438  as_fn_set_status $ac_retval
2439
2440} # ac_fn_cxx_compute_int
2441
2442# ac_fn_cxx_try_link LINENO
2443# -------------------------
2444# Try to link conftest.$ac_ext, and return whether this succeeded.
2445ac_fn_cxx_try_link ()
2446{
2447  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448  rm -f conftest.$ac_objext conftest$ac_exeext
2449  if { { ac_try="$ac_link"
2450case "(($ac_try" in
2451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452  *) ac_try_echo=$ac_try;;
2453esac
2454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455$as_echo "$ac_try_echo"; } >&5
2456  (eval "$ac_link") 2>conftest.err
2457  ac_status=$?
2458  if test -s conftest.err; then
2459    grep -v '^ *+' conftest.err >conftest.er1
2460    cat conftest.er1 >&5
2461    mv -f conftest.er1 conftest.err
2462  fi
2463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464  test $ac_status = 0; } && {
2465	 test -z "$ac_cxx_werror_flag" ||
2466	 test ! -s conftest.err
2467       } && test -s conftest$ac_exeext && {
2468	 test "$cross_compiling" = yes ||
2469	 $as_test_x conftest$ac_exeext
2470       }; then :
2471  ac_retval=0
2472else
2473  $as_echo "$as_me: failed program was:" >&5
2474sed 's/^/| /' conftest.$ac_ext >&5
2475
2476	ac_retval=1
2477fi
2478  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2479  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2480  # interfere with the next link command; also delete a directory that is
2481  # left behind by Apple's compiler.  We do this before executing the actions.
2482  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2483  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484  as_fn_set_status $ac_retval
2485
2486} # ac_fn_cxx_try_link
2487
2488# ac_fn_cxx_check_func LINENO FUNC VAR
2489# ------------------------------------
2490# Tests whether FUNC exists, setting the cache variable VAR accordingly
2491ac_fn_cxx_check_func ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495$as_echo_n "checking for $2... " >&6; }
2496if eval "test \"\${$3+set}\"" = set; then :
2497  $as_echo_n "(cached) " >&6
2498else
2499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500/* end confdefs.h.  */
2501/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2502   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2503#define $2 innocuous_$2
2504
2505/* System header to define __stub macros and hopefully few prototypes,
2506    which can conflict with char $2 (); below.
2507    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2508    <limits.h> exists even on freestanding compilers.  */
2509
2510#ifdef __STDC__
2511# include <limits.h>
2512#else
2513# include <assert.h>
2514#endif
2515
2516#undef $2
2517
2518/* Override any GCC internal prototype to avoid an error.
2519   Use char because int might match the return type of a GCC
2520   builtin and then its argument prototype would still apply.  */
2521#ifdef __cplusplus
2522extern "C"
2523#endif
2524char $2 ();
2525/* The GNU C library defines this for functions which it implements
2526    to always fail with ENOSYS.  Some functions are actually named
2527    something starting with __ and the normal name is an alias.  */
2528#if defined __stub_$2 || defined __stub___$2
2529choke me
2530#endif
2531
2532int
2533main ()
2534{
2535return $2 ();
2536  ;
2537  return 0;
2538}
2539_ACEOF
2540if ac_fn_cxx_try_link "$LINENO"; then :
2541  eval "$3=yes"
2542else
2543  eval "$3=no"
2544fi
2545rm -f core conftest.err conftest.$ac_objext \
2546    conftest$ac_exeext conftest.$ac_ext
2547fi
2548eval ac_res=\$$3
2549	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550$as_echo "$ac_res" >&6; }
2551  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2552
2553} # ac_fn_cxx_check_func
2554
2555# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2556# -------------------------------------------------------
2557# Tests whether HEADER exists and can be compiled using the include files in
2558# INCLUDES, setting the cache variable VAR accordingly.
2559ac_fn_c_check_header_compile ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563$as_echo_n "checking for $2... " >&6; }
2564if eval "test \"\${$3+set}\"" = set; then :
2565  $as_echo_n "(cached) " >&6
2566else
2567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570#include <$2>
2571_ACEOF
2572if ac_fn_c_try_compile "$LINENO"; then :
2573  eval "$3=yes"
2574else
2575  eval "$3=no"
2576fi
2577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578fi
2579eval ac_res=\$$3
2580	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581$as_echo "$ac_res" >&6; }
2582  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2583
2584} # ac_fn_c_check_header_compile
2585cat >config.log <<_ACEOF
2586This file contains any messages produced by compilers while
2587running configure, to aid debugging if configure makes a mistake.
2588
2589It was created by OpenJDK $as_me jdk8, which was
2590generated by GNU Autoconf 2.67.  Invocation command line was
2591
2592  $ $0 $@
2593
2594_ACEOF
2595exec 5>>config.log
2596{
2597cat <<_ASUNAME
2598## --------- ##
2599## Platform. ##
2600## --------- ##
2601
2602hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2603uname -m = `(uname -m) 2>/dev/null || echo unknown`
2604uname -r = `(uname -r) 2>/dev/null || echo unknown`
2605uname -s = `(uname -s) 2>/dev/null || echo unknown`
2606uname -v = `(uname -v) 2>/dev/null || echo unknown`
2607
2608/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2609/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2610
2611/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2612/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2613/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2614/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2615/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2616/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2617/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2618
2619_ASUNAME
2620
2621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622for as_dir in $PATH
2623do
2624  IFS=$as_save_IFS
2625  test -z "$as_dir" && as_dir=.
2626    $as_echo "PATH: $as_dir"
2627  done
2628IFS=$as_save_IFS
2629
2630} >&5
2631
2632cat >&5 <<_ACEOF
2633
2634
2635## ----------- ##
2636## Core tests. ##
2637## ----------- ##
2638
2639_ACEOF
2640
2641
2642# Keep a trace of the command line.
2643# Strip out --no-create and --no-recursion so they do not pile up.
2644# Strip out --silent because we don't want to record it for future runs.
2645# Also quote any args containing shell meta-characters.
2646# Make two passes to allow for proper duplicate-argument suppression.
2647ac_configure_args=
2648ac_configure_args0=
2649ac_configure_args1=
2650ac_must_keep_next=false
2651for ac_pass in 1 2
2652do
2653  for ac_arg
2654  do
2655    case $ac_arg in
2656    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2657    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2658    | -silent | --silent | --silen | --sile | --sil)
2659      continue ;;
2660    *\'*)
2661      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2662    esac
2663    case $ac_pass in
2664    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2665    2)
2666      as_fn_append ac_configure_args1 " '$ac_arg'"
2667      if test $ac_must_keep_next = true; then
2668	ac_must_keep_next=false # Got value, back to normal.
2669      else
2670	case $ac_arg in
2671	  *=* | --config-cache | -C | -disable-* | --disable-* \
2672	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2673	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2674	  | -with-* | --with-* | -without-* | --without-* | --x)
2675	    case "$ac_configure_args0 " in
2676	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2677	    esac
2678	    ;;
2679	  -* ) ac_must_keep_next=true ;;
2680	esac
2681      fi
2682      as_fn_append ac_configure_args " '$ac_arg'"
2683      ;;
2684    esac
2685  done
2686done
2687{ ac_configure_args0=; unset ac_configure_args0;}
2688{ ac_configure_args1=; unset ac_configure_args1;}
2689
2690# When interrupted or exit'd, cleanup temporary files, and complete
2691# config.log.  We remove comments because anyway the quotes in there
2692# would cause problems or look ugly.
2693# WARNING: Use '\'' to represent an apostrophe within the trap.
2694# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2695trap 'exit_status=$?
2696  # Save into config.log some information that might help in debugging.
2697  {
2698    echo
2699
2700    $as_echo "## ---------------- ##
2701## Cache variables. ##
2702## ---------------- ##"
2703    echo
2704    # The following way of writing the cache mishandles newlines in values,
2705(
2706  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2707    eval ac_val=\$$ac_var
2708    case $ac_val in #(
2709    *${as_nl}*)
2710      case $ac_var in #(
2711      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2712$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2713      esac
2714      case $ac_var in #(
2715      _ | IFS | as_nl) ;; #(
2716      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2717      *) { eval $ac_var=; unset $ac_var;} ;;
2718      esac ;;
2719    esac
2720  done
2721  (set) 2>&1 |
2722    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2723    *${as_nl}ac_space=\ *)
2724      sed -n \
2725	"s/'\''/'\''\\\\'\'''\''/g;
2726	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2727      ;; #(
2728    *)
2729      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2730      ;;
2731    esac |
2732    sort
2733)
2734    echo
2735
2736    $as_echo "## ----------------- ##
2737## Output variables. ##
2738## ----------------- ##"
2739    echo
2740    for ac_var in $ac_subst_vars
2741    do
2742      eval ac_val=\$$ac_var
2743      case $ac_val in
2744      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745      esac
2746      $as_echo "$ac_var='\''$ac_val'\''"
2747    done | sort
2748    echo
2749
2750    if test -n "$ac_subst_files"; then
2751      $as_echo "## ------------------- ##
2752## File substitutions. ##
2753## ------------------- ##"
2754      echo
2755      for ac_var in $ac_subst_files
2756      do
2757	eval ac_val=\$$ac_var
2758	case $ac_val in
2759	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760	esac
2761	$as_echo "$ac_var='\''$ac_val'\''"
2762      done | sort
2763      echo
2764    fi
2765
2766    if test -s confdefs.h; then
2767      $as_echo "## ----------- ##
2768## confdefs.h. ##
2769## ----------- ##"
2770      echo
2771      cat confdefs.h
2772      echo
2773    fi
2774    test "$ac_signal" != 0 &&
2775      $as_echo "$as_me: caught signal $ac_signal"
2776    $as_echo "$as_me: exit $exit_status"
2777  } >&5
2778  rm -f core *.core core.conftest.* &&
2779    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2780    exit $exit_status
2781' 0
2782for ac_signal in 1 2 13 15; do
2783  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2784done
2785ac_signal=0
2786
2787# confdefs.h avoids OS command line length limits that DEFS can exceed.
2788rm -f -r conftest* confdefs.h
2789
2790$as_echo "/* confdefs.h */" > confdefs.h
2791
2792# Predefined preprocessor variables.
2793
2794cat >>confdefs.h <<_ACEOF
2795#define PACKAGE_NAME "$PACKAGE_NAME"
2796_ACEOF
2797
2798cat >>confdefs.h <<_ACEOF
2799#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2800_ACEOF
2801
2802cat >>confdefs.h <<_ACEOF
2803#define PACKAGE_VERSION "$PACKAGE_VERSION"
2804_ACEOF
2805
2806cat >>confdefs.h <<_ACEOF
2807#define PACKAGE_STRING "$PACKAGE_STRING"
2808_ACEOF
2809
2810cat >>confdefs.h <<_ACEOF
2811#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2812_ACEOF
2813
2814cat >>confdefs.h <<_ACEOF
2815#define PACKAGE_URL "$PACKAGE_URL"
2816_ACEOF
2817
2818
2819# Let the site file select an alternate cache file if it wants to.
2820# Prefer an explicitly selected file to automatically selected ones.
2821ac_site_file1=NONE
2822ac_site_file2=NONE
2823if test -n "$CONFIG_SITE"; then
2824  # We do not want a PATH search for config.site.
2825  case $CONFIG_SITE in #((
2826    -*)  ac_site_file1=./$CONFIG_SITE;;
2827    */*) ac_site_file1=$CONFIG_SITE;;
2828    *)   ac_site_file1=./$CONFIG_SITE;;
2829  esac
2830elif test "x$prefix" != xNONE; then
2831  ac_site_file1=$prefix/share/config.site
2832  ac_site_file2=$prefix/etc/config.site
2833else
2834  ac_site_file1=$ac_default_prefix/share/config.site
2835  ac_site_file2=$ac_default_prefix/etc/config.site
2836fi
2837for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2838do
2839  test "x$ac_site_file" = xNONE && continue
2840  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2841    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2842$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2843    sed 's/^/| /' "$ac_site_file" >&5
2844    . "$ac_site_file" \
2845      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847as_fn_error $? "failed to load site script $ac_site_file
2848See \`config.log' for more details" "$LINENO" 5 ; }
2849  fi
2850done
2851
2852if test -r "$cache_file"; then
2853  # Some versions of bash will fail to source /dev/null (special files
2854  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2855  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2856    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2857$as_echo "$as_me: loading cache $cache_file" >&6;}
2858    case $cache_file in
2859      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2860      *)                      . "./$cache_file";;
2861    esac
2862  fi
2863else
2864  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2865$as_echo "$as_me: creating cache $cache_file" >&6;}
2866  >$cache_file
2867fi
2868
2869# Check that the precious variables saved in the cache have kept the same
2870# value.
2871ac_cache_corrupted=false
2872for ac_var in $ac_precious_vars; do
2873  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2874  eval ac_new_set=\$ac_env_${ac_var}_set
2875  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2876  eval ac_new_val=\$ac_env_${ac_var}_value
2877  case $ac_old_set,$ac_new_set in
2878    set,)
2879      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2880$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2881      ac_cache_corrupted=: ;;
2882    ,set)
2883      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2884$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2885      ac_cache_corrupted=: ;;
2886    ,);;
2887    *)
2888      if test "x$ac_old_val" != "x$ac_new_val"; then
2889	# differences in whitespace do not lead to failure.
2890	ac_old_val_w=`echo x $ac_old_val`
2891	ac_new_val_w=`echo x $ac_new_val`
2892	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2893	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2894$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2895	  ac_cache_corrupted=:
2896	else
2897	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2898$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2899	  eval $ac_var=\$ac_old_val
2900	fi
2901	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2902$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2903	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2904$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2905      fi;;
2906  esac
2907  # Pass precious variables to config.status.
2908  if test "$ac_new_set" = set; then
2909    case $ac_new_val in
2910    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2911    *) ac_arg=$ac_var=$ac_new_val ;;
2912    esac
2913    case " $ac_configure_args " in
2914      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2915      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2916    esac
2917  fi
2918done
2919if $ac_cache_corrupted; then
2920  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2923$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2924  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2925fi
2926## -------------------- ##
2927## Main body of script. ##
2928## -------------------- ##
2929
2930ac_ext=c
2931ac_cpp='$CPP $CPPFLAGS'
2932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934ac_compiler_gnu=$ac_cv_c_compiler_gnu
2935
2936
2937
2938ac_aux_dir=
2939for ac_dir in build-aux "$srcdir"/build-aux; do
2940  if test -f "$ac_dir/install-sh"; then
2941    ac_aux_dir=$ac_dir
2942    ac_install_sh="$ac_aux_dir/install-sh -c"
2943    break
2944  elif test -f "$ac_dir/install.sh"; then
2945    ac_aux_dir=$ac_dir
2946    ac_install_sh="$ac_aux_dir/install.sh -c"
2947    break
2948  elif test -f "$ac_dir/shtool"; then
2949    ac_aux_dir=$ac_dir
2950    ac_install_sh="$ac_aux_dir/shtool install -c"
2951    break
2952  fi
2953done
2954if test -z "$ac_aux_dir"; then
2955  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2956fi
2957
2958# These three variables are undocumented and unsupported,
2959# and are intended to be withdrawn in a future Autoconf release.
2960# They can cause serious problems if a builder's source tree is in a directory
2961# whose full name contains unusual characters.
2962ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2963ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2964ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2965
2966
2967# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2968
2969#
2970# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2972#
2973# This code is free software; you can redistribute it and/or modify it
2974# under the terms of the GNU General Public License version 2 only, as
2975# published by the Free Software Foundation.  Oracle designates this
2976# particular file as subject to the "Classpath" exception as provided
2977# by Oracle in the LICENSE file that accompanied this code.
2978#
2979# This code is distributed in the hope that it will be useful, but WITHOUT
2980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2982# version 2 for more details (a copy is included in the LICENSE file that
2983# accompanied this code).
2984#
2985# You should have received a copy of the GNU General Public License version
2986# 2 along with this work; if not, write to the Free Software Foundation,
2987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2988#
2989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2990# or visit www.oracle.com if you need additional information or have any
2991# questions.
2992#
2993
2994#
2995# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2996#
2997# This program is free software; you can redistribute it and/or modify
2998# it under the terms of the GNU General Public License as published by
2999# the Free Software Foundation; either version 2 of the License, or
3000# (at your option) any later version.
3001#
3002# This program is distributed in the hope that it will be useful, but
3003# WITHOUT ANY WARRANTY; without even the implied warranty of
3004# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3005# General Public License for more details.
3006#
3007# You should have received a copy of the GNU General Public License
3008# along with this program; if not, write to the Free Software
3009# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3010#
3011# As a special exception to the GNU General Public License, if you
3012# distribute this file as part of a program that contains a
3013# configuration script generated by Autoconf, you may include it under
3014# the same distribution terms that you use for the rest of that program.
3015
3016# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3017# ----------------------------------
3018# PKG_PROG_PKG_CONFIG
3019
3020# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3021#
3022# Check to see whether a particular set of modules exists.  Similar
3023# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3024#
3025#
3026# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3027# this or PKG_CHECK_MODULES is called, or make sure to call
3028# PKG_CHECK_EXISTS manually
3029# --------------------------------------------------------------
3030
3031
3032
3033# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3034# ---------------------------------------------
3035# _PKG_CONFIG
3036
3037# _PKG_SHORT_ERRORS_SUPPORTED
3038# -----------------------------
3039# _PKG_SHORT_ERRORS_SUPPORTED
3040
3041
3042# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3043# [ACTION-IF-NOT-FOUND])
3044#
3045#
3046# Note that if there is a possibility the first call to
3047# PKG_CHECK_MODULES might not happen, you should be sure to include an
3048# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3049#
3050#
3051# --------------------------------------------------------------
3052# PKG_CHECK_MODULES
3053
3054
3055# Include these first...
3056#
3057# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3059#
3060# This code is free software; you can redistribute it and/or modify it
3061# under the terms of the GNU General Public License version 2 only, as
3062# published by the Free Software Foundation.  Oracle designates this
3063# particular file as subject to the "Classpath" exception as provided
3064# by Oracle in the LICENSE file that accompanied this code.
3065#
3066# This code is distributed in the hope that it will be useful, but WITHOUT
3067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3069# version 2 for more details (a copy is included in the LICENSE file that
3070# accompanied this code).
3071#
3072# You should have received a copy of the GNU General Public License version
3073# 2 along with this work; if not, write to the Free Software Foundation,
3074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3075#
3076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3077# or visit www.oracle.com if you need additional information or have any
3078# questions.
3079#
3080
3081# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3082# If so, then append $1 to $2\
3083# Also set JVM_ARG_OK to true/false depending on outcome.
3084
3085
3086# This will make sure the given variable points to a full and proper
3087# path. This means:
3088# 1) There will be no spaces in the path. On posix platforms,
3089#    spaces in the path will result in an error. On Windows,
3090#    the path will be rewritten using short-style to be space-free.
3091# 2) The path will be absolute, and it will be in unix-style (on
3092#     cygwin).
3093# $1: The name of the variable to fix
3094
3095
3096# This will make sure the given variable points to a executable
3097# with a full and proper path. This means:
3098# 1) There will be no spaces in the path. On posix platforms,
3099#    spaces in the path will result in an error. On Windows,
3100#    the path will be rewritten using short-style to be space-free.
3101# 2) The path will be absolute, and it will be in unix-style (on
3102#     cygwin).
3103# Any arguments given to the executable is preserved.
3104# If the input variable does not have a directory specification, then
3105# it need to be in the PATH.
3106# $1: The name of the variable to fix
3107
3108
3109
3110
3111
3112
3113# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3114# $1: variable to check
3115# $2: executable name to print in warning (optional)
3116
3117
3118# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3119# Arguments as AC_PATH_PROG:
3120# $1: variable to set
3121# $2: executable name to look for
3122
3123
3124# Setup the most fundamental tools that relies on not much else to set up,
3125# but is used by much of the early bootstrap code.
3126
3127
3128# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129
3130
3131
3132
3133
3134
3135
3136#%%% Simple tools %%%
3137
3138# Check if we have found a usable version of make
3139# $1: the path to a potential make binary (or empty)
3140# $2: the description on how we found this
3141
3142
3143# Goes looking for a usable version of GNU make.
3144
3145
3146
3147
3148
3149
3150# Check if build directory is on local disk. If not possible to determine,
3151# we prefer to claim it's local.
3152# Argument 1: directory to test
3153# Argument 2: what to do if it is on local disk
3154# Argument 3: what to do otherwise (remote disk or failure)
3155
3156
3157# Check that source files have basic read permissions set. This might
3158# not be the case in cygwin in certain conditions.
3159
3160
3161
3162
3163#
3164# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3165# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3166#
3167# This code is free software; you can redistribute it and/or modify it
3168# under the terms of the GNU General Public License version 2 only, as
3169# published by the Free Software Foundation.  Oracle designates this
3170# particular file as subject to the "Classpath" exception as provided
3171# by Oracle in the LICENSE file that accompanied this code.
3172#
3173# This code is distributed in the hope that it will be useful, but WITHOUT
3174# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3175# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3176# version 2 for more details (a copy is included in the LICENSE file that
3177# accompanied this code).
3178#
3179# You should have received a copy of the GNU General Public License version
3180# 2 along with this work; if not, write to the Free Software Foundation,
3181# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3182#
3183# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3184# or visit www.oracle.com if you need additional information or have any
3185# questions.
3186#
3187
3188
3189
3190
3191
3192# Helper function which possibly converts a path using DOS-style short mode.
3193# If so, the updated path is stored in $new_path.
3194# $1: The path to check
3195
3196
3197# Helper function which possibly converts a path using DOS-style short mode.
3198# If so, the updated path is stored in $new_path.
3199# $1: The path to check
3200
3201
3202# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3203# and could probably be heavily simplified. However, all changes in this
3204# area tend to need lot of testing in different scenarios, and in lack of
3205# proper unit testing, cleaning this up has not been deemed worth the effort
3206# at the moment.
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3217
3218
3219
3220
3221#
3222# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224#
3225# This code is free software; you can redistribute it and/or modify it
3226# under the terms of the GNU General Public License version 2 only, as
3227# published by the Free Software Foundation.  Oracle designates this
3228# particular file as subject to the "Classpath" exception as provided
3229# by Oracle in the LICENSE file that accompanied this code.
3230#
3231# This code is distributed in the hope that it will be useful, but WITHOUT
3232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234# version 2 for more details (a copy is included in the LICENSE file that
3235# accompanied this code).
3236#
3237# You should have received a copy of the GNU General Public License version
3238# 2 along with this work; if not, write to the Free Software Foundation,
3239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240#
3241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242# or visit www.oracle.com if you need additional information or have any
3243# questions.
3244#
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# ... then the rest
3257#
3258# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260#
3261# This code is free software; you can redistribute it and/or modify it
3262# under the terms of the GNU General Public License version 2 only, as
3263# published by the Free Software Foundation.  Oracle designates this
3264# particular file as subject to the "Classpath" exception as provided
3265# by Oracle in the LICENSE file that accompanied this code.
3266#
3267# This code is distributed in the hope that it will be useful, but WITHOUT
3268# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270# version 2 for more details (a copy is included in the LICENSE file that
3271# accompanied this code).
3272#
3273# You should have received a copy of the GNU General Public License version
3274# 2 along with this work; if not, write to the Free Software Foundation,
3275# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276#
3277# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278# or visit www.oracle.com if you need additional information or have any
3279# questions.
3280#
3281
3282# Execute the check given as argument, and verify the result
3283# If the Boot JDK was previously found, do nothing
3284# $1 A command line (typically autoconf macro) to execute
3285
3286
3287# Test: Is bootjdk explicitely set by command line arguments?
3288
3289
3290# Test: Is bootjdk available from builddeps?
3291
3292
3293# Test: Is $JAVA_HOME set?
3294
3295
3296# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3297
3298
3299# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3300
3301
3302# Look for a jdk in the given path. If there are multiple, try to select the newest.
3303# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3304# $1 = Path to directory containing jdk installations.
3305# $2 = String to append to the found JDK directory to get the proper JDK home
3306
3307
3308# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3309# environmental variable as base for where to look.
3310# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3311
3312
3313# Test: Is there a JDK installed in default, well-known locations?
3314
3315
3316# Check that a command-line tool in the Boot JDK is correct
3317# $1 = name of variable to assign
3318# $2 = name of binary
3319
3320
3321###############################################################################
3322#
3323# We need a Boot JDK to bootstrap the build.
3324#
3325
3326
3327
3328
3329
3330#
3331# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333#
3334# This code is free software; you can redistribute it and/or modify it
3335# under the terms of the GNU General Public License version 2 only, as
3336# published by the Free Software Foundation.  Oracle designates this
3337# particular file as subject to the "Classpath" exception as provided
3338# by Oracle in the LICENSE file that accompanied this code.
3339#
3340# This code is distributed in the hope that it will be useful, but WITHOUT
3341# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343# version 2 for more details (a copy is included in the LICENSE file that
3344# accompanied this code).
3345#
3346# You should have received a copy of the GNU General Public License version
3347# 2 along with this work; if not, write to the Free Software Foundation,
3348# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349#
3350# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351# or visit www.oracle.com if you need additional information or have any
3352# questions.
3353#
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374#
3375# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3376# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3377#
3378# This code is free software; you can redistribute it and/or modify it
3379# under the terms of the GNU General Public License version 2 only, as
3380# published by the Free Software Foundation.  Oracle designates this
3381# particular file as subject to the "Classpath" exception as provided
3382# by Oracle in the LICENSE file that accompanied this code.
3383#
3384# This code is distributed in the hope that it will be useful, but WITHOUT
3385# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3386# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3387# version 2 for more details (a copy is included in the LICENSE file that
3388# accompanied this code).
3389#
3390# You should have received a copy of the GNU General Public License version
3391# 2 along with this work; if not, write to the Free Software Foundation,
3392# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393#
3394# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3395# or visit www.oracle.com if you need additional information or have any
3396# questions.
3397#
3398
3399
3400
3401
3402
3403cygwin_help() {
3404    case $1 in
3405    unzip)
3406        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3407    zip)
3408        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3409    make)
3410        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3411    * )
3412       break ;;
3413    esac
3414}
3415
3416apt_help() {
3417    case $1 in
3418    devkit)
3419        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3420    openjdk)
3421        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3422    alsa)
3423        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3424    cups)
3425        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3426    freetype2)
3427        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3428    pulse)
3429        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3430    x11)
3431        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3432    ccache)
3433        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3434    * )
3435       break ;;
3436    esac
3437}
3438
3439yum_help() {
3440    case $1 in
3441    devkit)
3442        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3443    openjdk)
3444        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3445    alsa)
3446        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3447    cups)
3448        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3449    freetype2)
3450        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3451    pulse)
3452        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3453    x11)
3454        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3455    ccache)
3456        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3457    * )
3458       break ;;
3459    esac
3460}
3461
3462port_help() {
3463    PKGHANDLER_COMMAND=""
3464}
3465
3466pkgutil_help() {
3467    PKGHANDLER_COMMAND=""
3468}
3469
3470pkgadd_help() {
3471    PKGHANDLER_COMMAND=""
3472}
3473
3474
3475
3476#
3477# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501
3502
3503
3504
3505
3506
3507
3508###############################################################################
3509#
3510# Should we build only OpenJDK even if closed sources are present?
3511#
3512
3513
3514
3515
3516###############################################################################
3517#
3518# Setup version numbers
3519#
3520
3521
3522
3523
3524
3525
3526# Support for customization of the build process. Some build files
3527# will include counterparts from this location, if they exist. This allows
3528# for a degree of customization of the build targets and the rules/recipes
3529# to create them
3530
3531# Check whether --with-custom-make-dir was given.
3532if test "${with_custom_make_dir+set}" = set; then :
3533  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3534fi
3535
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577#
3578# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3579# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580#
3581# This code is free software; you can redistribute it and/or modify it
3582# under the terms of the GNU General Public License version 2 only, as
3583# published by the Free Software Foundation.  Oracle designates this
3584# particular file as subject to the "Classpath" exception as provided
3585# by Oracle in the LICENSE file that accompanied this code.
3586#
3587# This code is distributed in the hope that it will be useful, but WITHOUT
3588# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590# version 2 for more details (a copy is included in the LICENSE file that
3591# accompanied this code).
3592#
3593# You should have received a copy of the GNU General Public License version
3594# 2 along with this work; if not, write to the Free Software Foundation,
3595# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596#
3597# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598# or visit www.oracle.com if you need additional information or have any
3599# questions.
3600#
3601
3602# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603# Converts autoconf style CPU name to OpenJDK style, into
3604# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3605
3606
3607# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608# Converts autoconf style OS name to OpenJDK style, into
3609# VAR_OS and VAR_OS_API.
3610
3611
3612# Expects $host_os $host_cpu $build_os and $build_cpu
3613# and $with_target_bits to have been setup!
3614#
3615# Translate the standard triplet(quadruplet) definition
3616# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3617# OPENJDK_BUILD_OS, etc.
3618
3619
3620# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3621# accordingly. Must be done after setting up build and target system, but before
3622# doing anything else with these values.
3623
3624
3625    # Setup the legacy variables, for controlling the old makefiles.
3626    #
3627
3628
3629
3630
3631#%%% Build and target systems %%%
3632
3633
3634
3635
3636# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3637# Add -mX to various FLAGS variables.
3638
3639
3640
3641
3642
3643
3644#
3645# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3646# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3647#
3648# This code is free software; you can redistribute it and/or modify it
3649# under the terms of the GNU General Public License version 2 only, as
3650# published by the Free Software Foundation.  Oracle designates this
3651# particular file as subject to the "Classpath" exception as provided
3652# by Oracle in the LICENSE file that accompanied this code.
3653#
3654# This code is distributed in the hope that it will be useful, but WITHOUT
3655# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3656# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3657# version 2 for more details (a copy is included in the LICENSE file that
3658# accompanied this code).
3659#
3660# You should have received a copy of the GNU General Public License version
3661# 2 along with this work; if not, write to the Free Software Foundation,
3662# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3663#
3664# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3665# or visit www.oracle.com if you need additional information or have any
3666# questions.
3667#
3668
3669
3670
3671
3672
3673
3674
3675
3676#
3677# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3678# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679#
3680# This code is free software; you can redistribute it and/or modify it
3681# under the terms of the GNU General Public License version 2 only, as
3682# published by the Free Software Foundation.  Oracle designates this
3683# particular file as subject to the "Classpath" exception as provided
3684# by Oracle in the LICENSE file that accompanied this code.
3685#
3686# This code is distributed in the hope that it will be useful, but WITHOUT
3687# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689# version 2 for more details (a copy is included in the LICENSE file that
3690# accompanied this code).
3691#
3692# You should have received a copy of the GNU General Public License version
3693# 2 along with this work; if not, write to the Free Software Foundation,
3694# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695#
3696# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697# or visit www.oracle.com if you need additional information or have any
3698# questions.
3699#
3700
3701# $1 = compiler to test (CC or CXX)
3702# $2 = human readable name of compiler (C or C++)
3703
3704
3705
3706
3707
3708# $1 = compiler to test (CC or CXX)
3709# $2 = human readable name of compiler (C or C++)
3710# $3 = list of compiler names to search for
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3725#                                   [RUN-IF-FALSE])
3726# ------------------------------------------------------------
3727# Check that the c and c++ compilers support an argument
3728
3729
3730
3731
3732# Setup the JTREG paths
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764
3765
3766# Check if the VS env variables were setup prior to running configure.
3767# If not, then find vcvarsall.bat and run it automatically, and integrate
3768# the set env variables into the spec file.
3769
3770
3771
3772# Setup the DXSDK paths
3773
3774
3775
3776
3777
3778
3779# This line needs to be here, verbatim, after all includes and the dummy hook
3780# definitions. It is replaced with custom functionality when building
3781# custom sources.
3782#CUSTOM_AUTOCONF_INCLUDE
3783
3784# Do not change or remove the following line, it is needed for consistency checks:
3785DATE_WHEN_GENERATED=1370333982
3786
3787###############################################################################
3788#
3789# Initialization / Boot-strapping
3790#
3791# The bootstrapping process needs to solve the "chicken or the egg" problem,
3792# thus it jumps back and forth, each time gaining something needed later on.
3793#
3794###############################################################################
3795
3796# Basic initialization that must happen first of all
3797
3798# Save the original command line. This is passed to us by the wrapper configure script.
3799
3800DATE_WHEN_CONFIGURED=`LANG=C date`
3801
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3803$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3804{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3805$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3806
3807
3808
3809# Start with tools that do not need have cross compilation support
3810# and can be expected to be found in the default PATH. These tools are
3811# used by configure. Nor are these tools expected to be found in the
3812# devkit from the builddeps server either, since they are
3813# needed to download the devkit.
3814
3815# First are all the simple required tools.
3816
3817    for ac_prog in basename
3818do
3819  # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
3821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
3823if test "${ac_cv_path_BASENAME+set}" = set; then :
3824  $as_echo_n "(cached) " >&6
3825else
3826  case $BASENAME in
3827  [\\/]* | ?:[\\/]*)
3828  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3829  ;;
3830  *)
3831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834  IFS=$as_save_IFS
3835  test -z "$as_dir" && as_dir=.
3836    for ac_exec_ext in '' $ac_executable_extensions; do
3837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840    break 2
3841  fi
3842done
3843  done
3844IFS=$as_save_IFS
3845
3846  ;;
3847esac
3848fi
3849BASENAME=$ac_cv_path_BASENAME
3850if test -n "$BASENAME"; then
3851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3852$as_echo "$BASENAME" >&6; }
3853else
3854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859  test -n "$BASENAME" && break
3860done
3861
3862
3863    if test "x$BASENAME" = x; then
3864        if test "xbasename" = x; then
3865          PROG_NAME=basename
3866        else
3867          PROG_NAME=basename
3868        fi
3869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871        as_fn_error $? "Cannot continue" "$LINENO" 5
3872    fi
3873
3874
3875
3876    for ac_prog in bash
3877do
3878  # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
3882if test "${ac_cv_path_BASH+set}" = set; then :
3883  $as_echo_n "(cached) " >&6
3884else
3885  case $BASH in
3886  [\\/]* | ?:[\\/]*)
3887  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3888  ;;
3889  *)
3890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891for as_dir in $PATH
3892do
3893  IFS=$as_save_IFS
3894  test -z "$as_dir" && as_dir=.
3895    for ac_exec_ext in '' $ac_executable_extensions; do
3896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899    break 2
3900  fi
3901done
3902  done
3903IFS=$as_save_IFS
3904
3905  ;;
3906esac
3907fi
3908BASH=$ac_cv_path_BASH
3909if test -n "$BASH"; then
3910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3911$as_echo "$BASH" >&6; }
3912else
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914$as_echo "no" >&6; }
3915fi
3916
3917
3918  test -n "$BASH" && break
3919done
3920
3921
3922    if test "x$BASH" = x; then
3923        if test "xbash" = x; then
3924          PROG_NAME=bash
3925        else
3926          PROG_NAME=bash
3927        fi
3928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930        as_fn_error $? "Cannot continue" "$LINENO" 5
3931    fi
3932
3933
3934
3935    for ac_prog in cat
3936do
3937  # Extract the first word of "$ac_prog", so it can be a program name with args.
3938set dummy $ac_prog; ac_word=$2
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940$as_echo_n "checking for $ac_word... " >&6; }
3941if test "${ac_cv_path_CAT+set}" = set; then :
3942  $as_echo_n "(cached) " >&6
3943else
3944  case $CAT in
3945  [\\/]* | ?:[\\/]*)
3946  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3947  ;;
3948  *)
3949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950for as_dir in $PATH
3951do
3952  IFS=$as_save_IFS
3953  test -z "$as_dir" && as_dir=.
3954    for ac_exec_ext in '' $ac_executable_extensions; do
3955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958    break 2
3959  fi
3960done
3961  done
3962IFS=$as_save_IFS
3963
3964  ;;
3965esac
3966fi
3967CAT=$ac_cv_path_CAT
3968if test -n "$CAT"; then
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3970$as_echo "$CAT" >&6; }
3971else
3972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974fi
3975
3976
3977  test -n "$CAT" && break
3978done
3979
3980
3981    if test "x$CAT" = x; then
3982        if test "xcat" = x; then
3983          PROG_NAME=cat
3984        else
3985          PROG_NAME=cat
3986        fi
3987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989        as_fn_error $? "Cannot continue" "$LINENO" 5
3990    fi
3991
3992
3993
3994    for ac_prog in chmod
3995do
3996  # Extract the first word of "$ac_prog", so it can be a program name with args.
3997set dummy $ac_prog; ac_word=$2
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CHMOD+set}" = set; then :
4001  $as_echo_n "(cached) " >&6
4002else
4003  case $CHMOD in
4004  [\\/]* | ?:[\\/]*)
4005  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4006  ;;
4007  *)
4008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in $PATH
4010do
4011  IFS=$as_save_IFS
4012  test -z "$as_dir" && as_dir=.
4013    for ac_exec_ext in '' $ac_executable_extensions; do
4014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017    break 2
4018  fi
4019done
4020  done
4021IFS=$as_save_IFS
4022
4023  ;;
4024esac
4025fi
4026CHMOD=$ac_cv_path_CHMOD
4027if test -n "$CHMOD"; then
4028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4029$as_echo "$CHMOD" >&6; }
4030else
4031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
4033fi
4034
4035
4036  test -n "$CHMOD" && break
4037done
4038
4039
4040    if test "x$CHMOD" = x; then
4041        if test "xchmod" = x; then
4042          PROG_NAME=chmod
4043        else
4044          PROG_NAME=chmod
4045        fi
4046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048        as_fn_error $? "Cannot continue" "$LINENO" 5
4049    fi
4050
4051
4052
4053    for ac_prog in cmp
4054do
4055  # Extract the first word of "$ac_prog", so it can be a program name with args.
4056set dummy $ac_prog; ac_word=$2
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if test "${ac_cv_path_CMP+set}" = set; then :
4060  $as_echo_n "(cached) " >&6
4061else
4062  case $CMP in
4063  [\\/]* | ?:[\\/]*)
4064  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4065  ;;
4066  *)
4067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH
4069do
4070  IFS=$as_save_IFS
4071  test -z "$as_dir" && as_dir=.
4072    for ac_exec_ext in '' $ac_executable_extensions; do
4073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076    break 2
4077  fi
4078done
4079  done
4080IFS=$as_save_IFS
4081
4082  ;;
4083esac
4084fi
4085CMP=$ac_cv_path_CMP
4086if test -n "$CMP"; then
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4088$as_echo "$CMP" >&6; }
4089else
4090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
4092fi
4093
4094
4095  test -n "$CMP" && break
4096done
4097
4098
4099    if test "x$CMP" = x; then
4100        if test "xcmp" = x; then
4101          PROG_NAME=cmp
4102        else
4103          PROG_NAME=cmp
4104        fi
4105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107        as_fn_error $? "Cannot continue" "$LINENO" 5
4108    fi
4109
4110
4111
4112    for ac_prog in comm
4113do
4114  # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
4118if test "${ac_cv_path_COMM+set}" = set; then :
4119  $as_echo_n "(cached) " >&6
4120else
4121  case $COMM in
4122  [\\/]* | ?:[\\/]*)
4123  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4124  ;;
4125  *)
4126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in $PATH
4128do
4129  IFS=$as_save_IFS
4130  test -z "$as_dir" && as_dir=.
4131    for ac_exec_ext in '' $ac_executable_extensions; do
4132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135    break 2
4136  fi
4137done
4138  done
4139IFS=$as_save_IFS
4140
4141  ;;
4142esac
4143fi
4144COMM=$ac_cv_path_COMM
4145if test -n "$COMM"; then
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4147$as_echo "$COMM" >&6; }
4148else
4149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
4151fi
4152
4153
4154  test -n "$COMM" && break
4155done
4156
4157
4158    if test "x$COMM" = x; then
4159        if test "xcomm" = x; then
4160          PROG_NAME=comm
4161        else
4162          PROG_NAME=comm
4163        fi
4164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166        as_fn_error $? "Cannot continue" "$LINENO" 5
4167    fi
4168
4169
4170
4171    for ac_prog in cp
4172do
4173  # Extract the first word of "$ac_prog", so it can be a program name with args.
4174set dummy $ac_prog; ac_word=$2
4175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176$as_echo_n "checking for $ac_word... " >&6; }
4177if test "${ac_cv_path_CP+set}" = set; then :
4178  $as_echo_n "(cached) " >&6
4179else
4180  case $CP in
4181  [\\/]* | ?:[\\/]*)
4182  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4183  ;;
4184  *)
4185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188  IFS=$as_save_IFS
4189  test -z "$as_dir" && as_dir=.
4190    for ac_exec_ext in '' $ac_executable_extensions; do
4191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194    break 2
4195  fi
4196done
4197  done
4198IFS=$as_save_IFS
4199
4200  ;;
4201esac
4202fi
4203CP=$ac_cv_path_CP
4204if test -n "$CP"; then
4205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4206$as_echo "$CP" >&6; }
4207else
4208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209$as_echo "no" >&6; }
4210fi
4211
4212
4213  test -n "$CP" && break
4214done
4215
4216
4217    if test "x$CP" = x; then
4218        if test "xcp" = x; then
4219          PROG_NAME=cp
4220        else
4221          PROG_NAME=cp
4222        fi
4223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225        as_fn_error $? "Cannot continue" "$LINENO" 5
4226    fi
4227
4228
4229
4230    for ac_prog in cpio
4231do
4232  # Extract the first word of "$ac_prog", so it can be a program name with args.
4233set dummy $ac_prog; ac_word=$2
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235$as_echo_n "checking for $ac_word... " >&6; }
4236if test "${ac_cv_path_CPIO+set}" = set; then :
4237  $as_echo_n "(cached) " >&6
4238else
4239  case $CPIO in
4240  [\\/]* | ?:[\\/]*)
4241  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4242  ;;
4243  *)
4244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247  IFS=$as_save_IFS
4248  test -z "$as_dir" && as_dir=.
4249    for ac_exec_ext in '' $ac_executable_extensions; do
4250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253    break 2
4254  fi
4255done
4256  done
4257IFS=$as_save_IFS
4258
4259  ;;
4260esac
4261fi
4262CPIO=$ac_cv_path_CPIO
4263if test -n "$CPIO"; then
4264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4265$as_echo "$CPIO" >&6; }
4266else
4267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268$as_echo "no" >&6; }
4269fi
4270
4271
4272  test -n "$CPIO" && break
4273done
4274
4275
4276    if test "x$CPIO" = x; then
4277        if test "xcpio" = x; then
4278          PROG_NAME=cpio
4279        else
4280          PROG_NAME=cpio
4281        fi
4282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284        as_fn_error $? "Cannot continue" "$LINENO" 5
4285    fi
4286
4287
4288
4289    for ac_prog in cut
4290do
4291  # Extract the first word of "$ac_prog", so it can be a program name with args.
4292set dummy $ac_prog; ac_word=$2
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294$as_echo_n "checking for $ac_word... " >&6; }
4295if test "${ac_cv_path_CUT+set}" = set; then :
4296  $as_echo_n "(cached) " >&6
4297else
4298  case $CUT in
4299  [\\/]* | ?:[\\/]*)
4300  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4301  ;;
4302  *)
4303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306  IFS=$as_save_IFS
4307  test -z "$as_dir" && as_dir=.
4308    for ac_exec_ext in '' $ac_executable_extensions; do
4309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312    break 2
4313  fi
4314done
4315  done
4316IFS=$as_save_IFS
4317
4318  ;;
4319esac
4320fi
4321CUT=$ac_cv_path_CUT
4322if test -n "$CUT"; then
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4324$as_echo "$CUT" >&6; }
4325else
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327$as_echo "no" >&6; }
4328fi
4329
4330
4331  test -n "$CUT" && break
4332done
4333
4334
4335    if test "x$CUT" = x; then
4336        if test "xcut" = x; then
4337          PROG_NAME=cut
4338        else
4339          PROG_NAME=cut
4340        fi
4341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343        as_fn_error $? "Cannot continue" "$LINENO" 5
4344    fi
4345
4346
4347
4348    for ac_prog in date
4349do
4350  # Extract the first word of "$ac_prog", so it can be a program name with args.
4351set dummy $ac_prog; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if test "${ac_cv_path_DATE+set}" = set; then :
4355  $as_echo_n "(cached) " >&6
4356else
4357  case $DATE in
4358  [\\/]* | ?:[\\/]*)
4359  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4360  ;;
4361  *)
4362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH
4364do
4365  IFS=$as_save_IFS
4366  test -z "$as_dir" && as_dir=.
4367    for ac_exec_ext in '' $ac_executable_extensions; do
4368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371    break 2
4372  fi
4373done
4374  done
4375IFS=$as_save_IFS
4376
4377  ;;
4378esac
4379fi
4380DATE=$ac_cv_path_DATE
4381if test -n "$DATE"; then
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4383$as_echo "$DATE" >&6; }
4384else
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390  test -n "$DATE" && break
4391done
4392
4393
4394    if test "x$DATE" = x; then
4395        if test "xdate" = x; then
4396          PROG_NAME=date
4397        else
4398          PROG_NAME=date
4399        fi
4400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402        as_fn_error $? "Cannot continue" "$LINENO" 5
4403    fi
4404
4405
4406
4407    for ac_prog in gdiff diff
4408do
4409  # Extract the first word of "$ac_prog", so it can be a program name with args.
4410set dummy $ac_prog; ac_word=$2
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412$as_echo_n "checking for $ac_word... " >&6; }
4413if test "${ac_cv_path_DIFF+set}" = set; then :
4414  $as_echo_n "(cached) " >&6
4415else
4416  case $DIFF in
4417  [\\/]* | ?:[\\/]*)
4418  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4419  ;;
4420  *)
4421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424  IFS=$as_save_IFS
4425  test -z "$as_dir" && as_dir=.
4426    for ac_exec_ext in '' $ac_executable_extensions; do
4427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430    break 2
4431  fi
4432done
4433  done
4434IFS=$as_save_IFS
4435
4436  ;;
4437esac
4438fi
4439DIFF=$ac_cv_path_DIFF
4440if test -n "$DIFF"; then
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4442$as_echo "$DIFF" >&6; }
4443else
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449  test -n "$DIFF" && break
4450done
4451
4452
4453    if test "x$DIFF" = x; then
4454        if test "xgdiff diff" = x; then
4455          PROG_NAME=diff
4456        else
4457          PROG_NAME=gdiff diff
4458        fi
4459        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461        as_fn_error $? "Cannot continue" "$LINENO" 5
4462    fi
4463
4464
4465
4466    for ac_prog in dirname
4467do
4468  # Extract the first word of "$ac_prog", so it can be a program name with args.
4469set dummy $ac_prog; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if test "${ac_cv_path_DIRNAME+set}" = set; then :
4473  $as_echo_n "(cached) " >&6
4474else
4475  case $DIRNAME in
4476  [\\/]* | ?:[\\/]*)
4477  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4478  ;;
4479  *)
4480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH
4482do
4483  IFS=$as_save_IFS
4484  test -z "$as_dir" && as_dir=.
4485    for ac_exec_ext in '' $ac_executable_extensions; do
4486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489    break 2
4490  fi
4491done
4492  done
4493IFS=$as_save_IFS
4494
4495  ;;
4496esac
4497fi
4498DIRNAME=$ac_cv_path_DIRNAME
4499if test -n "$DIRNAME"; then
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4501$as_echo "$DIRNAME" >&6; }
4502else
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507
4508  test -n "$DIRNAME" && break
4509done
4510
4511
4512    if test "x$DIRNAME" = x; then
4513        if test "xdirname" = x; then
4514          PROG_NAME=dirname
4515        else
4516          PROG_NAME=dirname
4517        fi
4518        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520        as_fn_error $? "Cannot continue" "$LINENO" 5
4521    fi
4522
4523
4524
4525    for ac_prog in echo
4526do
4527  # Extract the first word of "$ac_prog", so it can be a program name with args.
4528set dummy $ac_prog; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if test "${ac_cv_path_ECHO+set}" = set; then :
4532  $as_echo_n "(cached) " >&6
4533else
4534  case $ECHO in
4535  [\\/]* | ?:[\\/]*)
4536  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4537  ;;
4538  *)
4539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in $PATH
4541do
4542  IFS=$as_save_IFS
4543  test -z "$as_dir" && as_dir=.
4544    for ac_exec_ext in '' $ac_executable_extensions; do
4545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548    break 2
4549  fi
4550done
4551  done
4552IFS=$as_save_IFS
4553
4554  ;;
4555esac
4556fi
4557ECHO=$ac_cv_path_ECHO
4558if test -n "$ECHO"; then
4559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4560$as_echo "$ECHO" >&6; }
4561else
4562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566
4567  test -n "$ECHO" && break
4568done
4569
4570
4571    if test "x$ECHO" = x; then
4572        if test "xecho" = x; then
4573          PROG_NAME=echo
4574        else
4575          PROG_NAME=echo
4576        fi
4577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579        as_fn_error $? "Cannot continue" "$LINENO" 5
4580    fi
4581
4582
4583
4584    for ac_prog in expr
4585do
4586  # Extract the first word of "$ac_prog", so it can be a program name with args.
4587set dummy $ac_prog; ac_word=$2
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589$as_echo_n "checking for $ac_word... " >&6; }
4590if test "${ac_cv_path_EXPR+set}" = set; then :
4591  $as_echo_n "(cached) " >&6
4592else
4593  case $EXPR in
4594  [\\/]* | ?:[\\/]*)
4595  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4596  ;;
4597  *)
4598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in $PATH
4600do
4601  IFS=$as_save_IFS
4602  test -z "$as_dir" && as_dir=.
4603    for ac_exec_ext in '' $ac_executable_extensions; do
4604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607    break 2
4608  fi
4609done
4610  done
4611IFS=$as_save_IFS
4612
4613  ;;
4614esac
4615fi
4616EXPR=$ac_cv_path_EXPR
4617if test -n "$EXPR"; then
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4619$as_echo "$EXPR" >&6; }
4620else
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622$as_echo "no" >&6; }
4623fi
4624
4625
4626  test -n "$EXPR" && break
4627done
4628
4629
4630    if test "x$EXPR" = x; then
4631        if test "xexpr" = x; then
4632          PROG_NAME=expr
4633        else
4634          PROG_NAME=expr
4635        fi
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638        as_fn_error $? "Cannot continue" "$LINENO" 5
4639    fi
4640
4641
4642
4643    for ac_prog in file
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if test "${ac_cv_path_FILE+set}" = set; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $FILE in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675FILE=$ac_cv_path_FILE
4676if test -n "$FILE"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4678$as_echo "$FILE" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$FILE" && break
4686done
4687
4688
4689    if test "x$FILE" = x; then
4690        if test "xfile" = x; then
4691          PROG_NAME=file
4692        else
4693          PROG_NAME=file
4694        fi
4695        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697        as_fn_error $? "Cannot continue" "$LINENO" 5
4698    fi
4699
4700
4701
4702    for ac_prog in find
4703do
4704  # Extract the first word of "$ac_prog", so it can be a program name with args.
4705set dummy $ac_prog; ac_word=$2
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
4708if test "${ac_cv_path_FIND+set}" = set; then :
4709  $as_echo_n "(cached) " >&6
4710else
4711  case $FIND in
4712  [\\/]* | ?:[\\/]*)
4713  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4714  ;;
4715  *)
4716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719  IFS=$as_save_IFS
4720  test -z "$as_dir" && as_dir=.
4721    for ac_exec_ext in '' $ac_executable_extensions; do
4722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725    break 2
4726  fi
4727done
4728  done
4729IFS=$as_save_IFS
4730
4731  ;;
4732esac
4733fi
4734FIND=$ac_cv_path_FIND
4735if test -n "$FIND"; then
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4737$as_echo "$FIND" >&6; }
4738else
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740$as_echo "no" >&6; }
4741fi
4742
4743
4744  test -n "$FIND" && break
4745done
4746
4747
4748    if test "x$FIND" = x; then
4749        if test "xfind" = x; then
4750          PROG_NAME=find
4751        else
4752          PROG_NAME=find
4753        fi
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756        as_fn_error $? "Cannot continue" "$LINENO" 5
4757    fi
4758
4759
4760
4761    for ac_prog in head
4762do
4763  # Extract the first word of "$ac_prog", so it can be a program name with args.
4764set dummy $ac_prog; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
4767if test "${ac_cv_path_HEAD+set}" = set; then :
4768  $as_echo_n "(cached) " >&6
4769else
4770  case $HEAD in
4771  [\\/]* | ?:[\\/]*)
4772  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4773  ;;
4774  *)
4775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH
4777do
4778  IFS=$as_save_IFS
4779  test -z "$as_dir" && as_dir=.
4780    for ac_exec_ext in '' $ac_executable_extensions; do
4781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784    break 2
4785  fi
4786done
4787  done
4788IFS=$as_save_IFS
4789
4790  ;;
4791esac
4792fi
4793HEAD=$ac_cv_path_HEAD
4794if test -n "$HEAD"; then
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4796$as_echo "$HEAD" >&6; }
4797else
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801
4802
4803  test -n "$HEAD" && break
4804done
4805
4806
4807    if test "x$HEAD" = x; then
4808        if test "xhead" = x; then
4809          PROG_NAME=head
4810        else
4811          PROG_NAME=head
4812        fi
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815        as_fn_error $? "Cannot continue" "$LINENO" 5
4816    fi
4817
4818
4819
4820    for ac_prog in ln
4821do
4822  # Extract the first word of "$ac_prog", so it can be a program name with args.
4823set dummy $ac_prog; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if test "${ac_cv_path_LN+set}" = set; then :
4827  $as_echo_n "(cached) " >&6
4828else
4829  case $LN in
4830  [\\/]* | ?:[\\/]*)
4831  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4832  ;;
4833  *)
4834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837  IFS=$as_save_IFS
4838  test -z "$as_dir" && as_dir=.
4839    for ac_exec_ext in '' $ac_executable_extensions; do
4840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843    break 2
4844  fi
4845done
4846  done
4847IFS=$as_save_IFS
4848
4849  ;;
4850esac
4851fi
4852LN=$ac_cv_path_LN
4853if test -n "$LN"; then
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4855$as_echo "$LN" >&6; }
4856else
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859fi
4860
4861
4862  test -n "$LN" && break
4863done
4864
4865
4866    if test "x$LN" = x; then
4867        if test "xln" = x; then
4868          PROG_NAME=ln
4869        else
4870          PROG_NAME=ln
4871        fi
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874        as_fn_error $? "Cannot continue" "$LINENO" 5
4875    fi
4876
4877
4878
4879    for ac_prog in ls
4880do
4881  # Extract the first word of "$ac_prog", so it can be a program name with args.
4882set dummy $ac_prog; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if test "${ac_cv_path_LS+set}" = set; then :
4886  $as_echo_n "(cached) " >&6
4887else
4888  case $LS in
4889  [\\/]* | ?:[\\/]*)
4890  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4891  ;;
4892  *)
4893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896  IFS=$as_save_IFS
4897  test -z "$as_dir" && as_dir=.
4898    for ac_exec_ext in '' $ac_executable_extensions; do
4899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902    break 2
4903  fi
4904done
4905  done
4906IFS=$as_save_IFS
4907
4908  ;;
4909esac
4910fi
4911LS=$ac_cv_path_LS
4912if test -n "$LS"; then
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4914$as_echo "$LS" >&6; }
4915else
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920
4921  test -n "$LS" && break
4922done
4923
4924
4925    if test "x$LS" = x; then
4926        if test "xls" = x; then
4927          PROG_NAME=ls
4928        else
4929          PROG_NAME=ls
4930        fi
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933        as_fn_error $? "Cannot continue" "$LINENO" 5
4934    fi
4935
4936
4937
4938    for ac_prog in mkdir
4939do
4940  # Extract the first word of "$ac_prog", so it can be a program name with args.
4941set dummy $ac_prog; ac_word=$2
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943$as_echo_n "checking for $ac_word... " >&6; }
4944if test "${ac_cv_path_MKDIR+set}" = set; then :
4945  $as_echo_n "(cached) " >&6
4946else
4947  case $MKDIR in
4948  [\\/]* | ?:[\\/]*)
4949  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4950  ;;
4951  *)
4952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in $PATH
4954do
4955  IFS=$as_save_IFS
4956  test -z "$as_dir" && as_dir=.
4957    for ac_exec_ext in '' $ac_executable_extensions; do
4958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961    break 2
4962  fi
4963done
4964  done
4965IFS=$as_save_IFS
4966
4967  ;;
4968esac
4969fi
4970MKDIR=$ac_cv_path_MKDIR
4971if test -n "$MKDIR"; then
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4973$as_echo "$MKDIR" >&6; }
4974else
4975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980  test -n "$MKDIR" && break
4981done
4982
4983
4984    if test "x$MKDIR" = x; then
4985        if test "xmkdir" = x; then
4986          PROG_NAME=mkdir
4987        else
4988          PROG_NAME=mkdir
4989        fi
4990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992        as_fn_error $? "Cannot continue" "$LINENO" 5
4993    fi
4994
4995
4996
4997    for ac_prog in mktemp
4998do
4999  # Extract the first word of "$ac_prog", so it can be a program name with args.
5000set dummy $ac_prog; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_path_MKTEMP+set}" = set; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $MKTEMP in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029MKTEMP=$ac_cv_path_MKTEMP
5030if test -n "$MKTEMP"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5032$as_echo "$MKTEMP" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039  test -n "$MKTEMP" && break
5040done
5041
5042
5043    if test "x$MKTEMP" = x; then
5044        if test "xmktemp" = x; then
5045          PROG_NAME=mktemp
5046        else
5047          PROG_NAME=mktemp
5048        fi
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051        as_fn_error $? "Cannot continue" "$LINENO" 5
5052    fi
5053
5054
5055
5056    for ac_prog in mv
5057do
5058  # Extract the first word of "$ac_prog", so it can be a program name with args.
5059set dummy $ac_prog; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if test "${ac_cv_path_MV+set}" = set; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $MV in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088MV=$ac_cv_path_MV
5089if test -n "$MV"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5091$as_echo "$MV" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098  test -n "$MV" && break
5099done
5100
5101
5102    if test "x$MV" = x; then
5103        if test "xmv" = x; then
5104          PROG_NAME=mv
5105        else
5106          PROG_NAME=mv
5107        fi
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110        as_fn_error $? "Cannot continue" "$LINENO" 5
5111    fi
5112
5113
5114
5115    for ac_prog in printf
5116do
5117  # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if test "${ac_cv_path_PRINTF+set}" = set; then :
5122  $as_echo_n "(cached) " >&6
5123else
5124  case $PRINTF in
5125  [\\/]* | ?:[\\/]*)
5126  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5127  ;;
5128  *)
5129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132  IFS=$as_save_IFS
5133  test -z "$as_dir" && as_dir=.
5134    for ac_exec_ext in '' $ac_executable_extensions; do
5135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138    break 2
5139  fi
5140done
5141  done
5142IFS=$as_save_IFS
5143
5144  ;;
5145esac
5146fi
5147PRINTF=$ac_cv_path_PRINTF
5148if test -n "$PRINTF"; then
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5150$as_echo "$PRINTF" >&6; }
5151else
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157  test -n "$PRINTF" && break
5158done
5159
5160
5161    if test "x$PRINTF" = x; then
5162        if test "xprintf" = x; then
5163          PROG_NAME=printf
5164        else
5165          PROG_NAME=printf
5166        fi
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169        as_fn_error $? "Cannot continue" "$LINENO" 5
5170    fi
5171
5172
5173
5174    for ac_prog in rm
5175do
5176  # Extract the first word of "$ac_prog", so it can be a program name with args.
5177set dummy $ac_prog; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if test "${ac_cv_path_RM+set}" = set; then :
5181  $as_echo_n "(cached) " >&6
5182else
5183  case $RM in
5184  [\\/]* | ?:[\\/]*)
5185  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186  ;;
5187  *)
5188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191  IFS=$as_save_IFS
5192  test -z "$as_dir" && as_dir=.
5193    for ac_exec_ext in '' $ac_executable_extensions; do
5194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197    break 2
5198  fi
5199done
5200  done
5201IFS=$as_save_IFS
5202
5203  ;;
5204esac
5205fi
5206RM=$ac_cv_path_RM
5207if test -n "$RM"; then
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209$as_echo "$RM" >&6; }
5210else
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
5213fi
5214
5215
5216  test -n "$RM" && break
5217done
5218
5219
5220    if test "x$RM" = x; then
5221        if test "xrm" = x; then
5222          PROG_NAME=rm
5223        else
5224          PROG_NAME=rm
5225        fi
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228        as_fn_error $? "Cannot continue" "$LINENO" 5
5229    fi
5230
5231
5232
5233    for ac_prog in sh
5234do
5235  # Extract the first word of "$ac_prog", so it can be a program name with args.
5236set dummy $ac_prog; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if test "${ac_cv_path_SH+set}" = set; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $SH in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265SH=$ac_cv_path_SH
5266if test -n "$SH"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268$as_echo "$SH" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275  test -n "$SH" && break
5276done
5277
5278
5279    if test "x$SH" = x; then
5280        if test "xsh" = x; then
5281          PROG_NAME=sh
5282        else
5283          PROG_NAME=sh
5284        fi
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287        as_fn_error $? "Cannot continue" "$LINENO" 5
5288    fi
5289
5290
5291
5292    for ac_prog in sort
5293do
5294  # Extract the first word of "$ac_prog", so it can be a program name with args.
5295set dummy $ac_prog; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if test "${ac_cv_path_SORT+set}" = set; then :
5299  $as_echo_n "(cached) " >&6
5300else
5301  case $SORT in
5302  [\\/]* | ?:[\\/]*)
5303  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304  ;;
5305  *)
5306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309  IFS=$as_save_IFS
5310  test -z "$as_dir" && as_dir=.
5311    for ac_exec_ext in '' $ac_executable_extensions; do
5312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315    break 2
5316  fi
5317done
5318  done
5319IFS=$as_save_IFS
5320
5321  ;;
5322esac
5323fi
5324SORT=$ac_cv_path_SORT
5325if test -n "$SORT"; then
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327$as_echo "$SORT" >&6; }
5328else
5329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332
5333
5334  test -n "$SORT" && break
5335done
5336
5337
5338    if test "x$SORT" = x; then
5339        if test "xsort" = x; then
5340          PROG_NAME=sort
5341        else
5342          PROG_NAME=sort
5343        fi
5344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346        as_fn_error $? "Cannot continue" "$LINENO" 5
5347    fi
5348
5349
5350
5351    for ac_prog in tail
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if test "${ac_cv_path_TAIL+set}" = set; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $TAIL in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383TAIL=$ac_cv_path_TAIL
5384if test -n "$TAIL"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386$as_echo "$TAIL" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$TAIL" && break
5394done
5395
5396
5397    if test "x$TAIL" = x; then
5398        if test "xtail" = x; then
5399          PROG_NAME=tail
5400        else
5401          PROG_NAME=tail
5402        fi
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405        as_fn_error $? "Cannot continue" "$LINENO" 5
5406    fi
5407
5408
5409
5410    for ac_prog in tar
5411do
5412  # Extract the first word of "$ac_prog", so it can be a program name with args.
5413set dummy $ac_prog; ac_word=$2
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415$as_echo_n "checking for $ac_word... " >&6; }
5416if test "${ac_cv_path_TAR+set}" = set; then :
5417  $as_echo_n "(cached) " >&6
5418else
5419  case $TAR in
5420  [\\/]* | ?:[\\/]*)
5421  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422  ;;
5423  *)
5424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425for as_dir in $PATH
5426do
5427  IFS=$as_save_IFS
5428  test -z "$as_dir" && as_dir=.
5429    for ac_exec_ext in '' $ac_executable_extensions; do
5430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433    break 2
5434  fi
5435done
5436  done
5437IFS=$as_save_IFS
5438
5439  ;;
5440esac
5441fi
5442TAR=$ac_cv_path_TAR
5443if test -n "$TAR"; then
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445$as_echo "$TAR" >&6; }
5446else
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450
5451
5452  test -n "$TAR" && break
5453done
5454
5455
5456    if test "x$TAR" = x; then
5457        if test "xtar" = x; then
5458          PROG_NAME=tar
5459        else
5460          PROG_NAME=tar
5461        fi
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464        as_fn_error $? "Cannot continue" "$LINENO" 5
5465    fi
5466
5467
5468
5469    for ac_prog in tee
5470do
5471  # Extract the first word of "$ac_prog", so it can be a program name with args.
5472set dummy $ac_prog; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if test "${ac_cv_path_TEE+set}" = set; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $TEE in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501TEE=$ac_cv_path_TEE
5502if test -n "$TEE"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504$as_echo "$TEE" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511  test -n "$TEE" && break
5512done
5513
5514
5515    if test "x$TEE" = x; then
5516        if test "xtee" = x; then
5517          PROG_NAME=tee
5518        else
5519          PROG_NAME=tee
5520        fi
5521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523        as_fn_error $? "Cannot continue" "$LINENO" 5
5524    fi
5525
5526
5527
5528    for ac_prog in touch
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if test "${ac_cv_path_TOUCH+set}" = set; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $TOUCH in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560TOUCH=$ac_cv_path_TOUCH
5561if test -n "$TOUCH"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563$as_echo "$TOUCH" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$TOUCH" && break
5571done
5572
5573
5574    if test "x$TOUCH" = x; then
5575        if test "xtouch" = x; then
5576          PROG_NAME=touch
5577        else
5578          PROG_NAME=touch
5579        fi
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582        as_fn_error $? "Cannot continue" "$LINENO" 5
5583    fi
5584
5585
5586
5587    for ac_prog in tr
5588do
5589  # Extract the first word of "$ac_prog", so it can be a program name with args.
5590set dummy $ac_prog; ac_word=$2
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592$as_echo_n "checking for $ac_word... " >&6; }
5593if test "${ac_cv_path_TR+set}" = set; then :
5594  $as_echo_n "(cached) " >&6
5595else
5596  case $TR in
5597  [\\/]* | ?:[\\/]*)
5598  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599  ;;
5600  *)
5601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602for as_dir in $PATH
5603do
5604  IFS=$as_save_IFS
5605  test -z "$as_dir" && as_dir=.
5606    for ac_exec_ext in '' $ac_executable_extensions; do
5607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610    break 2
5611  fi
5612done
5613  done
5614IFS=$as_save_IFS
5615
5616  ;;
5617esac
5618fi
5619TR=$ac_cv_path_TR
5620if test -n "$TR"; then
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622$as_echo "$TR" >&6; }
5623else
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625$as_echo "no" >&6; }
5626fi
5627
5628
5629  test -n "$TR" && break
5630done
5631
5632
5633    if test "x$TR" = x; then
5634        if test "xtr" = x; then
5635          PROG_NAME=tr
5636        else
5637          PROG_NAME=tr
5638        fi
5639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641        as_fn_error $? "Cannot continue" "$LINENO" 5
5642    fi
5643
5644
5645
5646    for ac_prog in uname
5647do
5648  # Extract the first word of "$ac_prog", so it can be a program name with args.
5649set dummy $ac_prog; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if test "${ac_cv_path_UNAME+set}" = set; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $UNAME in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678UNAME=$ac_cv_path_UNAME
5679if test -n "$UNAME"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681$as_echo "$UNAME" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688  test -n "$UNAME" && break
5689done
5690
5691
5692    if test "x$UNAME" = x; then
5693        if test "xuname" = x; then
5694          PROG_NAME=uname
5695        else
5696          PROG_NAME=uname
5697        fi
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700        as_fn_error $? "Cannot continue" "$LINENO" 5
5701    fi
5702
5703
5704
5705    for ac_prog in uniq
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if test "${ac_cv_path_UNIQ+set}" = set; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $UNIQ in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737UNIQ=$ac_cv_path_UNIQ
5738if test -n "$UNIQ"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740$as_echo "$UNIQ" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$UNIQ" && break
5748done
5749
5750
5751    if test "x$UNIQ" = x; then
5752        if test "xuniq" = x; then
5753          PROG_NAME=uniq
5754        else
5755          PROG_NAME=uniq
5756        fi
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759        as_fn_error $? "Cannot continue" "$LINENO" 5
5760    fi
5761
5762
5763
5764    for ac_prog in wc
5765do
5766  # Extract the first word of "$ac_prog", so it can be a program name with args.
5767set dummy $ac_prog; ac_word=$2
5768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769$as_echo_n "checking for $ac_word... " >&6; }
5770if test "${ac_cv_path_WC+set}" = set; then :
5771  $as_echo_n "(cached) " >&6
5772else
5773  case $WC in
5774  [\\/]* | ?:[\\/]*)
5775  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776  ;;
5777  *)
5778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793  ;;
5794esac
5795fi
5796WC=$ac_cv_path_WC
5797if test -n "$WC"; then
5798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799$as_echo "$WC" >&6; }
5800else
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802$as_echo "no" >&6; }
5803fi
5804
5805
5806  test -n "$WC" && break
5807done
5808
5809
5810    if test "x$WC" = x; then
5811        if test "xwc" = x; then
5812          PROG_NAME=wc
5813        else
5814          PROG_NAME=wc
5815        fi
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818        as_fn_error $? "Cannot continue" "$LINENO" 5
5819    fi
5820
5821
5822
5823    for ac_prog in which
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if test "${ac_cv_path_WHICH+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $WHICH in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855WHICH=$ac_cv_path_WHICH
5856if test -n "$WHICH"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858$as_echo "$WHICH" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$WHICH" && break
5866done
5867
5868
5869    if test "x$WHICH" = x; then
5870        if test "xwhich" = x; then
5871          PROG_NAME=which
5872        else
5873          PROG_NAME=which
5874        fi
5875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877        as_fn_error $? "Cannot continue" "$LINENO" 5
5878    fi
5879
5880
5881
5882    for ac_prog in xargs
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if test "${ac_cv_path_XARGS+set}" = set; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $XARGS in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914XARGS=$ac_cv_path_XARGS
5915if test -n "$XARGS"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917$as_echo "$XARGS" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$XARGS" && break
5925done
5926
5927
5928    if test "x$XARGS" = x; then
5929        if test "xxargs" = x; then
5930          PROG_NAME=xargs
5931        else
5932          PROG_NAME=xargs
5933        fi
5934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936        as_fn_error $? "Cannot continue" "$LINENO" 5
5937    fi
5938
5939
5940
5941# Then required tools that require some special treatment.
5942for ac_prog in gawk mawk nawk awk
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if test "${ac_cv_prog_AWK+set}" = set; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  if test -n "$AWK"; then
5952  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961    ac_cv_prog_AWK="$ac_prog"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AWK=$ac_cv_prog_AWK
5972if test -n "$AWK"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974$as_echo "$AWK" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$AWK" && break
5982done
5983
5984
5985    if test "x$AWK" = x; then
5986        if test "x" = x; then
5987          PROG_NAME=awk
5988        else
5989          PROG_NAME=
5990        fi
5991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993        as_fn_error $? "Cannot continue" "$LINENO" 5
5994    fi
5995
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998if test "${ac_cv_path_GREP+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  if test -z "$GREP"; then
6002  ac_path_GREP_found=false
6003  # Loop through the user's path and test for each of PROGNAME-LIST
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_prog in grep ggrep; do
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013# Check for GNU ac_path_GREP and select it if it is found.
6014  # Check for GNU $ac_path_GREP
6015case `"$ac_path_GREP" --version 2>&1` in
6016*GNU*)
6017  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018*)
6019  ac_count=0
6020  $as_echo_n 0123456789 >"conftest.in"
6021  while :
6022  do
6023    cat "conftest.in" "conftest.in" >"conftest.tmp"
6024    mv "conftest.tmp" "conftest.in"
6025    cp "conftest.in" "conftest.nl"
6026    $as_echo 'GREP' >> "conftest.nl"
6027    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029    as_fn_arith $ac_count + 1 && ac_count=$as_val
6030    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031      # Best one so far, save it but keep looking for a better one
6032      ac_cv_path_GREP="$ac_path_GREP"
6033      ac_path_GREP_max=$ac_count
6034    fi
6035    # 10*(2^10) chars as input seems more than enough
6036    test $ac_count -gt 10 && break
6037  done
6038  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039esac
6040
6041      $ac_path_GREP_found && break 3
6042    done
6043  done
6044  done
6045IFS=$as_save_IFS
6046  if test -z "$ac_cv_path_GREP"; then
6047    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048  fi
6049else
6050  ac_cv_path_GREP=$GREP
6051fi
6052
6053fi
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055$as_echo "$ac_cv_path_GREP" >&6; }
6056 GREP="$ac_cv_path_GREP"
6057
6058
6059
6060    if test "x$GREP" = x; then
6061        if test "x" = x; then
6062          PROG_NAME=grep
6063        else
6064          PROG_NAME=
6065        fi
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068        as_fn_error $? "Cannot continue" "$LINENO" 5
6069    fi
6070
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072$as_echo_n "checking for egrep... " >&6; }
6073if test "${ac_cv_path_EGREP+set}" = set; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077   then ac_cv_path_EGREP="$GREP -E"
6078   else
6079     if test -z "$EGREP"; then
6080  ac_path_EGREP_found=false
6081  # Loop through the user's path and test for each of PROGNAME-LIST
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_prog in egrep; do
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091# Check for GNU ac_path_EGREP and select it if it is found.
6092  # Check for GNU $ac_path_EGREP
6093case `"$ac_path_EGREP" --version 2>&1` in
6094*GNU*)
6095  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096*)
6097  ac_count=0
6098  $as_echo_n 0123456789 >"conftest.in"
6099  while :
6100  do
6101    cat "conftest.in" "conftest.in" >"conftest.tmp"
6102    mv "conftest.tmp" "conftest.in"
6103    cp "conftest.in" "conftest.nl"
6104    $as_echo 'EGREP' >> "conftest.nl"
6105    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107    as_fn_arith $ac_count + 1 && ac_count=$as_val
6108    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109      # Best one so far, save it but keep looking for a better one
6110      ac_cv_path_EGREP="$ac_path_EGREP"
6111      ac_path_EGREP_max=$ac_count
6112    fi
6113    # 10*(2^10) chars as input seems more than enough
6114    test $ac_count -gt 10 && break
6115  done
6116  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117esac
6118
6119      $ac_path_EGREP_found && break 3
6120    done
6121  done
6122  done
6123IFS=$as_save_IFS
6124  if test -z "$ac_cv_path_EGREP"; then
6125    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126  fi
6127else
6128  ac_cv_path_EGREP=$EGREP
6129fi
6130
6131   fi
6132fi
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134$as_echo "$ac_cv_path_EGREP" >&6; }
6135 EGREP="$ac_cv_path_EGREP"
6136
6137
6138
6139    if test "x$EGREP" = x; then
6140        if test "x" = x; then
6141          PROG_NAME=egrep
6142        else
6143          PROG_NAME=
6144        fi
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147        as_fn_error $? "Cannot continue" "$LINENO" 5
6148    fi
6149
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151$as_echo_n "checking for fgrep... " >&6; }
6152if test "${ac_cv_path_FGREP+set}" = set; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156   then ac_cv_path_FGREP="$GREP -F"
6157   else
6158     if test -z "$FGREP"; then
6159  ac_path_FGREP_found=false
6160  # Loop through the user's path and test for each of PROGNAME-LIST
6161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163do
6164  IFS=$as_save_IFS
6165  test -z "$as_dir" && as_dir=.
6166    for ac_prog in fgrep; do
6167    for ac_exec_ext in '' $ac_executable_extensions; do
6168      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170# Check for GNU ac_path_FGREP and select it if it is found.
6171  # Check for GNU $ac_path_FGREP
6172case `"$ac_path_FGREP" --version 2>&1` in
6173*GNU*)
6174  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175*)
6176  ac_count=0
6177  $as_echo_n 0123456789 >"conftest.in"
6178  while :
6179  do
6180    cat "conftest.in" "conftest.in" >"conftest.tmp"
6181    mv "conftest.tmp" "conftest.in"
6182    cp "conftest.in" "conftest.nl"
6183    $as_echo 'FGREP' >> "conftest.nl"
6184    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186    as_fn_arith $ac_count + 1 && ac_count=$as_val
6187    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188      # Best one so far, save it but keep looking for a better one
6189      ac_cv_path_FGREP="$ac_path_FGREP"
6190      ac_path_FGREP_max=$ac_count
6191    fi
6192    # 10*(2^10) chars as input seems more than enough
6193    test $ac_count -gt 10 && break
6194  done
6195  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196esac
6197
6198      $ac_path_FGREP_found && break 3
6199    done
6200  done
6201  done
6202IFS=$as_save_IFS
6203  if test -z "$ac_cv_path_FGREP"; then
6204    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205  fi
6206else
6207  ac_cv_path_FGREP=$FGREP
6208fi
6209
6210   fi
6211fi
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213$as_echo "$ac_cv_path_FGREP" >&6; }
6214 FGREP="$ac_cv_path_FGREP"
6215
6216
6217
6218    if test "x$FGREP" = x; then
6219        if test "x" = x; then
6220          PROG_NAME=fgrep
6221        else
6222          PROG_NAME=
6223        fi
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226        as_fn_error $? "Cannot continue" "$LINENO" 5
6227    fi
6228
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231if test "${ac_cv_path_SED+set}" = set; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235     for ac_i in 1 2 3 4 5 6 7; do
6236       ac_script="$ac_script$as_nl$ac_script"
6237     done
6238     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239     { ac_script=; unset ac_script;}
6240     if test -z "$SED"; then
6241  ac_path_SED_found=false
6242  # Loop through the user's path and test for each of PROGNAME-LIST
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_prog in sed gsed; do
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252# Check for GNU ac_path_SED and select it if it is found.
6253  # Check for GNU $ac_path_SED
6254case `"$ac_path_SED" --version 2>&1` in
6255*GNU*)
6256  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257*)
6258  ac_count=0
6259  $as_echo_n 0123456789 >"conftest.in"
6260  while :
6261  do
6262    cat "conftest.in" "conftest.in" >"conftest.tmp"
6263    mv "conftest.tmp" "conftest.in"
6264    cp "conftest.in" "conftest.nl"
6265    $as_echo '' >> "conftest.nl"
6266    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268    as_fn_arith $ac_count + 1 && ac_count=$as_val
6269    if test $ac_count -gt ${ac_path_SED_max-0}; then
6270      # Best one so far, save it but keep looking for a better one
6271      ac_cv_path_SED="$ac_path_SED"
6272      ac_path_SED_max=$ac_count
6273    fi
6274    # 10*(2^10) chars as input seems more than enough
6275    test $ac_count -gt 10 && break
6276  done
6277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278esac
6279
6280      $ac_path_SED_found && break 3
6281    done
6282  done
6283  done
6284IFS=$as_save_IFS
6285  if test -z "$ac_cv_path_SED"; then
6286    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287  fi
6288else
6289  ac_cv_path_SED=$SED
6290fi
6291
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294$as_echo "$ac_cv_path_SED" >&6; }
6295 SED="$ac_cv_path_SED"
6296  rm -f conftest.sed
6297
6298
6299    if test "x$SED" = x; then
6300        if test "x" = x; then
6301          PROG_NAME=sed
6302        else
6303          PROG_NAME=
6304        fi
6305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307        as_fn_error $? "Cannot continue" "$LINENO" 5
6308    fi
6309
6310
6311for ac_prog in nawk gawk awk
6312do
6313  # Extract the first word of "$ac_prog", so it can be a program name with args.
6314set dummy $ac_prog; ac_word=$2
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316$as_echo_n "checking for $ac_word... " >&6; }
6317if test "${ac_cv_path_NAWK+set}" = set; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  case $NAWK in
6321  [\\/]* | ?:[\\/]*)
6322  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323  ;;
6324  *)
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334    break 2
6335  fi
6336done
6337  done
6338IFS=$as_save_IFS
6339
6340  ;;
6341esac
6342fi
6343NAWK=$ac_cv_path_NAWK
6344if test -n "$NAWK"; then
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346$as_echo "$NAWK" >&6; }
6347else
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
6350fi
6351
6352
6353  test -n "$NAWK" && break
6354done
6355
6356
6357    if test "x$NAWK" = x; then
6358        if test "x" = x; then
6359          PROG_NAME=nawk
6360        else
6361          PROG_NAME=
6362        fi
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365        as_fn_error $? "Cannot continue" "$LINENO" 5
6366    fi
6367
6368
6369# Always force rm.
6370RM="$RM -f"
6371
6372# pwd behaves differently on various platforms and some don't support the -L flag.
6373# Always use the bash builtin pwd to get uniform behavior.
6374THEPWDCMD=pwd
6375
6376# These are not required on all platforms
6377# Extract the first word of "cygpath", so it can be a program name with args.
6378set dummy cygpath; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if test "${ac_cv_path_CYGPATH+set}" = set; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CYGPATH in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6396    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CYGPATH=$ac_cv_path_CYGPATH
6408if test -n "$CYGPATH"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6410$as_echo "$CYGPATH" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417# Extract the first word of "readlink", so it can be a program name with args.
6418set dummy readlink; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if test "${ac_cv_path_READLINK+set}" = set; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $READLINK in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6436    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447READLINK=$ac_cv_path_READLINK
6448if test -n "$READLINK"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6450$as_echo "$READLINK" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457# Extract the first word of "df", so it can be a program name with args.
6458set dummy df; ac_word=$2
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460$as_echo_n "checking for $ac_word... " >&6; }
6461if test "${ac_cv_path_DF+set}" = set; then :
6462  $as_echo_n "(cached) " >&6
6463else
6464  case $DF in
6465  [\\/]* | ?:[\\/]*)
6466  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6467  ;;
6468  *)
6469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470for as_dir in $PATH
6471do
6472  IFS=$as_save_IFS
6473  test -z "$as_dir" && as_dir=.
6474    for ac_exec_ext in '' $ac_executable_extensions; do
6475  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6476    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478    break 2
6479  fi
6480done
6481  done
6482IFS=$as_save_IFS
6483
6484  ;;
6485esac
6486fi
6487DF=$ac_cv_path_DF
6488if test -n "$DF"; then
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6490$as_echo "$DF" >&6; }
6491else
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; }
6494fi
6495
6496
6497# Extract the first word of "SetFile", so it can be a program name with args.
6498set dummy SetFile; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if test "${ac_cv_path_SETFILE+set}" = set; then :
6502  $as_echo_n "(cached) " >&6
6503else
6504  case $SETFILE in
6505  [\\/]* | ?:[\\/]*)
6506  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6507  ;;
6508  *)
6509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in $PATH
6511do
6512  IFS=$as_save_IFS
6513  test -z "$as_dir" && as_dir=.
6514    for ac_exec_ext in '' $ac_executable_extensions; do
6515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6516    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518    break 2
6519  fi
6520done
6521  done
6522IFS=$as_save_IFS
6523
6524  ;;
6525esac
6526fi
6527SETFILE=$ac_cv_path_SETFILE
6528if test -n "$SETFILE"; then
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6530$as_echo "$SETFILE" >&6; }
6531else
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
6537
6538
6539# Now we can determine OpenJDK build and target platforms. This is required to
6540# have early on.
6541# Make sure we can run config.sub.
6542$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6543  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6544
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6546$as_echo_n "checking build system type... " >&6; }
6547if test "${ac_cv_build+set}" = set; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  ac_build_alias=$build_alias
6551test "x$ac_build_alias" = x &&
6552  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6553test "x$ac_build_alias" = x &&
6554  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6555ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6556  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6557
6558fi
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6560$as_echo "$ac_cv_build" >&6; }
6561case $ac_cv_build in
6562*-*-*) ;;
6563*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6564esac
6565build=$ac_cv_build
6566ac_save_IFS=$IFS; IFS='-'
6567set x $ac_cv_build
6568shift
6569build_cpu=$1
6570build_vendor=$2
6571shift; shift
6572# Remember, the first character of IFS is used to create $*,
6573# except with old shells:
6574build_os=$*
6575IFS=$ac_save_IFS
6576case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6577
6578
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6580$as_echo_n "checking host system type... " >&6; }
6581if test "${ac_cv_host+set}" = set; then :
6582  $as_echo_n "(cached) " >&6
6583else
6584  if test "x$host_alias" = x; then
6585  ac_cv_host=$ac_cv_build
6586else
6587  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6588    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6589fi
6590
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6593$as_echo "$ac_cv_host" >&6; }
6594case $ac_cv_host in
6595*-*-*) ;;
6596*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6597esac
6598host=$ac_cv_host
6599ac_save_IFS=$IFS; IFS='-'
6600set x $ac_cv_host
6601shift
6602host_cpu=$1
6603host_vendor=$2
6604shift; shift
6605# Remember, the first character of IFS is used to create $*,
6606# except with old shells:
6607host_os=$*
6608IFS=$ac_save_IFS
6609case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6610
6611
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6613$as_echo_n "checking target system type... " >&6; }
6614if test "${ac_cv_target+set}" = set; then :
6615  $as_echo_n "(cached) " >&6
6616else
6617  if test "x$target_alias" = x; then
6618  ac_cv_target=$ac_cv_host
6619else
6620  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6621    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6622fi
6623
6624fi
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6626$as_echo "$ac_cv_target" >&6; }
6627case $ac_cv_target in
6628*-*-*) ;;
6629*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6630esac
6631target=$ac_cv_target
6632ac_save_IFS=$IFS; IFS='-'
6633set x $ac_cv_target
6634shift
6635target_cpu=$1
6636target_vendor=$2
6637shift; shift
6638# Remember, the first character of IFS is used to create $*,
6639# except with old shells:
6640target_os=$*
6641IFS=$ac_save_IFS
6642case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6643
6644
6645# The aliases save the names the user supplied, while $host etc.
6646# will get canonicalized.
6647test -n "$target_alias" &&
6648  test "$program_prefix$program_suffix$program_transform_name" = \
6649    NONENONEs,x,x, &&
6650  program_prefix=${target_alias}-
6651
6652# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6653# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6654# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6655# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6656# to use the configure naming style.
6657
6658
6659
6660
6661
6662    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6663    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6664    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6665    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6666    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6667    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6668
6669
6670
6671    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6672
6673  case "$build_os" in
6674    *linux*)
6675      VAR_OS=linux
6676      VAR_OS_API=posix
6677      VAR_OS_ENV=linux
6678      ;;
6679    *solaris*)
6680      VAR_OS=solaris
6681      VAR_OS_API=posix
6682      VAR_OS_ENV=solaris
6683      ;;
6684    *darwin*)
6685      VAR_OS=macosx
6686      VAR_OS_API=posix
6687      VAR_OS_ENV=macosx
6688      ;;
6689    *bsd*)
6690      VAR_OS=bsd
6691      VAR_OS_API=posix
6692      VAR_OS_ENV=bsd
6693      ;;
6694    *cygwin*)
6695      VAR_OS=windows
6696      VAR_OS_API=winapi
6697      VAR_OS_ENV=windows.cygwin
6698      ;;
6699    *mingw*)
6700      VAR_OS=windows
6701      VAR_OS_API=winapi
6702      VAR_OS_ENV=windows.msys
6703      ;;
6704    *)
6705      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6706      ;;
6707  esac
6708
6709
6710  # First argument is the cpu name from the trip/quad
6711  case "$build_cpu" in
6712    x86_64)
6713      VAR_CPU=x86_64
6714      VAR_CPU_ARCH=x86
6715      VAR_CPU_BITS=64
6716      VAR_CPU_ENDIAN=little
6717      ;;
6718    i?86)
6719      VAR_CPU=x86
6720      VAR_CPU_ARCH=x86
6721      VAR_CPU_BITS=32
6722      VAR_CPU_ENDIAN=little
6723      ;;
6724    arm*)
6725      VAR_CPU=arm
6726      VAR_CPU_ARCH=arm
6727      VAR_CPU_BITS=32
6728      VAR_CPU_ENDIAN=little
6729      ;;
6730    powerpc)
6731      VAR_CPU=ppc
6732      VAR_CPU_ARCH=ppc
6733      VAR_CPU_BITS=32
6734      VAR_CPU_ENDIAN=big
6735       ;;
6736    powerpc64)
6737      VAR_CPU=ppc64
6738      VAR_CPU_ARCH=ppc
6739      VAR_CPU_BITS=64
6740      VAR_CPU_ENDIAN=big
6741       ;;
6742    sparc)
6743      VAR_CPU=sparc
6744      VAR_CPU_ARCH=sparc
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=big
6747       ;;
6748    sparcv9)
6749      VAR_CPU=sparcv9
6750      VAR_CPU_ARCH=sparc
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    *)
6755      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6756      ;;
6757  esac
6758
6759    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6760    OPENJDK_BUILD_OS="$VAR_OS"
6761    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6762    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6763    OPENJDK_BUILD_CPU="$VAR_CPU"
6764    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6765    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6766    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6767
6768
6769
6770
6771
6772
6773
6774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6775$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6777$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6778
6779    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6780
6781  case "$host_os" in
6782    *linux*)
6783      VAR_OS=linux
6784      VAR_OS_API=posix
6785      VAR_OS_ENV=linux
6786      ;;
6787    *solaris*)
6788      VAR_OS=solaris
6789      VAR_OS_API=posix
6790      VAR_OS_ENV=solaris
6791      ;;
6792    *darwin*)
6793      VAR_OS=macosx
6794      VAR_OS_API=posix
6795      VAR_OS_ENV=macosx
6796      ;;
6797    *bsd*)
6798      VAR_OS=bsd
6799      VAR_OS_API=posix
6800      VAR_OS_ENV=bsd
6801      ;;
6802    *cygwin*)
6803      VAR_OS=windows
6804      VAR_OS_API=winapi
6805      VAR_OS_ENV=windows.cygwin
6806      ;;
6807    *mingw*)
6808      VAR_OS=windows
6809      VAR_OS_API=winapi
6810      VAR_OS_ENV=windows.msys
6811      ;;
6812    *)
6813      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6814      ;;
6815  esac
6816
6817
6818  # First argument is the cpu name from the trip/quad
6819  case "$host_cpu" in
6820    x86_64)
6821      VAR_CPU=x86_64
6822      VAR_CPU_ARCH=x86
6823      VAR_CPU_BITS=64
6824      VAR_CPU_ENDIAN=little
6825      ;;
6826    i?86)
6827      VAR_CPU=x86
6828      VAR_CPU_ARCH=x86
6829      VAR_CPU_BITS=32
6830      VAR_CPU_ENDIAN=little
6831      ;;
6832    arm*)
6833      VAR_CPU=arm
6834      VAR_CPU_ARCH=arm
6835      VAR_CPU_BITS=32
6836      VAR_CPU_ENDIAN=little
6837      ;;
6838    powerpc)
6839      VAR_CPU=ppc
6840      VAR_CPU_ARCH=ppc
6841      VAR_CPU_BITS=32
6842      VAR_CPU_ENDIAN=big
6843       ;;
6844    powerpc64)
6845      VAR_CPU=ppc64
6846      VAR_CPU_ARCH=ppc
6847      VAR_CPU_BITS=64
6848      VAR_CPU_ENDIAN=big
6849       ;;
6850    sparc)
6851      VAR_CPU=sparc
6852      VAR_CPU_ARCH=sparc
6853      VAR_CPU_BITS=32
6854      VAR_CPU_ENDIAN=big
6855       ;;
6856    sparcv9)
6857      VAR_CPU=sparcv9
6858      VAR_CPU_ARCH=sparc
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    *)
6863      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6864      ;;
6865  esac
6866
6867    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6868    OPENJDK_TARGET_OS="$VAR_OS"
6869    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6870    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6871    OPENJDK_TARGET_CPU="$VAR_CPU"
6872    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6873    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6874    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6875
6876
6877
6878
6879
6880
6881
6882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6883$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6885$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6886
6887
6888
6889# Check whether --with-target-bits was given.
6890if test "${with_target_bits+set}" = set; then :
6891  withval=$with_target_bits;
6892fi
6893
6894
6895  # We have three types of compiles:
6896  # native  == normal compilation, target system == build system
6897  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6898  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6899  #
6900  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6901    # We're doing a proper cross-compilation
6902    COMPILE_TYPE="cross"
6903  else
6904    COMPILE_TYPE="native"
6905  fi
6906
6907  if test "x$with_target_bits" != x; then
6908    if test "x$COMPILE_TYPE" = "xcross"; then
6909      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6910    fi
6911
6912    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6913      # A reduced build is requested
6914      COMPILE_TYPE="reduced"
6915      OPENJDK_TARGET_CPU_BITS=32
6916      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6917        OPENJDK_TARGET_CPU=x86
6918      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6919        OPENJDK_TARGET_CPU=sparc
6920      else
6921        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6922      fi
6923    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6924      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
6925    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6926      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6927$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6928    else
6929      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6930    fi
6931  fi
6932
6933
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6935$as_echo_n "checking compilation type... " >&6; }
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6937$as_echo "$COMPILE_TYPE" >&6; }
6938
6939
6940    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6941       REQUIRED_OS_NAME=SunOS
6942       REQUIRED_OS_VERSION=5.10
6943    fi
6944    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6945       REQUIRED_OS_NAME=Linux
6946       REQUIRED_OS_VERSION=2.6
6947    fi
6948    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6949        REQUIRED_OS_NAME=Windows
6950        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6951            REQUIRED_OS_VERSION=5.2
6952        else
6953            REQUIRED_OS_VERSION=5.1
6954        fi
6955    fi
6956    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6957        REQUIRED_OS_NAME=Darwin
6958        REQUIRED_OS_VERSION=11.2
6959    fi
6960
6961
6962
6963
6964
6965    # Also store the legacy naming of the cpu.
6966    # Ie i586 and amd64 instead of x86 and x86_64
6967    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6968    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6969      OPENJDK_TARGET_CPU_LEGACY="i586"
6970    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971      # On all platforms except MacOSX replace x86_64 with amd64.
6972      OPENJDK_TARGET_CPU_LEGACY="amd64"
6973    fi
6974
6975
6976    # And the second legacy naming of the cpu.
6977    # Ie i386 and amd64 instead of x86 and x86_64.
6978    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6979    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6981    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6983    fi
6984
6985
6986    # This is the name of the cpu (but using i386 and amd64 instead of
6987    # x86 and x86_64, respectively), preceeded by a /, to be used when
6988    # locating libraries. On macosx, it's empty, though.
6989    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6990    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6991        OPENJDK_TARGET_CPU_LIBDIR=""
6992    fi
6993
6994
6995    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6996    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6997    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6998    OPENJDK_TARGET_CPU_ISADIR=""
6999    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7001          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7002      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7003          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7004      fi
7005    fi
7006
7007
7008    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7009    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7010    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7011      # On linux only, we replace x86 with i386.
7012      OPENJDK_TARGET_CPU_OSARCH="i386"
7013    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7014      # On all platforms except macosx, we replace x86_64 with amd64.
7015      OPENJDK_TARGET_CPU_OSARCH="amd64"
7016    fi
7017
7018
7019    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7020    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7021      OPENJDK_TARGET_CPU_JLI="i386"
7022    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023      # On all platforms except macosx, we replace x86_64 with amd64.
7024      OPENJDK_TARGET_CPU_JLI="amd64"
7025    fi
7026    # Now setup the -D flags for building libjli.
7027    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7028    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7030        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7031      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7032        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7033      fi
7034    fi
7035
7036
7037    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7038    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7039        OPENJDK_TARGET_OS_API_DIR="solaris"
7040    fi
7041    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7042        OPENJDK_TARGET_OS_API_DIR="windows"
7043    fi
7044
7045
7046    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7047        A_LP64="LP64:="
7048        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7049        # unpack200.exe
7050        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051            ADD_LP64="-D_LP64=1"
7052        fi
7053    fi
7054    LP64=$A_LP64
7055
7056
7057    if test "x$COMPILE_TYPE" = "xcross"; then
7058      # FIXME: ... or should this include reduced builds..?
7059      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7060    else
7061      DEFINE_CROSS_COMPILE_ARCH=""
7062    fi
7063
7064
7065    # ZERO_ARCHDEF is used to enable architecture-specific code
7066    case "${OPENJDK_TARGET_CPU}" in
7067      ppc*)    ZERO_ARCHDEF=PPC   ;;
7068      s390*)   ZERO_ARCHDEF=S390  ;;
7069      sparc*)  ZERO_ARCHDEF=SPARC ;;
7070      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7071      x86)     ZERO_ARCHDEF=IA32  ;;
7072      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7073    esac
7074
7075
7076
7077
7078
7079# Continue setting up basic stuff. Most remaining code require fundamental tools.
7080
7081# Locate the directory of this script.
7082SCRIPT="$0"
7083AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7084
7085# Where is the source? It is located two levels above the configure script.
7086CURDIR="$PWD"
7087cd "$AUTOCONF_DIR/../.."
7088SRC_ROOT="`$THEPWDCMD -L`"
7089
7090if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7091  PATH_SEP=";"
7092
7093  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7094  if test $SRC_ROOT_LENGTH -gt 100; then
7095      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7096  fi
7097
7098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7100$as_echo_n "checking cygwin release... " >&6; }
7101    CYGWIN_VERSION=`$UNAME -r`
7102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7103$as_echo "$CYGWIN_VERSION" >&6; }
7104    WINDOWS_ENV_VENDOR='cygwin'
7105    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7106
7107    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7108    if test "x$CYGWIN_VERSION_OK" = x; then
7109      { $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
7110$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;}
7111      as_fn_error $? "Cannot continue" "$LINENO" 5
7112    fi
7113    if test "x$CYGPATH" = x; then
7114        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7115    fi
7116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7117$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7118    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7119    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7120    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7121    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7123$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7124    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7125    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7126    if test "x$test_cygdrive_prefix" = x; then
7127        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7128    fi
7129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7131$as_echo_n "checking msys release... " >&6; }
7132    MSYS_VERSION=`$UNAME -r`
7133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7134$as_echo "$MSYS_VERSION" >&6; }
7135
7136    WINDOWS_ENV_VENDOR='msys'
7137    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7138
7139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7140$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7141    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7142    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7143
7144  windows_path="$MSYS_ROOT_PATH"
7145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146    unix_path=`$CYGPATH -u "$windows_path"`
7147    MSYS_ROOT_PATH="$unix_path"
7148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7150    MSYS_ROOT_PATH="$unix_path"
7151  fi
7152
7153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7154$as_echo "$MSYS_ROOT_PATH" >&6; }
7155    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7156  else
7157    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7158  fi
7159
7160  # Test if windows or unix (cygwin/msys) find is first in path.
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7162$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7163  FIND_BINARY_OUTPUT=`find --version 2>&1`
7164  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7166$as_echo "unix style" >&6; }
7167  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7169$as_echo "Windows" >&6; }
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7171$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7172    { $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
7173$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7174    as_fn_error $? "Cannot continue" "$LINENO" 5
7175  else
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7177$as_echo "unknown" >&6; }
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7179$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7180  fi
7181
7182else
7183  PATH_SEP=":"
7184fi
7185
7186
7187
7188cd "$CURDIR"
7189
7190
7191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192
7193  # Input might be given as Windows format, start by converting to
7194  # unix format.
7195  path="$SRC_ROOT"
7196  new_path=`$CYGPATH -u "$path"`
7197
7198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7201  # "foo.exe" is OK but "foo" is an error.
7202  #
7203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7204  # It is also a way to make sure we got the proper file name for the real test later on.
7205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7206  if test "x$test_shortpath" = x; then
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7208$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7209    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7210  fi
7211
7212  # Call helper function which possibly converts this using DOS-style short mode.
7213  # If so, the updated path is stored in $new_path.
7214
7215  input_path="$new_path"
7216  # Check if we need to convert this using DOS-style short mode. If the path
7217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7218  # take no chances and rewrite it.
7219  # Note: m4 eats our [], so we need to use [ and ] instead.
7220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7221  if test "x$has_forbidden_chars" != x; then
7222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7226      # Going to short mode and back again did indeed matter. Since short mode is
7227      # case insensitive, let's make it lowercase to improve readability.
7228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7229      # Now convert it back to Unix-stile (cygpath)
7230      input_path=`$CYGPATH -u "$shortmode_path"`
7231      new_path="$input_path"
7232    fi
7233  fi
7234
7235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7236  if test "x$test_cygdrive_prefix" = x; then
7237    # As a simple fix, exclude /usr/bin since it's not a real path.
7238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7240      # a path prefixed by /cygdrive for fixpath to work.
7241      new_path="$CYGWIN_ROOT_PATH$input_path"
7242    fi
7243  fi
7244
7245
7246  if test "x$path" != "x$new_path"; then
7247    SRC_ROOT="$new_path"
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7249$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7250  fi
7251
7252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7253
7254  path="$SRC_ROOT"
7255  has_colon=`$ECHO $path | $GREP ^.:`
7256  new_path="$path"
7257  if test "x$has_colon" = x; then
7258    # Not in mixed or Windows style, start by that.
7259    new_path=`cmd //c echo $path`
7260  fi
7261
7262
7263  input_path="$new_path"
7264  # Check if we need to convert this using DOS-style short mode. If the path
7265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266  # take no chances and rewrite it.
7267  # Note: m4 eats our [], so we need to use [ and ] instead.
7268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7269  if test "x$has_forbidden_chars" != x; then
7270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7272  fi
7273
7274
7275  windows_path="$new_path"
7276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7277    unix_path=`$CYGPATH -u "$windows_path"`
7278    new_path="$unix_path"
7279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7281    new_path="$unix_path"
7282  fi
7283
7284  if test "x$path" != "x$new_path"; then
7285    SRC_ROOT="$new_path"
7286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288  fi
7289
7290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7292
7293  else
7294    # We're on a posix platform. Hooray! :)
7295    path="$SRC_ROOT"
7296    has_space=`$ECHO "$path" | $GREP " "`
7297    if test "x$has_space" != x; then
7298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301    fi
7302
7303    # Use eval to expand a potential ~
7304    eval path="$path"
7305    if test ! -f "$path" && test ! -d "$path"; then
7306      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7307    fi
7308
7309    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7310  fi
7311
7312
7313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7314
7315  # Input might be given as Windows format, start by converting to
7316  # unix format.
7317  path="$CURDIR"
7318  new_path=`$CYGPATH -u "$path"`
7319
7320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7323  # "foo.exe" is OK but "foo" is an error.
7324  #
7325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7326  # It is also a way to make sure we got the proper file name for the real test later on.
7327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7328  if test "x$test_shortpath" = x; then
7329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7330$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7331    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7332  fi
7333
7334  # Call helper function which possibly converts this using DOS-style short mode.
7335  # If so, the updated path is stored in $new_path.
7336
7337  input_path="$new_path"
7338  # Check if we need to convert this using DOS-style short mode. If the path
7339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7340  # take no chances and rewrite it.
7341  # Note: m4 eats our [], so we need to use [ and ] instead.
7342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7343  if test "x$has_forbidden_chars" != x; then
7344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7348      # Going to short mode and back again did indeed matter. Since short mode is
7349      # case insensitive, let's make it lowercase to improve readability.
7350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7351      # Now convert it back to Unix-stile (cygpath)
7352      input_path=`$CYGPATH -u "$shortmode_path"`
7353      new_path="$input_path"
7354    fi
7355  fi
7356
7357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7358  if test "x$test_cygdrive_prefix" = x; then
7359    # As a simple fix, exclude /usr/bin since it's not a real path.
7360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7362      # a path prefixed by /cygdrive for fixpath to work.
7363      new_path="$CYGWIN_ROOT_PATH$input_path"
7364    fi
7365  fi
7366
7367
7368  if test "x$path" != "x$new_path"; then
7369    CURDIR="$new_path"
7370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7371$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7372  fi
7373
7374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375
7376  path="$CURDIR"
7377  has_colon=`$ECHO $path | $GREP ^.:`
7378  new_path="$path"
7379  if test "x$has_colon" = x; then
7380    # Not in mixed or Windows style, start by that.
7381    new_path=`cmd //c echo $path`
7382  fi
7383
7384
7385  input_path="$new_path"
7386  # Check if we need to convert this using DOS-style short mode. If the path
7387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388  # take no chances and rewrite it.
7389  # Note: m4 eats our [], so we need to use [ and ] instead.
7390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7391  if test "x$has_forbidden_chars" != x; then
7392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7394  fi
7395
7396
7397  windows_path="$new_path"
7398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7399    unix_path=`$CYGPATH -u "$windows_path"`
7400    new_path="$unix_path"
7401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7403    new_path="$unix_path"
7404  fi
7405
7406  if test "x$path" != "x$new_path"; then
7407    CURDIR="$new_path"
7408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410  fi
7411
7412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7414
7415  else
7416    # We're on a posix platform. Hooray! :)
7417    path="$CURDIR"
7418    has_space=`$ECHO "$path" | $GREP " "`
7419    if test "x$has_space" != x; then
7420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7423    fi
7424
7425    # Use eval to expand a potential ~
7426    eval path="$path"
7427    if test ! -f "$path" && test ! -d "$path"; then
7428      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7429    fi
7430
7431    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7432  fi
7433
7434
7435if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436    # Add extra search paths on solaris for utilities like ar and as etc...
7437    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438fi
7439
7440# You can force the sys-root if the sys-root encoded into the cross compiler tools
7441# is not correct.
7442
7443# Check whether --with-sys-root was given.
7444if test "${with_sys_root+set}" = set; then :
7445  withval=$with_sys_root;
7446fi
7447
7448
7449if test "x$with_sys_root" != x; then
7450  SYS_ROOT=$with_sys_root
7451else
7452  SYS_ROOT=/
7453fi
7454
7455
7456
7457# Check whether --with-tools-dir was given.
7458if test "${with_tools_dir+set}" = set; then :
7459  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460fi
7461
7462
7463
7464# Check whether --with-devkit was given.
7465if test "${with_devkit+set}" = set; then :
7466  withval=$with_devkit;
7467    if test "x$with_sys_root" != x; then
7468      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469    fi
7470    if test "x$with_tools_dir" != x; then
7471      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472    fi
7473    TOOLS_DIR=$with_devkit/bin
7474    SYS_ROOT=$with_devkit/$host_alias/libc
7475
7476fi
7477
7478
7479
7480
7481# Setup default logging of stdout and stderr to build.log in the output root.
7482BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7483BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7484BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7485
7486
7487
7488
7489
7490# Check if it's a pure open build or if custom sources are to be used.
7491
7492  # Check whether --enable-openjdk-only was given.
7493if test "${enable_openjdk_only+set}" = set; then :
7494  enableval=$enable_openjdk_only;
7495else
7496  enable_openjdk_only="no"
7497fi
7498
7499
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7501$as_echo_n "checking for presence of closed sources... " >&6; }
7502  if test -d "$SRC_ROOT/jdk/src/closed"; then
7503    CLOSED_SOURCE_PRESENT=yes
7504  else
7505    CLOSED_SOURCE_PRESENT=no
7506  fi
7507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7508$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7509
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7511$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7512  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7514$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7515
7516  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7517    OPENJDK=true
7518    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7519      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7520$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7521    fi
7522  else
7523    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7524      OPENJDK=true
7525    else
7526      OPENJDK=false
7527    fi
7528  fi
7529
7530  if test "x$OPENJDK" = "xtrue"; then
7531    SET_OPENJDK="OPENJDK=true"
7532  fi
7533
7534
7535
7536
7537# These are needed to be able to create a configuration name (and thus the output directory)
7538
7539###############################################################################
7540#
7541# Check which variant of the JDK that we want to build.
7542# Currently we have:
7543#    normal:   standard edition
7544# but the custom make system may add other variants
7545#
7546# Effectively the JDK variant gives a name to a specific set of
7547# modules to compile into the JDK. In the future, these modules
7548# might even be Jigsaw modules.
7549#
7550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7551$as_echo_n "checking which variant of the JDK to build... " >&6; }
7552
7553# Check whether --with-jdk-variant was given.
7554if test "${with_jdk_variant+set}" = set; then :
7555  withval=$with_jdk_variant;
7556fi
7557
7558
7559if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7560    JDK_VARIANT="normal"
7561else
7562    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7563fi
7564
7565
7566
7567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7568$as_echo "$JDK_VARIANT" >&6; }
7569
7570
7571
7572###############################################################################
7573#
7574# Check which variants of the JVM that we want to build.
7575# Currently we have:
7576#    server: normal interpreter and a tiered C1/C2 compiler
7577#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7578#    minimal1: reduced form of client with optional VM services and features stripped out
7579#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7580#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7581#    zero: no machine code interpreter, no compiler
7582#    zeroshark: zero interpreter and shark/llvm compiler backend
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7584$as_echo_n "checking which variants of the JVM to build... " >&6; }
7585
7586# Check whether --with-jvm-variants was given.
7587if test "${with_jvm_variants+set}" = set; then :
7588  withval=$with_jvm_variants;
7589fi
7590
7591
7592if test "x$with_jvm_variants" = x; then
7593     with_jvm_variants="server"
7594fi
7595
7596JVM_VARIANTS=",$with_jvm_variants,"
7597TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7598
7599if test "x$TEST_VARIANTS" != "x,"; then
7600   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7601fi
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7603$as_echo "$with_jvm_variants" >&6; }
7604
7605JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7606JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7607JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7608JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7609JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7610JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7611
7612if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7613    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7614        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7615    fi
7616fi
7617if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7618    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7619        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7620    fi
7621fi
7622if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7623    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7624        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7625    fi
7626fi
7627
7628# Replace the commas with AND for use in the build directory name.
7629ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7630COUNT_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/'`
7631if test "x$COUNT_VARIANTS" != "x,1"; then
7632    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7633else
7634    BUILDING_MULTIPLE_JVM_VARIANTS=no
7635fi
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645INCLUDE_SA=true
7646if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7647    INCLUDE_SA=false
7648fi
7649if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7650    INCLUDE_SA=false
7651fi
7652
7653
7654if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7655   MACOSX_UNIVERSAL="true"
7656fi
7657
7658
7659
7660
7661
7662###############################################################################
7663#
7664# Set the debug level
7665#    release: no debug information, all optimizations, no asserts.
7666#    fastdebug: debug information (-g), all optimizations, all asserts
7667#    slowdebug: debug information (-g), no optimizations, all asserts
7668#
7669DEBUG_LEVEL="release"
7670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7671$as_echo_n "checking which debug level to use... " >&6; }
7672# Check whether --enable-debug was given.
7673if test "${enable_debug+set}" = set; then :
7674  enableval=$enable_debug;
7675        ENABLE_DEBUG="${enableval}"
7676        DEBUG_LEVEL="fastdebug"
7677
7678else
7679  ENABLE_DEBUG="no"
7680fi
7681
7682
7683
7684# Check whether --with-debug-level was given.
7685if test "${with_debug_level+set}" = set; then :
7686  withval=$with_debug_level;
7687        DEBUG_LEVEL="${withval}"
7688        if test "x$ENABLE_DEBUG" = xyes; then
7689			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7690        fi
7691
7692fi
7693
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7695$as_echo "$DEBUG_LEVEL" >&6; }
7696
7697if test "x$DEBUG_LEVEL" != xrelease && \
7698   test "x$DEBUG_LEVEL" != xfastdebug && \
7699   test "x$DEBUG_LEVEL" != xslowdebug; then
7700   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7701fi
7702
7703
7704###############################################################################
7705#
7706# Setup legacy vars/targets and new vars to deal with different debug levels.
7707#
7708
7709case $DEBUG_LEVEL in
7710      release )
7711          VARIANT="OPT"
7712          FASTDEBUG="false"
7713          DEBUG_CLASSFILES="false"
7714          BUILD_VARIANT_RELEASE=""
7715          HOTSPOT_DEBUG_LEVEL="product"
7716          HOTSPOT_EXPORT="product"
7717           ;;
7718      fastdebug )
7719          VARIANT="DBG"
7720          FASTDEBUG="true"
7721          DEBUG_CLASSFILES="true"
7722          BUILD_VARIANT_RELEASE="-fastdebug"
7723          HOTSPOT_DEBUG_LEVEL="fastdebug"
7724          HOTSPOT_EXPORT="fastdebug"
7725           ;;
7726      slowdebug )
7727          VARIANT="DBG"
7728          FASTDEBUG="false"
7729          DEBUG_CLASSFILES="true"
7730          BUILD_VARIANT_RELEASE="-debug"
7731          HOTSPOT_DEBUG_LEVEL="jvmg"
7732          HOTSPOT_EXPORT="debug"
7733           ;;
7734esac
7735
7736#####
7737# Generate the legacy makefile targets for hotspot.
7738# The hotspot api for selecting the build artifacts, really, needs to be improved.
7739# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7740# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7741# But until then ...
7742HOTSPOT_TARGET=""
7743
7744if test "x$JVM_VARIANT_SERVER" = xtrue; then
7745    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7746fi
7747
7748if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7749    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7750fi
7751
7752if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7753    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7754fi
7755
7756if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7757    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7758fi
7759
7760if test "x$JVM_VARIANT_ZERO" = xtrue; then
7761    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7762fi
7763
7764if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7765    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7766fi
7767
7768HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7769
7770# On Macosx universal binaries are produced, but they only contain
7771# 64 bit intel. This invalidates control of which jvms are built
7772# from configure, but only server is valid anyway. Fix this
7773# when hotspot makefiles are rewritten.
7774if test "x$MACOSX_UNIVERSAL" = xtrue; then
7775    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7776fi
7777
7778#####
7779
7780
7781
7782
7783
7784
7785
7786
7787# With basic setup done, call the custom early hook.
7788
7789
7790# To properly create a configuration name, we need to have the OpenJDK target
7791# and options (variants and debug level) parsed.
7792
7793
7794
7795# Check whether --with-conf-name was given.
7796if test "${with_conf_name+set}" = set; then :
7797  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7798fi
7799
7800
7801# Test from where we are running configure, in or outside of src root.
7802if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7803        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7804        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7805    # We are running configure from the src root.
7806    # Create a default ./build/target-variant-debuglevel output root.
7807    if test "x${CONF_NAME}" = x; then
7808        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7809    fi
7810    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7811    $MKDIR -p "$OUTPUT_ROOT"
7812    if test ! -d "$OUTPUT_ROOT"; then
7813        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7814    fi
7815else
7816    # We are running configure from outside of the src dir.
7817    # Then use the current directory as output dir!
7818    # If configuration is situated in normal build directory, just use the build
7819    # directory name as configuration name, otherwise use the complete path.
7820    if test "x${CONF_NAME}" = x; then
7821        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7822    fi
7823    OUTPUT_ROOT="$CURDIR"
7824
7825    # WARNING: This might be a bad thing to do. You need to be sure you want to
7826    # have a configuration in this directory. Do some sanity checks!
7827
7828    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7829      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7830      # other files
7831      files_present=`$LS $OUTPUT_ROOT`
7832      # Configure has already touched config.log and confdefs.h in the current dir when this check
7833      # is performed.
7834      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7835                                             | $TR -d '\n'`
7836      if test "x$filtered_files" != x; then
7837        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7838$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7839        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7840$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7842$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7844$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7846$as_echo "$as_me: seriously mess up just about everything." >&6;}
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7848$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7849        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7850$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7851        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7852      fi
7853    fi
7854fi
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7856$as_echo_n "checking what configuration name to use... " >&6; }
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7858$as_echo "$CONF_NAME" >&6; }
7859
7860
7861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7862
7863  # Input might be given as Windows format, start by converting to
7864  # unix format.
7865  path="$OUTPUT_ROOT"
7866  new_path=`$CYGPATH -u "$path"`
7867
7868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7871  # "foo.exe" is OK but "foo" is an error.
7872  #
7873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7874  # It is also a way to make sure we got the proper file name for the real test later on.
7875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7876  if test "x$test_shortpath" = x; then
7877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7878$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7879    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7880  fi
7881
7882  # Call helper function which possibly converts this using DOS-style short mode.
7883  # If so, the updated path is stored in $new_path.
7884
7885  input_path="$new_path"
7886  # Check if we need to convert this using DOS-style short mode. If the path
7887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7888  # take no chances and rewrite it.
7889  # Note: m4 eats our [], so we need to use [ and ] instead.
7890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7891  if test "x$has_forbidden_chars" != x; then
7892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7896      # Going to short mode and back again did indeed matter. Since short mode is
7897      # case insensitive, let's make it lowercase to improve readability.
7898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7899      # Now convert it back to Unix-stile (cygpath)
7900      input_path=`$CYGPATH -u "$shortmode_path"`
7901      new_path="$input_path"
7902    fi
7903  fi
7904
7905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7906  if test "x$test_cygdrive_prefix" = x; then
7907    # As a simple fix, exclude /usr/bin since it's not a real path.
7908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7910      # a path prefixed by /cygdrive for fixpath to work.
7911      new_path="$CYGWIN_ROOT_PATH$input_path"
7912    fi
7913  fi
7914
7915
7916  if test "x$path" != "x$new_path"; then
7917    OUTPUT_ROOT="$new_path"
7918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7919$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7920  fi
7921
7922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7923
7924  path="$OUTPUT_ROOT"
7925  has_colon=`$ECHO $path | $GREP ^.:`
7926  new_path="$path"
7927  if test "x$has_colon" = x; then
7928    # Not in mixed or Windows style, start by that.
7929    new_path=`cmd //c echo $path`
7930  fi
7931
7932
7933  input_path="$new_path"
7934  # Check if we need to convert this using DOS-style short mode. If the path
7935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7936  # take no chances and rewrite it.
7937  # Note: m4 eats our [], so we need to use [ and ] instead.
7938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7939  if test "x$has_forbidden_chars" != x; then
7940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7942  fi
7943
7944
7945  windows_path="$new_path"
7946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7947    unix_path=`$CYGPATH -u "$windows_path"`
7948    new_path="$unix_path"
7949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7951    new_path="$unix_path"
7952  fi
7953
7954  if test "x$path" != "x$new_path"; then
7955    OUTPUT_ROOT="$new_path"
7956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7957$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7958  fi
7959
7960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7962
7963  else
7964    # We're on a posix platform. Hooray! :)
7965    path="$OUTPUT_ROOT"
7966    has_space=`$ECHO "$path" | $GREP " "`
7967    if test "x$has_space" != x; then
7968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7969$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7970      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7971    fi
7972
7973    # Use eval to expand a potential ~
7974    eval path="$path"
7975    if test ! -f "$path" && test ! -d "$path"; then
7976      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7977    fi
7978
7979    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7980  fi
7981
7982
7983SPEC=$OUTPUT_ROOT/spec.gmk
7984
7985CONF_NAME=$CONF_NAME
7986
7987OUTPUT_ROOT=$OUTPUT_ROOT
7988
7989
7990# Most of the probed defines are put into config.h
7991ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7992
7993# The spec.gmk file contains all variables for the make system.
7994ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7995
7996# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7997ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7998
7999# The bootcycle-spec.gmk file contains support for boot cycle builds.
8000ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8001
8002# The compare.sh is used to compare the build output to other builds.
8003ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8004
8005# Spec.sh is currently used by compare-objects.sh
8006ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8007
8008# The generated Makefile knows where the spec.gmk is and where the source is.
8009# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8010# which will look for generated configurations
8011ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8012
8013
8014# Save the arguments given to us
8015echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8016
8017
8018# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8019
8020    for ac_prog in apt-get yum port pkgutil pkgadd
8021do
8022  # Extract the first word of "$ac_prog", so it can be a program name with args.
8023set dummy $ac_prog; ac_word=$2
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025$as_echo_n "checking for $ac_word... " >&6; }
8026if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  if test -n "$PKGHANDLER"; then
8030  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8031else
8032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8039    ac_cv_prog_PKGHANDLER="$ac_prog"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047fi
8048fi
8049PKGHANDLER=$ac_cv_prog_PKGHANDLER
8050if test -n "$PKGHANDLER"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8052$as_echo "$PKGHANDLER" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$PKGHANDLER" && break
8060done
8061
8062
8063
8064# Setup tools that requires more complex handling, or that is not needed by the configure script.
8065
8066
8067  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8068  if test "x$MAKE" != x; then
8069    # User has supplied a make, test it.
8070    if test ! -f "$MAKE"; then
8071      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8072    fi
8073
8074  MAKE_CANDIDATE=""$MAKE""
8075  DESCRIPTION="user supplied MAKE=$MAKE"
8076  if test "x$MAKE_CANDIDATE" != x; then
8077    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8078$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8079    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8080    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8081    if test "x$IS_GNU_MAKE" = x; then
8082      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8083$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8084    else
8085      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8086      if test "x$IS_MODERN_MAKE" = x; then
8087        { $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
8088$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;}
8089      else
8090        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8091          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8092            MAKE_EXPECTED_ENV='cygwin'
8093          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8094            MAKE_EXPECTED_ENV='msys'
8095          else
8096            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8097          fi
8098          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8099          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8100        else
8101          # Not relevant for non-Windows
8102          IS_MAKE_CORRECT_ENV=true
8103        fi
8104        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8105          { $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
8106$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;}
8107        else
8108          FOUND_MAKE=$MAKE_CANDIDATE
8109
8110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8111
8112  # First separate the path from the arguments. This will split at the first
8113  # space.
8114  complete="$FOUND_MAKE"
8115  path="${complete%% *}"
8116  tmp="$complete EOL"
8117  arguments="${tmp#* }"
8118
8119  # Input might be given as Windows format, start by converting to
8120  # unix format.
8121  new_path=`$CYGPATH -u "$path"`
8122
8123  # Now try to locate executable using which
8124  new_path=`$WHICH "$new_path" 2> /dev/null`
8125  # bat and cmd files are not always considered executable in cygwin causing which
8126  # to not find them
8127  if test "x$new_path" = x \
8128           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8129           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8130    new_path=`$CYGPATH -u "$path"`
8131  fi
8132  if test "x$new_path" = x; then
8133    # Oops. Which didn't find the executable.
8134    # The splitting of arguments from the executable at a space might have been incorrect,
8135    # since paths with space are more likely in Windows. Give it another try with the whole
8136    # argument.
8137    path="$complete"
8138    arguments="EOL"
8139    new_path=`$CYGPATH -u "$path"`
8140    new_path=`$WHICH "$new_path" 2> /dev/null`
8141    # bat and cmd files are not always considered executable in cygwin causing which
8142    # to not find them
8143    if test "x$new_path" = x \
8144             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8145             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8146      new_path=`$CYGPATH -u "$path"`
8147    fi
8148    if test "x$new_path" = x; then
8149      # It's still not found. Now this is an unrecoverable error.
8150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8151$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8152      has_space=`$ECHO "$complete" | $GREP " "`
8153      if test "x$has_space" != x; then
8154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8156      fi
8157      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8158    fi
8159  fi
8160
8161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8164  # "foo.exe" is OK but "foo" is an error.
8165  #
8166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8167  # It is also a way to make sure we got the proper file name for the real test later on.
8168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8169  if test "x$test_shortpath" = x; then
8170    # Short path failed, file does not exist as specified.
8171    # Try adding .exe or .cmd
8172    if test -f "${new_path}.exe"; then
8173       input_to_shortpath="${new_path}.exe"
8174    elif test -f "${new_path}.cmd"; then
8175       input_to_shortpath="${new_path}.cmd"
8176    else
8177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8178$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8179      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8180$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8181      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8182    fi
8183  else
8184    input_to_shortpath="$new_path"
8185  fi
8186
8187  # Call helper function which possibly converts this using DOS-style short mode.
8188  # If so, the updated path is stored in $new_path.
8189  new_path="$input_to_shortpath"
8190
8191  input_path="$input_to_shortpath"
8192  # Check if we need to convert this using DOS-style short mode. If the path
8193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8194  # take no chances and rewrite it.
8195  # Note: m4 eats our [], so we need to use [ and ] instead.
8196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8197  if test "x$has_forbidden_chars" != x; then
8198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8202      # Going to short mode and back again did indeed matter. Since short mode is
8203      # case insensitive, let's make it lowercase to improve readability.
8204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8205      # Now convert it back to Unix-stile (cygpath)
8206      input_path=`$CYGPATH -u "$shortmode_path"`
8207      new_path="$input_path"
8208    fi
8209  fi
8210
8211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8212  if test "x$test_cygdrive_prefix" = x; then
8213    # As a simple fix, exclude /usr/bin since it's not a real path.
8214    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8216      # a path prefixed by /cygdrive for fixpath to work.
8217      new_path="$CYGWIN_ROOT_PATH$input_path"
8218    fi
8219  fi
8220
8221  # remove trailing .exe if any
8222  new_path="${new_path/%.exe/}"
8223
8224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8225
8226  # First separate the path from the arguments. This will split at the first
8227  # space.
8228  complete="$FOUND_MAKE"
8229  path="${complete%% *}"
8230  tmp="$complete EOL"
8231  arguments="${tmp#* }"
8232
8233  # Input might be given as Windows format, start by converting to
8234  # unix format.
8235  new_path="$path"
8236
8237  windows_path="$new_path"
8238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8239    unix_path=`$CYGPATH -u "$windows_path"`
8240    new_path="$unix_path"
8241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8243    new_path="$unix_path"
8244  fi
8245
8246
8247  # Now try to locate executable using which
8248  new_path=`$WHICH "$new_path" 2> /dev/null`
8249
8250  if test "x$new_path" = x; then
8251    # Oops. Which didn't find the executable.
8252    # The splitting of arguments from the executable at a space might have been incorrect,
8253    # since paths with space are more likely in Windows. Give it another try with the whole
8254    # argument.
8255    path="$complete"
8256    arguments="EOL"
8257    new_path="$path"
8258
8259  windows_path="$new_path"
8260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8261    unix_path=`$CYGPATH -u "$windows_path"`
8262    new_path="$unix_path"
8263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8265    new_path="$unix_path"
8266  fi
8267
8268
8269    new_path=`$WHICH "$new_path" 2> /dev/null`
8270
8271    if test "x$new_path" = x; then
8272      # It's still not found. Now this is an unrecoverable error.
8273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8275      has_space=`$ECHO "$complete" | $GREP " "`
8276      if test "x$has_space" != x; then
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8279      fi
8280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8281    fi
8282  fi
8283
8284  # Now new_path has a complete unix path to the binary
8285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8286    # Keep paths in /bin as-is, but remove trailing .exe if any
8287    new_path="${new_path/%.exe/}"
8288    # Do not save /bin paths to all_fixpath_prefixes!
8289  else
8290    # Not in mixed or Windows style, start by that.
8291    new_path=`cmd //c echo $new_path`
8292
8293  input_path="$new_path"
8294  # Check if we need to convert this using DOS-style short mode. If the path
8295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8296  # take no chances and rewrite it.
8297  # Note: m4 eats our [], so we need to use [ and ] instead.
8298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8299  if test "x$has_forbidden_chars" != x; then
8300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8302  fi
8303
8304    # Output is in $new_path
8305
8306  windows_path="$new_path"
8307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8308    unix_path=`$CYGPATH -u "$windows_path"`
8309    new_path="$unix_path"
8310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8312    new_path="$unix_path"
8313  fi
8314
8315    # remove trailing .exe if any
8316    new_path="${new_path/%.exe/}"
8317
8318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8320  fi
8321
8322  else
8323    # We're on a posix platform. Hooray! :)
8324    # First separate the path from the arguments. This will split at the first
8325    # space.
8326    complete="$FOUND_MAKE"
8327    path="${complete%% *}"
8328    tmp="$complete EOL"
8329    arguments="${tmp#* }"
8330
8331    # Cannot rely on the command "which" here since it doesn't always work.
8332    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8333    if test -z "$is_absolute_path"; then
8334      # Path to executable is not absolute. Find it.
8335      IFS_save="$IFS"
8336      IFS=:
8337      for p in $PATH; do
8338        if test -f "$p/$path" && test -x "$p/$path"; then
8339          new_path="$p/$path"
8340          break
8341        fi
8342      done
8343      IFS="$IFS_save"
8344    else
8345      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8346$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8347      new_path="$path"
8348    fi
8349
8350    if test "x$new_path" = x; then
8351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8353        has_space=`$ECHO "$complete" | $GREP " "`
8354        if test "x$has_space" != x; then
8355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8357        fi
8358        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8359      fi
8360  fi
8361
8362      # Now join together the path and the arguments once again
8363      if test "x$arguments" != xEOL; then
8364        new_complete="$new_path ${arguments% *}"
8365      else
8366        new_complete="$new_path"
8367      fi
8368
8369  if test "x$complete" != "x$new_complete"; then
8370      FOUND_MAKE="$new_complete"
8371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8372$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8373    fi
8374
8375        fi
8376      fi
8377    fi
8378  fi
8379
8380    if test "x$FOUND_MAKE" = x; then
8381      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8382    fi
8383  else
8384    # Try our hardest to locate a correct version of GNU make
8385    for ac_prog in gmake
8386do
8387  # Extract the first word of "$ac_prog", so it can be a program name with args.
8388set dummy $ac_prog; ac_word=$2
8389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8390$as_echo_n "checking for $ac_word... " >&6; }
8391if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8392  $as_echo_n "(cached) " >&6
8393else
8394  case $CHECK_GMAKE in
8395  [\\/]* | ?:[\\/]*)
8396  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8397  ;;
8398  *)
8399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400for as_dir in $PATH
8401do
8402  IFS=$as_save_IFS
8403  test -z "$as_dir" && as_dir=.
8404    for ac_exec_ext in '' $ac_executable_extensions; do
8405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8406    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8408    break 2
8409  fi
8410done
8411  done
8412IFS=$as_save_IFS
8413
8414  ;;
8415esac
8416fi
8417CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8418if test -n "$CHECK_GMAKE"; then
8419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8420$as_echo "$CHECK_GMAKE" >&6; }
8421else
8422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423$as_echo "no" >&6; }
8424fi
8425
8426
8427  test -n "$CHECK_GMAKE" && break
8428done
8429
8430
8431  MAKE_CANDIDATE=""$CHECK_GMAKE""
8432  DESCRIPTION="gmake in PATH"
8433  if test "x$MAKE_CANDIDATE" != x; then
8434    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8435$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8436    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8437    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8438    if test "x$IS_GNU_MAKE" = x; then
8439      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8440$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8441    else
8442      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8443      if test "x$IS_MODERN_MAKE" = x; then
8444        { $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
8445$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;}
8446      else
8447        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8448          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449            MAKE_EXPECTED_ENV='cygwin'
8450          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8451            MAKE_EXPECTED_ENV='msys'
8452          else
8453            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8454          fi
8455          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8456          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8457        else
8458          # Not relevant for non-Windows
8459          IS_MAKE_CORRECT_ENV=true
8460        fi
8461        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8462          { $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
8463$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;}
8464        else
8465          FOUND_MAKE=$MAKE_CANDIDATE
8466
8467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8468
8469  # First separate the path from the arguments. This will split at the first
8470  # space.
8471  complete="$FOUND_MAKE"
8472  path="${complete%% *}"
8473  tmp="$complete EOL"
8474  arguments="${tmp#* }"
8475
8476  # Input might be given as Windows format, start by converting to
8477  # unix format.
8478  new_path=`$CYGPATH -u "$path"`
8479
8480  # Now try to locate executable using which
8481  new_path=`$WHICH "$new_path" 2> /dev/null`
8482  # bat and cmd files are not always considered executable in cygwin causing which
8483  # to not find them
8484  if test "x$new_path" = x \
8485           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8486           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8487    new_path=`$CYGPATH -u "$path"`
8488  fi
8489  if test "x$new_path" = x; then
8490    # Oops. Which didn't find the executable.
8491    # The splitting of arguments from the executable at a space might have been incorrect,
8492    # since paths with space are more likely in Windows. Give it another try with the whole
8493    # argument.
8494    path="$complete"
8495    arguments="EOL"
8496    new_path=`$CYGPATH -u "$path"`
8497    new_path=`$WHICH "$new_path" 2> /dev/null`
8498    # bat and cmd files are not always considered executable in cygwin causing which
8499    # to not find them
8500    if test "x$new_path" = x \
8501             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8502             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8503      new_path=`$CYGPATH -u "$path"`
8504    fi
8505    if test "x$new_path" = x; then
8506      # It's still not found. Now this is an unrecoverable error.
8507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8509      has_space=`$ECHO "$complete" | $GREP " "`
8510      if test "x$has_space" != x; then
8511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8513      fi
8514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8515    fi
8516  fi
8517
8518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8521  # "foo.exe" is OK but "foo" is an error.
8522  #
8523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8524  # It is also a way to make sure we got the proper file name for the real test later on.
8525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8526  if test "x$test_shortpath" = x; then
8527    # Short path failed, file does not exist as specified.
8528    # Try adding .exe or .cmd
8529    if test -f "${new_path}.exe"; then
8530       input_to_shortpath="${new_path}.exe"
8531    elif test -f "${new_path}.cmd"; then
8532       input_to_shortpath="${new_path}.cmd"
8533    else
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8539    fi
8540  else
8541    input_to_shortpath="$new_path"
8542  fi
8543
8544  # Call helper function which possibly converts this using DOS-style short mode.
8545  # If so, the updated path is stored in $new_path.
8546  new_path="$input_to_shortpath"
8547
8548  input_path="$input_to_shortpath"
8549  # Check if we need to convert this using DOS-style short mode. If the path
8550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8551  # take no chances and rewrite it.
8552  # Note: m4 eats our [], so we need to use [ and ] instead.
8553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8554  if test "x$has_forbidden_chars" != x; then
8555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8559      # Going to short mode and back again did indeed matter. Since short mode is
8560      # case insensitive, let's make it lowercase to improve readability.
8561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8562      # Now convert it back to Unix-stile (cygpath)
8563      input_path=`$CYGPATH -u "$shortmode_path"`
8564      new_path="$input_path"
8565    fi
8566  fi
8567
8568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8569  if test "x$test_cygdrive_prefix" = x; then
8570    # As a simple fix, exclude /usr/bin since it's not a real path.
8571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8573      # a path prefixed by /cygdrive for fixpath to work.
8574      new_path="$CYGWIN_ROOT_PATH$input_path"
8575    fi
8576  fi
8577
8578  # remove trailing .exe if any
8579  new_path="${new_path/%.exe/}"
8580
8581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8582
8583  # First separate the path from the arguments. This will split at the first
8584  # space.
8585  complete="$FOUND_MAKE"
8586  path="${complete%% *}"
8587  tmp="$complete EOL"
8588  arguments="${tmp#* }"
8589
8590  # Input might be given as Windows format, start by converting to
8591  # unix format.
8592  new_path="$path"
8593
8594  windows_path="$new_path"
8595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8596    unix_path=`$CYGPATH -u "$windows_path"`
8597    new_path="$unix_path"
8598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8600    new_path="$unix_path"
8601  fi
8602
8603
8604  # Now try to locate executable using which
8605  new_path=`$WHICH "$new_path" 2> /dev/null`
8606
8607  if test "x$new_path" = x; then
8608    # Oops. Which didn't find the executable.
8609    # The splitting of arguments from the executable at a space might have been incorrect,
8610    # since paths with space are more likely in Windows. Give it another try with the whole
8611    # argument.
8612    path="$complete"
8613    arguments="EOL"
8614    new_path="$path"
8615
8616  windows_path="$new_path"
8617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8618    unix_path=`$CYGPATH -u "$windows_path"`
8619    new_path="$unix_path"
8620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8622    new_path="$unix_path"
8623  fi
8624
8625
8626    new_path=`$WHICH "$new_path" 2> /dev/null`
8627
8628    if test "x$new_path" = x; then
8629      # It's still not found. Now this is an unrecoverable error.
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8631$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8632      has_space=`$ECHO "$complete" | $GREP " "`
8633      if test "x$has_space" != x; then
8634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8636      fi
8637      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8638    fi
8639  fi
8640
8641  # Now new_path has a complete unix path to the binary
8642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8643    # Keep paths in /bin as-is, but remove trailing .exe if any
8644    new_path="${new_path/%.exe/}"
8645    # Do not save /bin paths to all_fixpath_prefixes!
8646  else
8647    # Not in mixed or Windows style, start by that.
8648    new_path=`cmd //c echo $new_path`
8649
8650  input_path="$new_path"
8651  # Check if we need to convert this using DOS-style short mode. If the path
8652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8653  # take no chances and rewrite it.
8654  # Note: m4 eats our [], so we need to use [ and ] instead.
8655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8656  if test "x$has_forbidden_chars" != x; then
8657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8659  fi
8660
8661    # Output is in $new_path
8662
8663  windows_path="$new_path"
8664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8665    unix_path=`$CYGPATH -u "$windows_path"`
8666    new_path="$unix_path"
8667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8669    new_path="$unix_path"
8670  fi
8671
8672    # remove trailing .exe if any
8673    new_path="${new_path/%.exe/}"
8674
8675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8677  fi
8678
8679  else
8680    # We're on a posix platform. Hooray! :)
8681    # First separate the path from the arguments. This will split at the first
8682    # space.
8683    complete="$FOUND_MAKE"
8684    path="${complete%% *}"
8685    tmp="$complete EOL"
8686    arguments="${tmp#* }"
8687
8688    # Cannot rely on the command "which" here since it doesn't always work.
8689    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8690    if test -z "$is_absolute_path"; then
8691      # Path to executable is not absolute. Find it.
8692      IFS_save="$IFS"
8693      IFS=:
8694      for p in $PATH; do
8695        if test -f "$p/$path" && test -x "$p/$path"; then
8696          new_path="$p/$path"
8697          break
8698        fi
8699      done
8700      IFS="$IFS_save"
8701    else
8702      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8703$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8704      new_path="$path"
8705    fi
8706
8707    if test "x$new_path" = x; then
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8709$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8710        has_space=`$ECHO "$complete" | $GREP " "`
8711        if test "x$has_space" != x; then
8712          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8713$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8714        fi
8715        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8716      fi
8717  fi
8718
8719      # Now join together the path and the arguments once again
8720      if test "x$arguments" != xEOL; then
8721        new_complete="$new_path ${arguments% *}"
8722      else
8723        new_complete="$new_path"
8724      fi
8725
8726  if test "x$complete" != "x$new_complete"; then
8727      FOUND_MAKE="$new_complete"
8728      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8729$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8730    fi
8731
8732        fi
8733      fi
8734    fi
8735  fi
8736
8737
8738    if test "x$FOUND_MAKE" = x; then
8739      for ac_prog in make
8740do
8741  # Extract the first word of "$ac_prog", so it can be a program name with args.
8742set dummy $ac_prog; ac_word=$2
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8744$as_echo_n "checking for $ac_word... " >&6; }
8745if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8746  $as_echo_n "(cached) " >&6
8747else
8748  case $CHECK_MAKE in
8749  [\\/]* | ?:[\\/]*)
8750  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8751  ;;
8752  *)
8753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8754for as_dir in $PATH
8755do
8756  IFS=$as_save_IFS
8757  test -z "$as_dir" && as_dir=.
8758    for ac_exec_ext in '' $ac_executable_extensions; do
8759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8760    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8762    break 2
8763  fi
8764done
8765  done
8766IFS=$as_save_IFS
8767
8768  ;;
8769esac
8770fi
8771CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8772if test -n "$CHECK_MAKE"; then
8773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8774$as_echo "$CHECK_MAKE" >&6; }
8775else
8776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777$as_echo "no" >&6; }
8778fi
8779
8780
8781  test -n "$CHECK_MAKE" && break
8782done
8783
8784
8785  MAKE_CANDIDATE=""$CHECK_MAKE""
8786  DESCRIPTION="make in PATH"
8787  if test "x$MAKE_CANDIDATE" != x; then
8788    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8789$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8790    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8791    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8792    if test "x$IS_GNU_MAKE" = x; then
8793      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8794$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8795    else
8796      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8797      if test "x$IS_MODERN_MAKE" = x; then
8798        { $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
8799$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;}
8800      else
8801        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8802          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8803            MAKE_EXPECTED_ENV='cygwin'
8804          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805            MAKE_EXPECTED_ENV='msys'
8806          else
8807            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8808          fi
8809          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8810          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8811        else
8812          # Not relevant for non-Windows
8813          IS_MAKE_CORRECT_ENV=true
8814        fi
8815        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8816          { $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
8817$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;}
8818        else
8819          FOUND_MAKE=$MAKE_CANDIDATE
8820
8821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8822
8823  # First separate the path from the arguments. This will split at the first
8824  # space.
8825  complete="$FOUND_MAKE"
8826  path="${complete%% *}"
8827  tmp="$complete EOL"
8828  arguments="${tmp#* }"
8829
8830  # Input might be given as Windows format, start by converting to
8831  # unix format.
8832  new_path=`$CYGPATH -u "$path"`
8833
8834  # Now try to locate executable using which
8835  new_path=`$WHICH "$new_path" 2> /dev/null`
8836  # bat and cmd files are not always considered executable in cygwin causing which
8837  # to not find them
8838  if test "x$new_path" = x \
8839           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8840           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8841    new_path=`$CYGPATH -u "$path"`
8842  fi
8843  if test "x$new_path" = x; then
8844    # Oops. Which didn't find the executable.
8845    # The splitting of arguments from the executable at a space might have been incorrect,
8846    # since paths with space are more likely in Windows. Give it another try with the whole
8847    # argument.
8848    path="$complete"
8849    arguments="EOL"
8850    new_path=`$CYGPATH -u "$path"`
8851    new_path=`$WHICH "$new_path" 2> /dev/null`
8852    # bat and cmd files are not always considered executable in cygwin causing which
8853    # to not find them
8854    if test "x$new_path" = x \
8855             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8856             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8857      new_path=`$CYGPATH -u "$path"`
8858    fi
8859    if test "x$new_path" = x; then
8860      # It's still not found. Now this is an unrecoverable error.
8861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8862$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8863      has_space=`$ECHO "$complete" | $GREP " "`
8864      if test "x$has_space" != x; then
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8867      fi
8868      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8869    fi
8870  fi
8871
8872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8875  # "foo.exe" is OK but "foo" is an error.
8876  #
8877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8878  # It is also a way to make sure we got the proper file name for the real test later on.
8879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8880  if test "x$test_shortpath" = x; then
8881    # Short path failed, file does not exist as specified.
8882    # Try adding .exe or .cmd
8883    if test -f "${new_path}.exe"; then
8884       input_to_shortpath="${new_path}.exe"
8885    elif test -f "${new_path}.cmd"; then
8886       input_to_shortpath="${new_path}.cmd"
8887    else
8888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8890      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8891$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8893    fi
8894  else
8895    input_to_shortpath="$new_path"
8896  fi
8897
8898  # Call helper function which possibly converts this using DOS-style short mode.
8899  # If so, the updated path is stored in $new_path.
8900  new_path="$input_to_shortpath"
8901
8902  input_path="$input_to_shortpath"
8903  # Check if we need to convert this using DOS-style short mode. If the path
8904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8905  # take no chances and rewrite it.
8906  # Note: m4 eats our [], so we need to use [ and ] instead.
8907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8908  if test "x$has_forbidden_chars" != x; then
8909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8913      # Going to short mode and back again did indeed matter. Since short mode is
8914      # case insensitive, let's make it lowercase to improve readability.
8915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8916      # Now convert it back to Unix-stile (cygpath)
8917      input_path=`$CYGPATH -u "$shortmode_path"`
8918      new_path="$input_path"
8919    fi
8920  fi
8921
8922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8923  if test "x$test_cygdrive_prefix" = x; then
8924    # As a simple fix, exclude /usr/bin since it's not a real path.
8925    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8927      # a path prefixed by /cygdrive for fixpath to work.
8928      new_path="$CYGWIN_ROOT_PATH$input_path"
8929    fi
8930  fi
8931
8932  # remove trailing .exe if any
8933  new_path="${new_path/%.exe/}"
8934
8935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8936
8937  # First separate the path from the arguments. This will split at the first
8938  # space.
8939  complete="$FOUND_MAKE"
8940  path="${complete%% *}"
8941  tmp="$complete EOL"
8942  arguments="${tmp#* }"
8943
8944  # Input might be given as Windows format, start by converting to
8945  # unix format.
8946  new_path="$path"
8947
8948  windows_path="$new_path"
8949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8950    unix_path=`$CYGPATH -u "$windows_path"`
8951    new_path="$unix_path"
8952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8954    new_path="$unix_path"
8955  fi
8956
8957
8958  # Now try to locate executable using which
8959  new_path=`$WHICH "$new_path" 2> /dev/null`
8960
8961  if test "x$new_path" = x; then
8962    # Oops. Which didn't find the executable.
8963    # The splitting of arguments from the executable at a space might have been incorrect,
8964    # since paths with space are more likely in Windows. Give it another try with the whole
8965    # argument.
8966    path="$complete"
8967    arguments="EOL"
8968    new_path="$path"
8969
8970  windows_path="$new_path"
8971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8972    unix_path=`$CYGPATH -u "$windows_path"`
8973    new_path="$unix_path"
8974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8976    new_path="$unix_path"
8977  fi
8978
8979
8980    new_path=`$WHICH "$new_path" 2> /dev/null`
8981
8982    if test "x$new_path" = x; then
8983      # It's still not found. Now this is an unrecoverable error.
8984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8985$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8986      has_space=`$ECHO "$complete" | $GREP " "`
8987      if test "x$has_space" != x; then
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8990      fi
8991      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8992    fi
8993  fi
8994
8995  # Now new_path has a complete unix path to the binary
8996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8997    # Keep paths in /bin as-is, but remove trailing .exe if any
8998    new_path="${new_path/%.exe/}"
8999    # Do not save /bin paths to all_fixpath_prefixes!
9000  else
9001    # Not in mixed or Windows style, start by that.
9002    new_path=`cmd //c echo $new_path`
9003
9004  input_path="$new_path"
9005  # Check if we need to convert this using DOS-style short mode. If the path
9006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9007  # take no chances and rewrite it.
9008  # Note: m4 eats our [], so we need to use [ and ] instead.
9009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9010  if test "x$has_forbidden_chars" != x; then
9011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9013  fi
9014
9015    # Output is in $new_path
9016
9017  windows_path="$new_path"
9018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9019    unix_path=`$CYGPATH -u "$windows_path"`
9020    new_path="$unix_path"
9021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9023    new_path="$unix_path"
9024  fi
9025
9026    # remove trailing .exe if any
9027    new_path="${new_path/%.exe/}"
9028
9029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9031  fi
9032
9033  else
9034    # We're on a posix platform. Hooray! :)
9035    # First separate the path from the arguments. This will split at the first
9036    # space.
9037    complete="$FOUND_MAKE"
9038    path="${complete%% *}"
9039    tmp="$complete EOL"
9040    arguments="${tmp#* }"
9041
9042    # Cannot rely on the command "which" here since it doesn't always work.
9043    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9044    if test -z "$is_absolute_path"; then
9045      # Path to executable is not absolute. Find it.
9046      IFS_save="$IFS"
9047      IFS=:
9048      for p in $PATH; do
9049        if test -f "$p/$path" && test -x "$p/$path"; then
9050          new_path="$p/$path"
9051          break
9052        fi
9053      done
9054      IFS="$IFS_save"
9055    else
9056      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9057$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9058      new_path="$path"
9059    fi
9060
9061    if test "x$new_path" = x; then
9062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9064        has_space=`$ECHO "$complete" | $GREP " "`
9065        if test "x$has_space" != x; then
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9068        fi
9069        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9070      fi
9071  fi
9072
9073      # Now join together the path and the arguments once again
9074      if test "x$arguments" != xEOL; then
9075        new_complete="$new_path ${arguments% *}"
9076      else
9077        new_complete="$new_path"
9078      fi
9079
9080  if test "x$complete" != "x$new_complete"; then
9081      FOUND_MAKE="$new_complete"
9082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9083$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9084    fi
9085
9086        fi
9087      fi
9088    fi
9089  fi
9090
9091    fi
9092
9093    if test "x$FOUND_MAKE" = x; then
9094      if test "x$TOOLS_DIR" != x; then
9095        # We have a tools-dir, check that as well before giving up.
9096        OLD_PATH=$PATH
9097        PATH=$TOOLS_DIR:$PATH
9098        for ac_prog in gmake
9099do
9100  # Extract the first word of "$ac_prog", so it can be a program name with args.
9101set dummy $ac_prog; ac_word=$2
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103$as_echo_n "checking for $ac_word... " >&6; }
9104if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107  case $CHECK_TOOLSDIR_GMAKE in
9108  [\\/]* | ?:[\\/]*)
9109  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9110  ;;
9111  *)
9112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113for as_dir in $PATH
9114do
9115  IFS=$as_save_IFS
9116  test -z "$as_dir" && as_dir=.
9117    for ac_exec_ext in '' $ac_executable_extensions; do
9118  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9119    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121    break 2
9122  fi
9123done
9124  done
9125IFS=$as_save_IFS
9126
9127  ;;
9128esac
9129fi
9130CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9131if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9133$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9134else
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
9137fi
9138
9139
9140  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9141done
9142
9143
9144  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9145  DESCRIPTION="gmake in tools-dir"
9146  if test "x$MAKE_CANDIDATE" != x; then
9147    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9148$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9149    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9150    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9151    if test "x$IS_GNU_MAKE" = x; then
9152      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9153$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9154    else
9155      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9156      if test "x$IS_MODERN_MAKE" = x; then
9157        { $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
9158$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;}
9159      else
9160        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9161          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9162            MAKE_EXPECTED_ENV='cygwin'
9163          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164            MAKE_EXPECTED_ENV='msys'
9165          else
9166            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9167          fi
9168          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9169          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9170        else
9171          # Not relevant for non-Windows
9172          IS_MAKE_CORRECT_ENV=true
9173        fi
9174        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9175          { $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
9176$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;}
9177        else
9178          FOUND_MAKE=$MAKE_CANDIDATE
9179
9180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9181
9182  # First separate the path from the arguments. This will split at the first
9183  # space.
9184  complete="$FOUND_MAKE"
9185  path="${complete%% *}"
9186  tmp="$complete EOL"
9187  arguments="${tmp#* }"
9188
9189  # Input might be given as Windows format, start by converting to
9190  # unix format.
9191  new_path=`$CYGPATH -u "$path"`
9192
9193  # Now try to locate executable using which
9194  new_path=`$WHICH "$new_path" 2> /dev/null`
9195  # bat and cmd files are not always considered executable in cygwin causing which
9196  # to not find them
9197  if test "x$new_path" = x \
9198           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9199           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9200    new_path=`$CYGPATH -u "$path"`
9201  fi
9202  if test "x$new_path" = x; then
9203    # Oops. Which didn't find the executable.
9204    # The splitting of arguments from the executable at a space might have been incorrect,
9205    # since paths with space are more likely in Windows. Give it another try with the whole
9206    # argument.
9207    path="$complete"
9208    arguments="EOL"
9209    new_path=`$CYGPATH -u "$path"`
9210    new_path=`$WHICH "$new_path" 2> /dev/null`
9211    # bat and cmd files are not always considered executable in cygwin causing which
9212    # to not find them
9213    if test "x$new_path" = x \
9214             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9215             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9216      new_path=`$CYGPATH -u "$path"`
9217    fi
9218    if test "x$new_path" = x; then
9219      # It's still not found. Now this is an unrecoverable error.
9220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9221$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9222      has_space=`$ECHO "$complete" | $GREP " "`
9223      if test "x$has_space" != x; then
9224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9226      fi
9227      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9228    fi
9229  fi
9230
9231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9234  # "foo.exe" is OK but "foo" is an error.
9235  #
9236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9237  # It is also a way to make sure we got the proper file name for the real test later on.
9238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9239  if test "x$test_shortpath" = x; then
9240    # Short path failed, file does not exist as specified.
9241    # Try adding .exe or .cmd
9242    if test -f "${new_path}.exe"; then
9243       input_to_shortpath="${new_path}.exe"
9244    elif test -f "${new_path}.cmd"; then
9245       input_to_shortpath="${new_path}.cmd"
9246    else
9247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9248$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9251      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9252    fi
9253  else
9254    input_to_shortpath="$new_path"
9255  fi
9256
9257  # Call helper function which possibly converts this using DOS-style short mode.
9258  # If so, the updated path is stored in $new_path.
9259  new_path="$input_to_shortpath"
9260
9261  input_path="$input_to_shortpath"
9262  # Check if we need to convert this using DOS-style short mode. If the path
9263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9264  # take no chances and rewrite it.
9265  # Note: m4 eats our [], so we need to use [ and ] instead.
9266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9267  if test "x$has_forbidden_chars" != x; then
9268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9272      # Going to short mode and back again did indeed matter. Since short mode is
9273      # case insensitive, let's make it lowercase to improve readability.
9274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9275      # Now convert it back to Unix-stile (cygpath)
9276      input_path=`$CYGPATH -u "$shortmode_path"`
9277      new_path="$input_path"
9278    fi
9279  fi
9280
9281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9282  if test "x$test_cygdrive_prefix" = x; then
9283    # As a simple fix, exclude /usr/bin since it's not a real path.
9284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9286      # a path prefixed by /cygdrive for fixpath to work.
9287      new_path="$CYGWIN_ROOT_PATH$input_path"
9288    fi
9289  fi
9290
9291  # remove trailing .exe if any
9292  new_path="${new_path/%.exe/}"
9293
9294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9295
9296  # First separate the path from the arguments. This will split at the first
9297  # space.
9298  complete="$FOUND_MAKE"
9299  path="${complete%% *}"
9300  tmp="$complete EOL"
9301  arguments="${tmp#* }"
9302
9303  # Input might be given as Windows format, start by converting to
9304  # unix format.
9305  new_path="$path"
9306
9307  windows_path="$new_path"
9308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9309    unix_path=`$CYGPATH -u "$windows_path"`
9310    new_path="$unix_path"
9311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9313    new_path="$unix_path"
9314  fi
9315
9316
9317  # Now try to locate executable using which
9318  new_path=`$WHICH "$new_path" 2> /dev/null`
9319
9320  if test "x$new_path" = x; then
9321    # Oops. Which didn't find the executable.
9322    # The splitting of arguments from the executable at a space might have been incorrect,
9323    # since paths with space are more likely in Windows. Give it another try with the whole
9324    # argument.
9325    path="$complete"
9326    arguments="EOL"
9327    new_path="$path"
9328
9329  windows_path="$new_path"
9330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9331    unix_path=`$CYGPATH -u "$windows_path"`
9332    new_path="$unix_path"
9333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9335    new_path="$unix_path"
9336  fi
9337
9338
9339    new_path=`$WHICH "$new_path" 2> /dev/null`
9340
9341    if test "x$new_path" = x; then
9342      # It's still not found. Now this is an unrecoverable error.
9343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9344$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9345      has_space=`$ECHO "$complete" | $GREP " "`
9346      if test "x$has_space" != x; then
9347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9349      fi
9350      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9351    fi
9352  fi
9353
9354  # Now new_path has a complete unix path to the binary
9355  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9356    # Keep paths in /bin as-is, but remove trailing .exe if any
9357    new_path="${new_path/%.exe/}"
9358    # Do not save /bin paths to all_fixpath_prefixes!
9359  else
9360    # Not in mixed or Windows style, start by that.
9361    new_path=`cmd //c echo $new_path`
9362
9363  input_path="$new_path"
9364  # Check if we need to convert this using DOS-style short mode. If the path
9365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9366  # take no chances and rewrite it.
9367  # Note: m4 eats our [], so we need to use [ and ] instead.
9368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9369  if test "x$has_forbidden_chars" != x; then
9370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9372  fi
9373
9374    # Output is in $new_path
9375
9376  windows_path="$new_path"
9377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9378    unix_path=`$CYGPATH -u "$windows_path"`
9379    new_path="$unix_path"
9380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9382    new_path="$unix_path"
9383  fi
9384
9385    # remove trailing .exe if any
9386    new_path="${new_path/%.exe/}"
9387
9388    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9389    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9390  fi
9391
9392  else
9393    # We're on a posix platform. Hooray! :)
9394    # First separate the path from the arguments. This will split at the first
9395    # space.
9396    complete="$FOUND_MAKE"
9397    path="${complete%% *}"
9398    tmp="$complete EOL"
9399    arguments="${tmp#* }"
9400
9401    # Cannot rely on the command "which" here since it doesn't always work.
9402    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9403    if test -z "$is_absolute_path"; then
9404      # Path to executable is not absolute. Find it.
9405      IFS_save="$IFS"
9406      IFS=:
9407      for p in $PATH; do
9408        if test -f "$p/$path" && test -x "$p/$path"; then
9409          new_path="$p/$path"
9410          break
9411        fi
9412      done
9413      IFS="$IFS_save"
9414    else
9415      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9416$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9417      new_path="$path"
9418    fi
9419
9420    if test "x$new_path" = x; then
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9422$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9423        has_space=`$ECHO "$complete" | $GREP " "`
9424        if test "x$has_space" != x; then
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9426$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9427        fi
9428        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9429      fi
9430  fi
9431
9432      # Now join together the path and the arguments once again
9433      if test "x$arguments" != xEOL; then
9434        new_complete="$new_path ${arguments% *}"
9435      else
9436        new_complete="$new_path"
9437      fi
9438
9439  if test "x$complete" != "x$new_complete"; then
9440      FOUND_MAKE="$new_complete"
9441      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9442$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9443    fi
9444
9445        fi
9446      fi
9447    fi
9448  fi
9449
9450        if test "x$FOUND_MAKE" = x; then
9451          for ac_prog in make
9452do
9453  # Extract the first word of "$ac_prog", so it can be a program name with args.
9454set dummy $ac_prog; ac_word=$2
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456$as_echo_n "checking for $ac_word... " >&6; }
9457if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9458  $as_echo_n "(cached) " >&6
9459else
9460  case $CHECK_TOOLSDIR_MAKE in
9461  [\\/]* | ?:[\\/]*)
9462  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9463  ;;
9464  *)
9465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466for as_dir in $PATH
9467do
9468  IFS=$as_save_IFS
9469  test -z "$as_dir" && as_dir=.
9470    for ac_exec_ext in '' $ac_executable_extensions; do
9471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9472    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474    break 2
9475  fi
9476done
9477  done
9478IFS=$as_save_IFS
9479
9480  ;;
9481esac
9482fi
9483CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9484if test -n "$CHECK_TOOLSDIR_MAKE"; then
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9486$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9487else
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489$as_echo "no" >&6; }
9490fi
9491
9492
9493  test -n "$CHECK_TOOLSDIR_MAKE" && break
9494done
9495
9496
9497  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9498  DESCRIPTION="make in tools-dir"
9499  if test "x$MAKE_CANDIDATE" != x; then
9500    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9501$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9502    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9503    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9504    if test "x$IS_GNU_MAKE" = x; then
9505      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9506$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9507    else
9508      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9509      if test "x$IS_MODERN_MAKE" = x; then
9510        { $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
9511$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;}
9512      else
9513        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9514          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515            MAKE_EXPECTED_ENV='cygwin'
9516          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517            MAKE_EXPECTED_ENV='msys'
9518          else
9519            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9520          fi
9521          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9522          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9523        else
9524          # Not relevant for non-Windows
9525          IS_MAKE_CORRECT_ENV=true
9526        fi
9527        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9528          { $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
9529$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;}
9530        else
9531          FOUND_MAKE=$MAKE_CANDIDATE
9532
9533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9534
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  # Input might be given as Windows format, start by converting to
9543  # unix format.
9544  new_path=`$CYGPATH -u "$path"`
9545
9546  # Now try to locate executable using which
9547  new_path=`$WHICH "$new_path" 2> /dev/null`
9548  # bat and cmd files are not always considered executable in cygwin causing which
9549  # to not find them
9550  if test "x$new_path" = x \
9551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9553    new_path=`$CYGPATH -u "$path"`
9554  fi
9555  if test "x$new_path" = x; then
9556    # Oops. Which didn't find the executable.
9557    # The splitting of arguments from the executable at a space might have been incorrect,
9558    # since paths with space are more likely in Windows. Give it another try with the whole
9559    # argument.
9560    path="$complete"
9561    arguments="EOL"
9562    new_path=`$CYGPATH -u "$path"`
9563    new_path=`$WHICH "$new_path" 2> /dev/null`
9564    # bat and cmd files are not always considered executable in cygwin causing which
9565    # to not find them
9566    if test "x$new_path" = x \
9567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9569      new_path=`$CYGPATH -u "$path"`
9570    fi
9571    if test "x$new_path" = x; then
9572      # It's still not found. Now this is an unrecoverable error.
9573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9575      has_space=`$ECHO "$complete" | $GREP " "`
9576      if test "x$has_space" != x; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9579      fi
9580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9581    fi
9582  fi
9583
9584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9587  # "foo.exe" is OK but "foo" is an error.
9588  #
9589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9590  # It is also a way to make sure we got the proper file name for the real test later on.
9591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9592  if test "x$test_shortpath" = x; then
9593    # Short path failed, file does not exist as specified.
9594    # Try adding .exe or .cmd
9595    if test -f "${new_path}.exe"; then
9596       input_to_shortpath="${new_path}.exe"
9597    elif test -f "${new_path}.cmd"; then
9598       input_to_shortpath="${new_path}.cmd"
9599    else
9600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9605    fi
9606  else
9607    input_to_shortpath="$new_path"
9608  fi
9609
9610  # Call helper function which possibly converts this using DOS-style short mode.
9611  # If so, the updated path is stored in $new_path.
9612  new_path="$input_to_shortpath"
9613
9614  input_path="$input_to_shortpath"
9615  # Check if we need to convert this using DOS-style short mode. If the path
9616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9617  # take no chances and rewrite it.
9618  # Note: m4 eats our [], so we need to use [ and ] instead.
9619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9620  if test "x$has_forbidden_chars" != x; then
9621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9625      # Going to short mode and back again did indeed matter. Since short mode is
9626      # case insensitive, let's make it lowercase to improve readability.
9627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9628      # Now convert it back to Unix-stile (cygpath)
9629      input_path=`$CYGPATH -u "$shortmode_path"`
9630      new_path="$input_path"
9631    fi
9632  fi
9633
9634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9635  if test "x$test_cygdrive_prefix" = x; then
9636    # As a simple fix, exclude /usr/bin since it's not a real path.
9637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9639      # a path prefixed by /cygdrive for fixpath to work.
9640      new_path="$CYGWIN_ROOT_PATH$input_path"
9641    fi
9642  fi
9643
9644  # remove trailing .exe if any
9645  new_path="${new_path/%.exe/}"
9646
9647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9648
9649  # First separate the path from the arguments. This will split at the first
9650  # space.
9651  complete="$FOUND_MAKE"
9652  path="${complete%% *}"
9653  tmp="$complete EOL"
9654  arguments="${tmp#* }"
9655
9656  # Input might be given as Windows format, start by converting to
9657  # unix format.
9658  new_path="$path"
9659
9660  windows_path="$new_path"
9661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9662    unix_path=`$CYGPATH -u "$windows_path"`
9663    new_path="$unix_path"
9664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9666    new_path="$unix_path"
9667  fi
9668
9669
9670  # Now try to locate executable using which
9671  new_path=`$WHICH "$new_path" 2> /dev/null`
9672
9673  if test "x$new_path" = x; then
9674    # Oops. Which didn't find the executable.
9675    # The splitting of arguments from the executable at a space might have been incorrect,
9676    # since paths with space are more likely in Windows. Give it another try with the whole
9677    # argument.
9678    path="$complete"
9679    arguments="EOL"
9680    new_path="$path"
9681
9682  windows_path="$new_path"
9683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9684    unix_path=`$CYGPATH -u "$windows_path"`
9685    new_path="$unix_path"
9686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9688    new_path="$unix_path"
9689  fi
9690
9691
9692    new_path=`$WHICH "$new_path" 2> /dev/null`
9693
9694    if test "x$new_path" = x; then
9695      # It's still not found. Now this is an unrecoverable error.
9696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9698      has_space=`$ECHO "$complete" | $GREP " "`
9699      if test "x$has_space" != x; then
9700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9702      fi
9703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9704    fi
9705  fi
9706
9707  # Now new_path has a complete unix path to the binary
9708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9709    # Keep paths in /bin as-is, but remove trailing .exe if any
9710    new_path="${new_path/%.exe/}"
9711    # Do not save /bin paths to all_fixpath_prefixes!
9712  else
9713    # Not in mixed or Windows style, start by that.
9714    new_path=`cmd //c echo $new_path`
9715
9716  input_path="$new_path"
9717  # Check if we need to convert this using DOS-style short mode. If the path
9718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9719  # take no chances and rewrite it.
9720  # Note: m4 eats our [], so we need to use [ and ] instead.
9721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9722  if test "x$has_forbidden_chars" != x; then
9723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9725  fi
9726
9727    # Output is in $new_path
9728
9729  windows_path="$new_path"
9730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9731    unix_path=`$CYGPATH -u "$windows_path"`
9732    new_path="$unix_path"
9733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9735    new_path="$unix_path"
9736  fi
9737
9738    # remove trailing .exe if any
9739    new_path="${new_path/%.exe/}"
9740
9741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9743  fi
9744
9745  else
9746    # We're on a posix platform. Hooray! :)
9747    # First separate the path from the arguments. This will split at the first
9748    # space.
9749    complete="$FOUND_MAKE"
9750    path="${complete%% *}"
9751    tmp="$complete EOL"
9752    arguments="${tmp#* }"
9753
9754    # Cannot rely on the command "which" here since it doesn't always work.
9755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9756    if test -z "$is_absolute_path"; then
9757      # Path to executable is not absolute. Find it.
9758      IFS_save="$IFS"
9759      IFS=:
9760      for p in $PATH; do
9761        if test -f "$p/$path" && test -x "$p/$path"; then
9762          new_path="$p/$path"
9763          break
9764        fi
9765      done
9766      IFS="$IFS_save"
9767    else
9768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9769$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9770      new_path="$path"
9771    fi
9772
9773    if test "x$new_path" = x; then
9774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9776        has_space=`$ECHO "$complete" | $GREP " "`
9777        if test "x$has_space" != x; then
9778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9780        fi
9781        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9782      fi
9783  fi
9784
9785      # Now join together the path and the arguments once again
9786      if test "x$arguments" != xEOL; then
9787        new_complete="$new_path ${arguments% *}"
9788      else
9789        new_complete="$new_path"
9790      fi
9791
9792  if test "x$complete" != "x$new_complete"; then
9793      FOUND_MAKE="$new_complete"
9794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9795$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9796    fi
9797
9798        fi
9799      fi
9800    fi
9801  fi
9802
9803        fi
9804        PATH=$OLD_PATH
9805      fi
9806    fi
9807
9808    if test "x$FOUND_MAKE" = x; then
9809      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
9810    fi
9811  fi
9812
9813  MAKE=$FOUND_MAKE
9814
9815  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9816$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9817
9818
9819
9820    # Test if find supports -delete
9821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9822$as_echo_n "checking if find supports -delete... " >&6; }
9823    FIND_DELETE="-delete"
9824
9825    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9826
9827    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9828
9829    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9830    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9831        # No, it does not.
9832        rm $DELETEDIR/TestIfFindSupportsDelete
9833        FIND_DELETE="-exec rm \{\} \+"
9834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835$as_echo "no" >&6; }
9836    else
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9838$as_echo "yes" >&6; }
9839    fi
9840    rmdir $DELETEDIR
9841
9842
9843
9844# These tools might not be installed by default,
9845# need hint on how to install them.
9846
9847    for ac_prog in unzip
9848do
9849  # Extract the first word of "$ac_prog", so it can be a program name with args.
9850set dummy $ac_prog; ac_word=$2
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852$as_echo_n "checking for $ac_word... " >&6; }
9853if test "${ac_cv_path_UNZIP+set}" = set; then :
9854  $as_echo_n "(cached) " >&6
9855else
9856  case $UNZIP in
9857  [\\/]* | ?:[\\/]*)
9858  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9859  ;;
9860  *)
9861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862for as_dir in $PATH
9863do
9864  IFS=$as_save_IFS
9865  test -z "$as_dir" && as_dir=.
9866    for ac_exec_ext in '' $ac_executable_extensions; do
9867  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9868    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870    break 2
9871  fi
9872done
9873  done
9874IFS=$as_save_IFS
9875
9876  ;;
9877esac
9878fi
9879UNZIP=$ac_cv_path_UNZIP
9880if test -n "$UNZIP"; then
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9882$as_echo "$UNZIP" >&6; }
9883else
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886fi
9887
9888
9889  test -n "$UNZIP" && break
9890done
9891
9892
9893    if test "x$UNZIP" = x; then
9894        if test "xunzip" = x; then
9895          PROG_NAME=unzip
9896        else
9897          PROG_NAME=unzip
9898        fi
9899        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9901        as_fn_error $? "Cannot continue" "$LINENO" 5
9902    fi
9903
9904
9905
9906    for ac_prog in zip
9907do
9908  # Extract the first word of "$ac_prog", so it can be a program name with args.
9909set dummy $ac_prog; ac_word=$2
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911$as_echo_n "checking for $ac_word... " >&6; }
9912if test "${ac_cv_path_ZIP+set}" = set; then :
9913  $as_echo_n "(cached) " >&6
9914else
9915  case $ZIP in
9916  [\\/]* | ?:[\\/]*)
9917  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9918  ;;
9919  *)
9920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921for as_dir in $PATH
9922do
9923  IFS=$as_save_IFS
9924  test -z "$as_dir" && as_dir=.
9925    for ac_exec_ext in '' $ac_executable_extensions; do
9926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9927    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929    break 2
9930  fi
9931done
9932  done
9933IFS=$as_save_IFS
9934
9935  ;;
9936esac
9937fi
9938ZIP=$ac_cv_path_ZIP
9939if test -n "$ZIP"; then
9940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9941$as_echo "$ZIP" >&6; }
9942else
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945fi
9946
9947
9948  test -n "$ZIP" && break
9949done
9950
9951
9952    if test "x$ZIP" = x; then
9953        if test "xzip" = x; then
9954          PROG_NAME=zip
9955        else
9956          PROG_NAME=zip
9957        fi
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9960        as_fn_error $? "Cannot continue" "$LINENO" 5
9961    fi
9962
9963
9964
9965# Non-required basic tools
9966
9967# Extract the first word of "ldd", so it can be a program name with args.
9968set dummy ldd; ac_word=$2
9969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9970$as_echo_n "checking for $ac_word... " >&6; }
9971if test "${ac_cv_path_LDD+set}" = set; then :
9972  $as_echo_n "(cached) " >&6
9973else
9974  case $LDD in
9975  [\\/]* | ?:[\\/]*)
9976  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9977  ;;
9978  *)
9979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9980for as_dir in $PATH
9981do
9982  IFS=$as_save_IFS
9983  test -z "$as_dir" && as_dir=.
9984    for ac_exec_ext in '' $ac_executable_extensions; do
9985  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9986    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9988    break 2
9989  fi
9990done
9991  done
9992IFS=$as_save_IFS
9993
9994  ;;
9995esac
9996fi
9997LDD=$ac_cv_path_LDD
9998if test -n "$LDD"; then
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10000$as_echo "$LDD" >&6; }
10001else
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003$as_echo "no" >&6; }
10004fi
10005
10006
10007if test "x$LDD" = "x"; then
10008    # List shared lib dependencies is used for
10009    # debug output and checking for forbidden dependencies.
10010    # We can build without it.
10011    LDD="true"
10012fi
10013# Extract the first word of "otool", so it can be a program name with args.
10014set dummy otool; ac_word=$2
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10016$as_echo_n "checking for $ac_word... " >&6; }
10017if test "${ac_cv_path_OTOOL+set}" = set; then :
10018  $as_echo_n "(cached) " >&6
10019else
10020  case $OTOOL in
10021  [\\/]* | ?:[\\/]*)
10022  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10023  ;;
10024  *)
10025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10026for as_dir in $PATH
10027do
10028  IFS=$as_save_IFS
10029  test -z "$as_dir" && as_dir=.
10030    for ac_exec_ext in '' $ac_executable_extensions; do
10031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10032    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10034    break 2
10035  fi
10036done
10037  done
10038IFS=$as_save_IFS
10039
10040  ;;
10041esac
10042fi
10043OTOOL=$ac_cv_path_OTOOL
10044if test -n "$OTOOL"; then
10045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10046$as_echo "$OTOOL" >&6; }
10047else
10048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049$as_echo "no" >&6; }
10050fi
10051
10052
10053if test "x$OTOOL" = "x"; then
10054   OTOOL="true"
10055fi
10056for ac_prog in readelf greadelf
10057do
10058  # Extract the first word of "$ac_prog", so it can be a program name with args.
10059set dummy $ac_prog; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if test "${ac_cv_path_READELF+set}" = set; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $READELF in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10077    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088READELF=$ac_cv_path_READELF
10089if test -n "$READELF"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10091$as_echo "$READELF" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098  test -n "$READELF" && break
10099done
10100
10101# Extract the first word of "hg", so it can be a program name with args.
10102set dummy hg; ac_word=$2
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104$as_echo_n "checking for $ac_word... " >&6; }
10105if test "${ac_cv_path_HG+set}" = set; then :
10106  $as_echo_n "(cached) " >&6
10107else
10108  case $HG in
10109  [\\/]* | ?:[\\/]*)
10110  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10111  ;;
10112  *)
10113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114for as_dir in $PATH
10115do
10116  IFS=$as_save_IFS
10117  test -z "$as_dir" && as_dir=.
10118    for ac_exec_ext in '' $ac_executable_extensions; do
10119  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10120    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122    break 2
10123  fi
10124done
10125  done
10126IFS=$as_save_IFS
10127
10128  ;;
10129esac
10130fi
10131HG=$ac_cv_path_HG
10132if test -n "$HG"; then
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10134$as_echo "$HG" >&6; }
10135else
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
10138fi
10139
10140
10141# Extract the first word of "stat", so it can be a program name with args.
10142set dummy stat; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if test "${ac_cv_path_STAT+set}" = set; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $STAT in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10160    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171STAT=$ac_cv_path_STAT
10172if test -n "$STAT"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10174$as_echo "$STAT" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181# Extract the first word of "time", so it can be a program name with args.
10182set dummy time; ac_word=$2
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184$as_echo_n "checking for $ac_word... " >&6; }
10185if test "${ac_cv_path_TIME+set}" = set; then :
10186  $as_echo_n "(cached) " >&6
10187else
10188  case $TIME in
10189  [\\/]* | ?:[\\/]*)
10190  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10191  ;;
10192  *)
10193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194for as_dir in $PATH
10195do
10196  IFS=$as_save_IFS
10197  test -z "$as_dir" && as_dir=.
10198    for ac_exec_ext in '' $ac_executable_extensions; do
10199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10200    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202    break 2
10203  fi
10204done
10205  done
10206IFS=$as_save_IFS
10207
10208  ;;
10209esac
10210fi
10211TIME=$ac_cv_path_TIME
10212if test -n "$TIME"; then
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10214$as_echo "$TIME" >&6; }
10215else
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217$as_echo "no" >&6; }
10218fi
10219
10220
10221
10222if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10223
10224    for ac_prog in comm
10225do
10226  # Extract the first word of "$ac_prog", so it can be a program name with args.
10227set dummy $ac_prog; ac_word=$2
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229$as_echo_n "checking for $ac_word... " >&6; }
10230if test "${ac_cv_path_COMM+set}" = set; then :
10231  $as_echo_n "(cached) " >&6
10232else
10233  case $COMM in
10234  [\\/]* | ?:[\\/]*)
10235  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10236  ;;
10237  *)
10238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239for as_dir in $PATH
10240do
10241  IFS=$as_save_IFS
10242  test -z "$as_dir" && as_dir=.
10243    for ac_exec_ext in '' $ac_executable_extensions; do
10244  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10245    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247    break 2
10248  fi
10249done
10250  done
10251IFS=$as_save_IFS
10252
10253  ;;
10254esac
10255fi
10256COMM=$ac_cv_path_COMM
10257if test -n "$COMM"; then
10258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10259$as_echo "$COMM" >&6; }
10260else
10261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266  test -n "$COMM" && break
10267done
10268
10269
10270    if test "x$COMM" = x; then
10271        if test "xcomm" = x; then
10272          PROG_NAME=comm
10273        else
10274          PROG_NAME=comm
10275        fi
10276        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10277$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10278        as_fn_error $? "Cannot continue" "$LINENO" 5
10279    fi
10280
10281
10282fi
10283
10284if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10285
10286    for ac_prog in xattr
10287do
10288  # Extract the first word of "$ac_prog", so it can be a program name with args.
10289set dummy $ac_prog; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if test "${ac_cv_path_XATTR+set}" = set; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  case $XATTR in
10296  [\\/]* | ?:[\\/]*)
10297  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10298  ;;
10299  *)
10300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301for as_dir in $PATH
10302do
10303  IFS=$as_save_IFS
10304  test -z "$as_dir" && as_dir=.
10305    for ac_exec_ext in '' $ac_executable_extensions; do
10306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10307    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309    break 2
10310  fi
10311done
10312  done
10313IFS=$as_save_IFS
10314
10315  ;;
10316esac
10317fi
10318XATTR=$ac_cv_path_XATTR
10319if test -n "$XATTR"; then
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10321$as_echo "$XATTR" >&6; }
10322else
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328  test -n "$XATTR" && break
10329done
10330
10331
10332    if test "x$XATTR" = x; then
10333        if test "xxattr" = x; then
10334          PROG_NAME=xattr
10335        else
10336          PROG_NAME=xattr
10337        fi
10338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10340        as_fn_error $? "Cannot continue" "$LINENO" 5
10341    fi
10342
10343
10344  # Extract the first word of "codesign", so it can be a program name with args.
10345set dummy codesign; ac_word=$2
10346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347$as_echo_n "checking for $ac_word... " >&6; }
10348if test "${ac_cv_path_CODESIGN+set}" = set; then :
10349  $as_echo_n "(cached) " >&6
10350else
10351  case $CODESIGN in
10352  [\\/]* | ?:[\\/]*)
10353  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10354  ;;
10355  *)
10356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357for as_dir in $PATH
10358do
10359  IFS=$as_save_IFS
10360  test -z "$as_dir" && as_dir=.
10361    for ac_exec_ext in '' $ac_executable_extensions; do
10362  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10363    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365    break 2
10366  fi
10367done
10368  done
10369IFS=$as_save_IFS
10370
10371  ;;
10372esac
10373fi
10374CODESIGN=$ac_cv_path_CODESIGN
10375if test -n "$CODESIGN"; then
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10377$as_echo "$CODESIGN" >&6; }
10378else
10379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380$as_echo "no" >&6; }
10381fi
10382
10383
10384  if test "x$CODESIGN" != "x"; then
10385    # Verify that the openjdk_codesign certificate is present
10386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10387$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10388    rm -f codesign-testfile
10389    touch codesign-testfile
10390    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10391    rm -f codesign-testfile
10392    if test "x$CODESIGN" = x; then
10393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395    else
10396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10397$as_echo "yes" >&6; }
10398    fi
10399  fi
10400fi
10401
10402
10403# Check if pkg-config is available.
10404
10405
10406if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10407	if test -n "$ac_tool_prefix"; then
10408  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10409set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $PKG_CONFIG in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10439if test -n "$PKG_CONFIG"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10441$as_echo "$PKG_CONFIG" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448fi
10449if test -z "$ac_cv_path_PKG_CONFIG"; then
10450  ac_pt_PKG_CONFIG=$PKG_CONFIG
10451  # Extract the first word of "pkg-config", so it can be a program name with args.
10452set dummy pkg-config; ac_word=$2
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454$as_echo_n "checking for $ac_word... " >&6; }
10455if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10456  $as_echo_n "(cached) " >&6
10457else
10458  case $ac_pt_PKG_CONFIG in
10459  [\\/]* | ?:[\\/]*)
10460  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10461  ;;
10462  *)
10463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464for as_dir in $PATH
10465do
10466  IFS=$as_save_IFS
10467  test -z "$as_dir" && as_dir=.
10468    for ac_exec_ext in '' $ac_executable_extensions; do
10469  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10470    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472    break 2
10473  fi
10474done
10475  done
10476IFS=$as_save_IFS
10477
10478  ;;
10479esac
10480fi
10481ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10482if test -n "$ac_pt_PKG_CONFIG"; then
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10484$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10485else
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
10488fi
10489
10490  if test "x$ac_pt_PKG_CONFIG" = x; then
10491    PKG_CONFIG=""
10492  else
10493    case $cross_compiling:$ac_tool_warned in
10494yes:)
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10496$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10497ac_tool_warned=yes ;;
10498esac
10499    PKG_CONFIG=$ac_pt_PKG_CONFIG
10500  fi
10501else
10502  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10503fi
10504
10505fi
10506if test -n "$PKG_CONFIG"; then
10507	_pkg_min_version=0.9.0
10508	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10509$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10510	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10511		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10512$as_echo "yes" >&6; }
10513	else
10514		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516		PKG_CONFIG=""
10517	fi
10518
10519fi
10520
10521# After basic tools have been setup, we can check build os specific details.
10522
10523###############################################################################
10524
10525# Note that this is the build platform OS version!
10526
10527OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10528OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10529OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10530OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10531
10532
10533
10534
10535
10536# Setup builddeps, for automatic downloading of tools we need.
10537# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10538# boot-jdk setup, but we need to have basic tools setup first.
10539
10540
10541# Check whether --with-builddeps-conf was given.
10542if test "${with_builddeps_conf+set}" = set; then :
10543  withval=$with_builddeps_conf;
10544fi
10545
10546
10547
10548# Check whether --with-builddeps-server was given.
10549if test "${with_builddeps_server+set}" = set; then :
10550  withval=$with_builddeps_server;
10551fi
10552
10553
10554
10555# Check whether --with-builddeps-dir was given.
10556if test "${with_builddeps_dir+set}" = set; then :
10557  withval=$with_builddeps_dir;
10558else
10559  with_builddeps_dir=/localhome/builddeps
10560fi
10561
10562
10563
10564# Check whether --with-builddeps-group was given.
10565if test "${with_builddeps_group+set}" = set; then :
10566  withval=$with_builddeps_group;
10567fi
10568
10569
10570
10571
10572    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10573        if test "x$with_builddeps_conf" != x; then
10574            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10575$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10576            builddepsfile=$with_builddeps_conf
10577            if test -s $builddepsfile; then
10578                . $builddepsfile
10579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10580$as_echo "loaded!" >&6; }
10581            else
10582               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10583           fi
10584        else
10585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10586$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10587            builddepsfile=`mktemp`
10588            touch $builddepsfile
10589            # Put all found confs into a single file.
10590            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10591            # Source the file to acquire the variables
10592            if test -s $builddepsfile; then
10593                . $builddepsfile
10594                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10595$as_echo "found at least one!" >&6; }
10596            else
10597               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10598           fi
10599        fi
10600        # Create build and target names that use _ instead of "-" and ".".
10601        # This is necessary to use them in variable names.
10602        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10603        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10604        # Extract rewrite information for build and target
10605        eval rewritten_build=\${REWRITE_${build_var}}
10606        if test "x$rewritten_build" = x; then
10607            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10608            echo Build stays the same $rewritten_build
10609        else
10610            echo Rewriting build for builddeps into $rewritten_build
10611        fi
10612        eval rewritten_target=\${REWRITE_${target_var}}
10613        if test "x$rewritten_target" = x; then
10614            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10615            echo Target stays the same $rewritten_target
10616        else
10617            echo Rewriting target for builddeps into $rewritten_target
10618        fi
10619        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10620        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10621    fi
10622    for ac_prog in 7z unzip
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  if test -n "$BDEPS_UNZIP"; then
10632  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10633else
10634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635for as_dir in $PATH
10636do
10637  IFS=$as_save_IFS
10638  test -z "$as_dir" && as_dir=.
10639    for ac_exec_ext in '' $ac_executable_extensions; do
10640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10641    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643    break 2
10644  fi
10645done
10646  done
10647IFS=$as_save_IFS
10648
10649fi
10650fi
10651BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10652if test -n "$BDEPS_UNZIP"; then
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10654$as_echo "$BDEPS_UNZIP" >&6; }
10655else
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658fi
10659
10660
10661  test -n "$BDEPS_UNZIP" && break
10662done
10663
10664    if test "x$BDEPS_UNZIP" = x7z; then
10665        BDEPS_UNZIP="7z x"
10666    fi
10667
10668    for ac_prog in wget lftp ftp
10669do
10670  # Extract the first word of "$ac_prog", so it can be a program name with args.
10671set dummy $ac_prog; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  if test -n "$BDEPS_FTP"; then
10678  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10679else
10680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681for as_dir in $PATH
10682do
10683  IFS=$as_save_IFS
10684  test -z "$as_dir" && as_dir=.
10685    for ac_exec_ext in '' $ac_executable_extensions; do
10686  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10687    ac_cv_prog_BDEPS_FTP="$ac_prog"
10688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689    break 2
10690  fi
10691done
10692  done
10693IFS=$as_save_IFS
10694
10695fi
10696fi
10697BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10698if test -n "$BDEPS_FTP"; then
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10700$as_echo "$BDEPS_FTP" >&6; }
10701else
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
10705
10706
10707  test -n "$BDEPS_FTP" && break
10708done
10709
10710
10711
10712###############################################################################
10713#
10714# Determine OpenJDK variants, options and version numbers.
10715#
10716###############################################################################
10717
10718# We need build & target for this.
10719
10720
10721###############################################################################
10722#
10723# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10724# We always build headless support.
10725#
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10727$as_echo_n "checking headful support... " >&6; }
10728# Check whether --enable-headful was given.
10729if test "${enable_headful+set}" = set; then :
10730  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10731else
10732  SUPPORT_HEADFUL=yes
10733fi
10734
10735
10736SUPPORT_HEADLESS=yes
10737BUILD_HEADLESS="BUILD_HEADLESS:=true"
10738
10739if test "x$SUPPORT_HEADFUL" = xyes; then
10740    # We are building both headful and headless.
10741    headful_msg="inlude support for both headful and headless"
10742fi
10743
10744if test "x$SUPPORT_HEADFUL" = xno; then
10745    # Thus we are building headless only.
10746    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10747    headful_msg="headless only"
10748fi
10749
10750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10751$as_echo "$headful_msg" >&6; }
10752
10753
10754
10755
10756
10757# Control wether Hotspot runs Queens test after build.
10758# Check whether --enable-hotspot-test-in-build was given.
10759if test "${enable_hotspot_test_in_build+set}" = set; then :
10760  enableval=$enable_hotspot_test_in_build;
10761else
10762  enable_hotspot_test_in_build=no
10763fi
10764
10765if test "x$enable_hotspot_test_in_build" = "xyes"; then
10766    TEST_IN_BUILD=true
10767else
10768    TEST_IN_BUILD=false
10769fi
10770
10771
10772###############################################################################
10773#
10774# Choose cacerts source file
10775#
10776
10777# Check whether --with-cacerts-file was given.
10778if test "${with_cacerts_file+set}" = set; then :
10779  withval=$with_cacerts_file;
10780fi
10781
10782if test "x$with_cacerts_file" != x; then
10783    CACERTS_FILE=$with_cacerts_file
10784else
10785    if test "x$OPENJDK" = "xtrue"; then
10786        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10787    else
10788        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10789    fi
10790fi
10791
10792
10793###############################################################################
10794#
10795# Enable or disable unlimited crypto
10796#
10797# Check whether --enable-unlimited-crypto was given.
10798if test "${enable_unlimited_crypto+set}" = set; then :
10799  enableval=$enable_unlimited_crypto;
10800else
10801  enable_unlimited_crypto=no
10802fi
10803
10804if test "x$enable_unlimited_crypto" = "xyes"; then
10805    UNLIMITED_CRYPTO=true
10806else
10807    UNLIMITED_CRYPTO=false
10808fi
10809
10810
10811###############################################################################
10812#
10813# Enable or disable the elliptic curve crypto implementation
10814#
10815
10816
10817###############################################################################
10818#
10819# Compress jars
10820#
10821COMPRESS_JARS=false
10822
10823
10824
10825
10826# Source the version numbers
10827. $AUTOCONF_DIR/version-numbers
10828
10829# Get the settings from parameters
10830
10831# Check whether --with-milestone was given.
10832if test "${with_milestone+set}" = set; then :
10833  withval=$with_milestone;
10834fi
10835
10836if test "x$with_milestone" = xyes; then
10837  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10838elif test "x$with_milestone" != x; then
10839    MILESTONE="$with_milestone"
10840fi
10841if test "x$MILESTONE" = x; then
10842  MILESTONE=internal
10843fi
10844
10845
10846# Check whether --with-update-version was given.
10847if test "${with_update_version+set}" = set; then :
10848  withval=$with_update_version;
10849fi
10850
10851if test "x$with_update_version" = xyes; then
10852  as_fn_error $? "Update version must have a value" "$LINENO" 5
10853elif test "x$with_update_version" != x; then
10854  JDK_UPDATE_VERSION="$with_update_version"
10855fi
10856
10857
10858# Check whether --with-build-number was given.
10859if test "${with_build_number+set}" = set; then :
10860  withval=$with_build_number;
10861fi
10862
10863if test "x$with_build_number" = xyes; then
10864  as_fn_error $? "Build number must have a value" "$LINENO" 5
10865elif test "x$with_build_number" != x; then
10866  JDK_BUILD_NUMBER="$with_build_number"
10867fi
10868if test "x$JDK_BUILD_NUMBER" = x; then
10869  JDK_BUILD_NUMBER=b00
10870fi
10871
10872
10873# Check whether --with-user-release-suffix was given.
10874if test "${with_user_release_suffix+set}" = set; then :
10875  withval=$with_user_release_suffix;
10876fi
10877
10878if test "x$with_user_release_suffix" = xyes; then
10879  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10880elif test "x$with_user_release_suffix" != x; then
10881  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10882else
10883  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10884  # Avoid [:alnum:] since it depends on the locale.
10885  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10886  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10887fi
10888
10889
10890# Now set the JDK version, milestone, build number etc.
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905COPYRIGHT_YEAR=`date +'%Y'`
10906
10907
10908if test "x$JDK_UPDATE_VERSION" != x; then
10909  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10910else
10911  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10912fi
10913
10914
10915COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10916
10917
10918
10919###############################################################################
10920#
10921# Setup BootJDK, used to bootstrap the build.
10922#
10923###############################################################################
10924
10925
10926BOOT_JDK_FOUND=no
10927
10928# Check whether --with-boot-jdk was given.
10929if test "${with_boot_jdk+set}" = set; then :
10930  withval=$with_boot_jdk;
10931fi
10932
10933
10934# We look for the Boot JDK through various means, going from more certain to
10935# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10936# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10937# must check if this is indeed valid; otherwise we'll continue looking.
10938
10939# Test: Is bootjdk explicitely set by command line arguments?
10940
10941  if test "x$BOOT_JDK_FOUND" = xno; then
10942    # Now execute the test
10943
10944if test "x$with_boot_jdk" != x; then
10945    BOOT_JDK=$with_boot_jdk
10946    BOOT_JDK_FOUND=maybe
10947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10948$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10949fi
10950
10951
10952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10954      # Do we have a bin/java?
10955      if test ! -x "$BOOT_JDK/bin/java"; then
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10958        BOOT_JDK_FOUND=no
10959      else
10960        # Do we have a bin/javac?
10961        if test ! -x "$BOOT_JDK/bin/javac"; then
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10966          BOOT_JDK_FOUND=no
10967        else
10968          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10969          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10972            BOOT_JDK_FOUND=no
10973          else
10974            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10975            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10976
10977            # Extra M4 quote needed to protect [] in grep expression.
10978            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10979            if test "x$FOUND_VERSION_78" = x; then
10980              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10982              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10983$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10984              BOOT_JDK_FOUND=no
10985            else
10986              # We're done! :-)
10987              BOOT_JDK_FOUND=yes
10988
10989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990
10991  # Input might be given as Windows format, start by converting to
10992  # unix format.
10993  path="$BOOT_JDK"
10994  new_path=`$CYGPATH -u "$path"`
10995
10996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10999  # "foo.exe" is OK but "foo" is an error.
11000  #
11001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11002  # It is also a way to make sure we got the proper file name for the real test later on.
11003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11004  if test "x$test_shortpath" = x; then
11005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11007    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11008  fi
11009
11010  # Call helper function which possibly converts this using DOS-style short mode.
11011  # If so, the updated path is stored in $new_path.
11012
11013  input_path="$new_path"
11014  # Check if we need to convert this using DOS-style short mode. If the path
11015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016  # take no chances and rewrite it.
11017  # Note: m4 eats our [], so we need to use [ and ] instead.
11018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11019  if test "x$has_forbidden_chars" != x; then
11020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11024      # Going to short mode and back again did indeed matter. Since short mode is
11025      # case insensitive, let's make it lowercase to improve readability.
11026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027      # Now convert it back to Unix-stile (cygpath)
11028      input_path=`$CYGPATH -u "$shortmode_path"`
11029      new_path="$input_path"
11030    fi
11031  fi
11032
11033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11034  if test "x$test_cygdrive_prefix" = x; then
11035    # As a simple fix, exclude /usr/bin since it's not a real path.
11036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11038      # a path prefixed by /cygdrive for fixpath to work.
11039      new_path="$CYGWIN_ROOT_PATH$input_path"
11040    fi
11041  fi
11042
11043
11044  if test "x$path" != "x$new_path"; then
11045    BOOT_JDK="$new_path"
11046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11048  fi
11049
11050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11051
11052  path="$BOOT_JDK"
11053  has_colon=`$ECHO $path | $GREP ^.:`
11054  new_path="$path"
11055  if test "x$has_colon" = x; then
11056    # Not in mixed or Windows style, start by that.
11057    new_path=`cmd //c echo $path`
11058  fi
11059
11060
11061  input_path="$new_path"
11062  # Check if we need to convert this using DOS-style short mode. If the path
11063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11064  # take no chances and rewrite it.
11065  # Note: m4 eats our [], so we need to use [ and ] instead.
11066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11067  if test "x$has_forbidden_chars" != x; then
11068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11070  fi
11071
11072
11073  windows_path="$new_path"
11074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11075    unix_path=`$CYGPATH -u "$windows_path"`
11076    new_path="$unix_path"
11077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11079    new_path="$unix_path"
11080  fi
11081
11082  if test "x$path" != "x$new_path"; then
11083    BOOT_JDK="$new_path"
11084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11086  fi
11087
11088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11090
11091  else
11092    # We're on a posix platform. Hooray! :)
11093    path="$BOOT_JDK"
11094    has_space=`$ECHO "$path" | $GREP " "`
11095    if test "x$has_space" != x; then
11096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099    fi
11100
11101    # Use eval to expand a potential ~
11102    eval path="$path"
11103    if test ! -f "$path" && test ! -d "$path"; then
11104      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11105    fi
11106
11107    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11108  fi
11109
11110              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11111$as_echo_n "checking for Boot JDK... " >&6; }
11112              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11113$as_echo "$BOOT_JDK" >&6; }
11114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11115$as_echo_n "checking Boot JDK version... " >&6; }
11116              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11117              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11118$as_echo "$BOOT_JDK_VERSION" >&6; }
11119            fi # end check jdk version
11120          fi # end check rt.jar
11121        fi # end check javac
11122      fi # end check java
11123    fi # end check boot jdk found
11124  fi
11125
11126if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11127  # Having specified an argument which is incorrect will produce an instant failure;
11128  # we should not go on looking
11129  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11130fi
11131
11132# Test: Is bootjdk available from builddeps?
11133
11134  if test "x$BOOT_JDK_FOUND" = xno; then
11135    # Now execute the test
11136
11137
11138
11139    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11140        # Source the builddeps file again, to make sure it uses the latest variables!
11141        . $builddepsfile
11142        # Look for a target and build machine specific resource!
11143        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11144        if test "x$resource" = x; then
11145            # Ok, lets instead look for a target specific resource
11146            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11147        fi
11148        if test "x$resource" = x; then
11149            # Ok, lets instead look for a build specific resource
11150            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11151        fi
11152        if test "x$resource" = x; then
11153            # Ok, lets instead look for a generic resource
11154            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11155            resource=${builddep_bootjdk}
11156        fi
11157        if test "x$resource" != x; then
11158            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11159$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11160	    # If the resource in the builddeps.conf file is an existing directory,
11161	    # for example /java/linux/cups
11162	    if test -d ${resource}; then
11163	       depdir=${resource}
11164	    else
11165
11166# bootjdk is for example mymodule
11167# $resource is for example libs/general/libmymod_1_2_3.zip
11168# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11169# $with_builddeps_dir is for example /localhome/builddeps
11170# depdir is the name of the variable into which we store the depdir, eg MYMOD
11171# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11172# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11173    filename=`basename $resource`
11174    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11175    filebase=${filename%%.*}
11176    extension=${filename#*.}
11177    installdir=$with_builddeps_dir/$filebase
11178    if test ! -f $installdir/$filename.unpacked; then
11179        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11180$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11181        if test ! -d $installdir; then
11182            mkdir -p $installdir
11183        fi
11184        if test ! -d $installdir; then
11185            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11186        fi
11187        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11188        touch $tmpfile
11189        if test ! -f $tmpfile; then
11190            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11191        fi
11192
11193    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11194    # $tmpfile is the local file name for the downloaded file.
11195    VALID_TOOL=no
11196    if test "x$BDEPS_FTP" = xwget; then
11197       VALID_TOOL=yes
11198       wget -O $tmpfile $with_builddeps_server/$resource
11199    fi
11200    if test "x$BDEPS_FTP" = xlftp; then
11201       VALID_TOOL=yes
11202       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11203    fi
11204    if test "x$BDEPS_FTP" = xftp; then
11205        VALID_TOOL=yes
11206        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11207        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11208        FTPUSERPWD=${FTPSERVER%%@*}
11209        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11210            FTPUSER=${userpwd%%:*}
11211            FTPPWD=${userpwd#*@}
11212            FTPSERVER=${FTPSERVER#*@}
11213        else
11214            FTPUSER=ftp
11215            FTPPWD=ftp
11216        fi
11217        # the "pass" command does not work on some
11218        # ftp clients (read ftp.exe) but if it works,
11219        # passive mode is better!
11220        (\
11221            echo "user $FTPUSER $FTPPWD"        ;\
11222            echo "pass"                         ;\
11223            echo "bin"                          ;\
11224            echo "get $FTPPATH $tmpfile"              ;\
11225        ) | ftp -in $FTPSERVER
11226    fi
11227    if test "x$VALID_TOOL" != xyes; then
11228       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11229    fi
11230
11231        mv $tmpfile $installdir/$filename
11232        if test ! -s $installdir/$filename; then
11233            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11234        fi
11235        case "$extension" in
11236            zip)  echo "Unzipping $installdir/$filename..."
11237               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11238            ;;
11239            tar.gz) echo "Untaring $installdir/$filename..."
11240               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11241            ;;
11242            tgz) echo "Untaring $installdir/$filename..."
11243               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11244            ;;
11245            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11246            ;;
11247        esac
11248    fi
11249    if test -f $installdir/$filename.unpacked; then
11250        depdir=$installdir
11251    fi
11252
11253	    fi
11254            # Source the builddeps file again, because in the previous command, the depdir
11255            # was updated to point at the current build dependency install directory.
11256            . $builddepsfile
11257            # Now extract variables from the builddeps.conf files.
11258            theroot=${builddep_bootjdk_ROOT}
11259            thecflags=${builddep_bootjdk_CFLAGS}
11260            thelibs=${builddep_bootjdk_LIBS}
11261            if test "x$depdir" = x; then
11262                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11263            fi
11264            BOOT_JDK=$depdir
11265            if test "x$theroot" != x; then
11266               BOOT_JDK="$theroot"
11267            fi
11268            if test "x$thecflags" != x; then
11269               BOOT_JDK_CFLAGS="$thecflags"
11270            fi
11271            if test "x$thelibs" != x; then
11272               BOOT_JDK_LIBS="$thelibs"
11273            fi
11274            BOOT_JDK_FOUND=maybe
11275            else BOOT_JDK_FOUND=no
11276
11277        fi
11278        else BOOT_JDK_FOUND=no
11279
11280    fi
11281
11282
11283
11284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11286      # Do we have a bin/java?
11287      if test ! -x "$BOOT_JDK/bin/java"; then
11288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11290        BOOT_JDK_FOUND=no
11291      else
11292        # Do we have a bin/javac?
11293        if test ! -x "$BOOT_JDK/bin/javac"; then
11294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11298          BOOT_JDK_FOUND=no
11299        else
11300          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11301          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11304            BOOT_JDK_FOUND=no
11305          else
11306            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11308
11309            # Extra M4 quote needed to protect [] in grep expression.
11310            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11311            if test "x$FOUND_VERSION_78" = x; then
11312              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11314              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11315$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11316              BOOT_JDK_FOUND=no
11317            else
11318              # We're done! :-)
11319              BOOT_JDK_FOUND=yes
11320
11321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11322
11323  # Input might be given as Windows format, start by converting to
11324  # unix format.
11325  path="$BOOT_JDK"
11326  new_path=`$CYGPATH -u "$path"`
11327
11328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11331  # "foo.exe" is OK but "foo" is an error.
11332  #
11333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11334  # It is also a way to make sure we got the proper file name for the real test later on.
11335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11336  if test "x$test_shortpath" = x; then
11337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11340  fi
11341
11342  # Call helper function which possibly converts this using DOS-style short mode.
11343  # If so, the updated path is stored in $new_path.
11344
11345  input_path="$new_path"
11346  # Check if we need to convert this using DOS-style short mode. If the path
11347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11348  # take no chances and rewrite it.
11349  # Note: m4 eats our [], so we need to use [ and ] instead.
11350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11351  if test "x$has_forbidden_chars" != x; then
11352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11356      # Going to short mode and back again did indeed matter. Since short mode is
11357      # case insensitive, let's make it lowercase to improve readability.
11358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11359      # Now convert it back to Unix-stile (cygpath)
11360      input_path=`$CYGPATH -u "$shortmode_path"`
11361      new_path="$input_path"
11362    fi
11363  fi
11364
11365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11366  if test "x$test_cygdrive_prefix" = x; then
11367    # As a simple fix, exclude /usr/bin since it's not a real path.
11368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11370      # a path prefixed by /cygdrive for fixpath to work.
11371      new_path="$CYGWIN_ROOT_PATH$input_path"
11372    fi
11373  fi
11374
11375
11376  if test "x$path" != "x$new_path"; then
11377    BOOT_JDK="$new_path"
11378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380  fi
11381
11382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11383
11384  path="$BOOT_JDK"
11385  has_colon=`$ECHO $path | $GREP ^.:`
11386  new_path="$path"
11387  if test "x$has_colon" = x; then
11388    # Not in mixed or Windows style, start by that.
11389    new_path=`cmd //c echo $path`
11390  fi
11391
11392
11393  input_path="$new_path"
11394  # Check if we need to convert this using DOS-style short mode. If the path
11395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11396  # take no chances and rewrite it.
11397  # Note: m4 eats our [], so we need to use [ and ] instead.
11398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11399  if test "x$has_forbidden_chars" != x; then
11400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11402  fi
11403
11404
11405  windows_path="$new_path"
11406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11407    unix_path=`$CYGPATH -u "$windows_path"`
11408    new_path="$unix_path"
11409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11411    new_path="$unix_path"
11412  fi
11413
11414  if test "x$path" != "x$new_path"; then
11415    BOOT_JDK="$new_path"
11416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11418  fi
11419
11420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11422
11423  else
11424    # We're on a posix platform. Hooray! :)
11425    path="$BOOT_JDK"
11426    has_space=`$ECHO "$path" | $GREP " "`
11427    if test "x$has_space" != x; then
11428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11431    fi
11432
11433    # Use eval to expand a potential ~
11434    eval path="$path"
11435    if test ! -f "$path" && test ! -d "$path"; then
11436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11437    fi
11438
11439    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11440  fi
11441
11442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11443$as_echo_n "checking for Boot JDK... " >&6; }
11444              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11445$as_echo "$BOOT_JDK" >&6; }
11446              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11447$as_echo_n "checking Boot JDK version... " >&6; }
11448              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11450$as_echo "$BOOT_JDK_VERSION" >&6; }
11451            fi # end check jdk version
11452          fi # end check rt.jar
11453        fi # end check javac
11454      fi # end check java
11455    fi # end check boot jdk found
11456  fi
11457
11458
11459# Test: Is $JAVA_HOME set?
11460
11461  if test "x$BOOT_JDK_FOUND" = xno; then
11462    # Now execute the test
11463
11464    if test "x$JAVA_HOME" != x; then
11465        JAVA_HOME_PROCESSED="$JAVA_HOME"
11466
11467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11468
11469  # Input might be given as Windows format, start by converting to
11470  # unix format.
11471  path="$JAVA_HOME_PROCESSED"
11472  new_path=`$CYGPATH -u "$path"`
11473
11474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11477  # "foo.exe" is OK but "foo" is an error.
11478  #
11479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11480  # It is also a way to make sure we got the proper file name for the real test later on.
11481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11482  if test "x$test_shortpath" = x; then
11483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11484$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11485    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11486  fi
11487
11488  # Call helper function which possibly converts this using DOS-style short mode.
11489  # If so, the updated path is stored in $new_path.
11490
11491  input_path="$new_path"
11492  # Check if we need to convert this using DOS-style short mode. If the path
11493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11494  # take no chances and rewrite it.
11495  # Note: m4 eats our [], so we need to use [ and ] instead.
11496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11497  if test "x$has_forbidden_chars" != x; then
11498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11502      # Going to short mode and back again did indeed matter. Since short mode is
11503      # case insensitive, let's make it lowercase to improve readability.
11504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11505      # Now convert it back to Unix-stile (cygpath)
11506      input_path=`$CYGPATH -u "$shortmode_path"`
11507      new_path="$input_path"
11508    fi
11509  fi
11510
11511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11512  if test "x$test_cygdrive_prefix" = x; then
11513    # As a simple fix, exclude /usr/bin since it's not a real path.
11514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11516      # a path prefixed by /cygdrive for fixpath to work.
11517      new_path="$CYGWIN_ROOT_PATH$input_path"
11518    fi
11519  fi
11520
11521
11522  if test "x$path" != "x$new_path"; then
11523    JAVA_HOME_PROCESSED="$new_path"
11524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11525$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11526  fi
11527
11528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11529
11530  path="$JAVA_HOME_PROCESSED"
11531  has_colon=`$ECHO $path | $GREP ^.:`
11532  new_path="$path"
11533  if test "x$has_colon" = x; then
11534    # Not in mixed or Windows style, start by that.
11535    new_path=`cmd //c echo $path`
11536  fi
11537
11538
11539  input_path="$new_path"
11540  # Check if we need to convert this using DOS-style short mode. If the path
11541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11542  # take no chances and rewrite it.
11543  # Note: m4 eats our [], so we need to use [ and ] instead.
11544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11545  if test "x$has_forbidden_chars" != x; then
11546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11548  fi
11549
11550
11551  windows_path="$new_path"
11552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11553    unix_path=`$CYGPATH -u "$windows_path"`
11554    new_path="$unix_path"
11555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11557    new_path="$unix_path"
11558  fi
11559
11560  if test "x$path" != "x$new_path"; then
11561    JAVA_HOME_PROCESSED="$new_path"
11562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11563$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11564  fi
11565
11566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11568
11569  else
11570    # We're on a posix platform. Hooray! :)
11571    path="$JAVA_HOME_PROCESSED"
11572    has_space=`$ECHO "$path" | $GREP " "`
11573    if test "x$has_space" != x; then
11574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11575$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11576      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11577    fi
11578
11579    # Use eval to expand a potential ~
11580    eval path="$path"
11581    if test ! -f "$path" && test ! -d "$path"; then
11582      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11583    fi
11584
11585    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11586  fi
11587
11588        if test ! -d "$JAVA_HOME_PROCESSED"; then
11589            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11590$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11591        else
11592          # Aha, the user has set a JAVA_HOME
11593          # let us use that as the Boot JDK.
11594          BOOT_JDK="$JAVA_HOME_PROCESSED"
11595          BOOT_JDK_FOUND=maybe
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11597$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11598        fi
11599    fi
11600
11601
11602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11604      # Do we have a bin/java?
11605      if test ! -x "$BOOT_JDK/bin/java"; then
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11608        BOOT_JDK_FOUND=no
11609      else
11610        # Do we have a bin/javac?
11611        if test ! -x "$BOOT_JDK/bin/javac"; then
11612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11616          BOOT_JDK_FOUND=no
11617        else
11618          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11619          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11620            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11622            BOOT_JDK_FOUND=no
11623          else
11624            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11626
11627            # Extra M4 quote needed to protect [] in grep expression.
11628            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11629            if test "x$FOUND_VERSION_78" = x; then
11630              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11632              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11633$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11634              BOOT_JDK_FOUND=no
11635            else
11636              # We're done! :-)
11637              BOOT_JDK_FOUND=yes
11638
11639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11640
11641  # Input might be given as Windows format, start by converting to
11642  # unix format.
11643  path="$BOOT_JDK"
11644  new_path=`$CYGPATH -u "$path"`
11645
11646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11649  # "foo.exe" is OK but "foo" is an error.
11650  #
11651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11652  # It is also a way to make sure we got the proper file name for the real test later on.
11653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11654  if test "x$test_shortpath" = x; then
11655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11657    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11658  fi
11659
11660  # Call helper function which possibly converts this using DOS-style short mode.
11661  # If so, the updated path is stored in $new_path.
11662
11663  input_path="$new_path"
11664  # Check if we need to convert this using DOS-style short mode. If the path
11665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11666  # take no chances and rewrite it.
11667  # Note: m4 eats our [], so we need to use [ and ] instead.
11668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11669  if test "x$has_forbidden_chars" != x; then
11670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11674      # Going to short mode and back again did indeed matter. Since short mode is
11675      # case insensitive, let's make it lowercase to improve readability.
11676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11677      # Now convert it back to Unix-stile (cygpath)
11678      input_path=`$CYGPATH -u "$shortmode_path"`
11679      new_path="$input_path"
11680    fi
11681  fi
11682
11683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11684  if test "x$test_cygdrive_prefix" = x; then
11685    # As a simple fix, exclude /usr/bin since it's not a real path.
11686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11688      # a path prefixed by /cygdrive for fixpath to work.
11689      new_path="$CYGWIN_ROOT_PATH$input_path"
11690    fi
11691  fi
11692
11693
11694  if test "x$path" != "x$new_path"; then
11695    BOOT_JDK="$new_path"
11696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11698  fi
11699
11700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701
11702  path="$BOOT_JDK"
11703  has_colon=`$ECHO $path | $GREP ^.:`
11704  new_path="$path"
11705  if test "x$has_colon" = x; then
11706    # Not in mixed or Windows style, start by that.
11707    new_path=`cmd //c echo $path`
11708  fi
11709
11710
11711  input_path="$new_path"
11712  # Check if we need to convert this using DOS-style short mode. If the path
11713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714  # take no chances and rewrite it.
11715  # Note: m4 eats our [], so we need to use [ and ] instead.
11716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11717  if test "x$has_forbidden_chars" != x; then
11718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11720  fi
11721
11722
11723  windows_path="$new_path"
11724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11725    unix_path=`$CYGPATH -u "$windows_path"`
11726    new_path="$unix_path"
11727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11729    new_path="$unix_path"
11730  fi
11731
11732  if test "x$path" != "x$new_path"; then
11733    BOOT_JDK="$new_path"
11734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11736  fi
11737
11738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11740
11741  else
11742    # We're on a posix platform. Hooray! :)
11743    path="$BOOT_JDK"
11744    has_space=`$ECHO "$path" | $GREP " "`
11745    if test "x$has_space" != x; then
11746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11749    fi
11750
11751    # Use eval to expand a potential ~
11752    eval path="$path"
11753    if test ! -f "$path" && test ! -d "$path"; then
11754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11755    fi
11756
11757    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11758  fi
11759
11760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11761$as_echo_n "checking for Boot JDK... " >&6; }
11762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11763$as_echo "$BOOT_JDK" >&6; }
11764              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11765$as_echo_n "checking Boot JDK version... " >&6; }
11766              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11768$as_echo "$BOOT_JDK_VERSION" >&6; }
11769            fi # end check jdk version
11770          fi # end check rt.jar
11771        fi # end check javac
11772      fi # end check java
11773    fi # end check boot jdk found
11774  fi
11775
11776
11777# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11778
11779  if test "x$BOOT_JDK_FOUND" = xno; then
11780    # Now execute the test
11781
11782    if test -x /usr/libexec/java_home; then
11783        BOOT_JDK=`/usr/libexec/java_home`
11784        BOOT_JDK_FOUND=maybe
11785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11786$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11787    fi
11788
11789
11790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11792      # Do we have a bin/java?
11793      if test ! -x "$BOOT_JDK/bin/java"; then
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11796        BOOT_JDK_FOUND=no
11797      else
11798        # Do we have a bin/javac?
11799        if test ! -x "$BOOT_JDK/bin/javac"; then
11800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11804          BOOT_JDK_FOUND=no
11805        else
11806          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11807          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11810            BOOT_JDK_FOUND=no
11811          else
11812            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11813            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11814
11815            # Extra M4 quote needed to protect [] in grep expression.
11816            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11817            if test "x$FOUND_VERSION_78" = x; then
11818              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11820              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11821$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11822              BOOT_JDK_FOUND=no
11823            else
11824              # We're done! :-)
11825              BOOT_JDK_FOUND=yes
11826
11827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828
11829  # Input might be given as Windows format, start by converting to
11830  # unix format.
11831  path="$BOOT_JDK"
11832  new_path=`$CYGPATH -u "$path"`
11833
11834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837  # "foo.exe" is OK but "foo" is an error.
11838  #
11839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840  # It is also a way to make sure we got the proper file name for the real test later on.
11841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842  if test "x$test_shortpath" = x; then
11843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11845    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11846  fi
11847
11848  # Call helper function which possibly converts this using DOS-style short mode.
11849  # If so, the updated path is stored in $new_path.
11850
11851  input_path="$new_path"
11852  # Check if we need to convert this using DOS-style short mode. If the path
11853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854  # take no chances and rewrite it.
11855  # Note: m4 eats our [], so we need to use [ and ] instead.
11856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11857  if test "x$has_forbidden_chars" != x; then
11858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862      # Going to short mode and back again did indeed matter. Since short mode is
11863      # case insensitive, let's make it lowercase to improve readability.
11864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865      # Now convert it back to Unix-stile (cygpath)
11866      input_path=`$CYGPATH -u "$shortmode_path"`
11867      new_path="$input_path"
11868    fi
11869  fi
11870
11871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872  if test "x$test_cygdrive_prefix" = x; then
11873    # As a simple fix, exclude /usr/bin since it's not a real path.
11874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876      # a path prefixed by /cygdrive for fixpath to work.
11877      new_path="$CYGWIN_ROOT_PATH$input_path"
11878    fi
11879  fi
11880
11881
11882  if test "x$path" != "x$new_path"; then
11883    BOOT_JDK="$new_path"
11884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11886  fi
11887
11888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889
11890  path="$BOOT_JDK"
11891  has_colon=`$ECHO $path | $GREP ^.:`
11892  new_path="$path"
11893  if test "x$has_colon" = x; then
11894    # Not in mixed or Windows style, start by that.
11895    new_path=`cmd //c echo $path`
11896  fi
11897
11898
11899  input_path="$new_path"
11900  # Check if we need to convert this using DOS-style short mode. If the path
11901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902  # take no chances and rewrite it.
11903  # Note: m4 eats our [], so we need to use [ and ] instead.
11904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905  if test "x$has_forbidden_chars" != x; then
11906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908  fi
11909
11910
11911  windows_path="$new_path"
11912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913    unix_path=`$CYGPATH -u "$windows_path"`
11914    new_path="$unix_path"
11915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917    new_path="$unix_path"
11918  fi
11919
11920  if test "x$path" != "x$new_path"; then
11921    BOOT_JDK="$new_path"
11922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11924  fi
11925
11926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928
11929  else
11930    # We're on a posix platform. Hooray! :)
11931    path="$BOOT_JDK"
11932    has_space=`$ECHO "$path" | $GREP " "`
11933    if test "x$has_space" != x; then
11934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937    fi
11938
11939    # Use eval to expand a potential ~
11940    eval path="$path"
11941    if test ! -f "$path" && test ! -d "$path"; then
11942      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11943    fi
11944
11945    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11946  fi
11947
11948              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11949$as_echo_n "checking for Boot JDK... " >&6; }
11950              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11951$as_echo "$BOOT_JDK" >&6; }
11952              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11953$as_echo_n "checking Boot JDK version... " >&6; }
11954              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11956$as_echo "$BOOT_JDK_VERSION" >&6; }
11957            fi # end check jdk version
11958          fi # end check rt.jar
11959        fi # end check javac
11960      fi # end check java
11961    fi # end check boot jdk found
11962  fi
11963
11964
11965# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11966
11967  if test "x$BOOT_JDK_FOUND" = xno; then
11968    # Now execute the test
11969
11970    # Extract the first word of "javac", so it can be a program name with args.
11971set dummy javac; ac_word=$2
11972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973$as_echo_n "checking for $ac_word... " >&6; }
11974if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11975  $as_echo_n "(cached) " >&6
11976else
11977  case $JAVAC_CHECK in
11978  [\\/]* | ?:[\\/]*)
11979  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11980  ;;
11981  *)
11982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983for as_dir in $PATH
11984do
11985  IFS=$as_save_IFS
11986  test -z "$as_dir" && as_dir=.
11987    for ac_exec_ext in '' $ac_executable_extensions; do
11988  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11989    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991    break 2
11992  fi
11993done
11994  done
11995IFS=$as_save_IFS
11996
11997  ;;
11998esac
11999fi
12000JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12001if test -n "$JAVAC_CHECK"; then
12002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12003$as_echo "$JAVAC_CHECK" >&6; }
12004else
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006$as_echo "no" >&6; }
12007fi
12008
12009
12010    # Extract the first word of "java", so it can be a program name with args.
12011set dummy java; ac_word=$2
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
12014if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12015  $as_echo_n "(cached) " >&6
12016else
12017  case $JAVA_CHECK in
12018  [\\/]* | ?:[\\/]*)
12019  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12020  ;;
12021  *)
12022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023for as_dir in $PATH
12024do
12025  IFS=$as_save_IFS
12026  test -z "$as_dir" && as_dir=.
12027    for ac_exec_ext in '' $ac_executable_extensions; do
12028  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12029    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031    break 2
12032  fi
12033done
12034  done
12035IFS=$as_save_IFS
12036
12037  ;;
12038esac
12039fi
12040JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12041if test -n "$JAVA_CHECK"; then
12042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12043$as_echo "$JAVA_CHECK" >&6; }
12044else
12045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
12047fi
12048
12049
12050    BINARY="$JAVAC_CHECK"
12051    if test "x$JAVAC_CHECK" = x; then
12052        BINARY="$JAVA_CHECK"
12053    fi
12054    if test "x$BINARY" != x; then
12055        # So there is a java(c) binary, it might be part of a JDK.
12056        # Lets find the JDK/JRE directory by following symbolic links.
12057        # Linux/GNU systems often have links from /usr/bin/java to
12058        # /etc/alternatives/java to the real JDK binary.
12059
12060    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12061        # Follow a chain of symbolic links. Use readlink
12062        # where it exists, else fall back to horribly
12063        # complicated shell code.
12064        if test "x$READLINK_TESTED" != yes; then
12065            # On MacOSX there is a readlink tool with a different
12066            # purpose than the GNU readlink tool. Check the found readlink.
12067            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12068            if test "x$ISGNU" = x; then
12069                 # A readlink that we do not know how to use.
12070                 # Are there other non-GNU readlinks out there?
12071                 READLINK_TESTED=yes
12072                 READLINK=
12073            fi
12074        fi
12075
12076        if test "x$READLINK" != x; then
12077            BINARY=`$READLINK -f $BINARY`
12078        else
12079            # Save the current directory for restoring afterwards
12080            STARTDIR=$PWD
12081            COUNTER=0
12082            sym_link_dir=`$DIRNAME $BINARY`
12083            sym_link_file=`$BASENAME $BINARY`
12084            cd $sym_link_dir
12085            # Use -P flag to resolve symlinks in directories.
12086            cd `$THEPWDCMD -P`
12087            sym_link_dir=`$THEPWDCMD -P`
12088            # Resolve file symlinks
12089            while test $COUNTER -lt 20; do
12090                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12091                if test "x$ISLINK" == x; then
12092                    # This is not a symbolic link! We are done!
12093                    break
12094                fi
12095                # Again resolve directory symlinks since the target of the just found
12096                # link could be in a different directory
12097                cd `$DIRNAME $ISLINK`
12098                sym_link_dir=`$THEPWDCMD -P`
12099                sym_link_file=`$BASENAME $ISLINK`
12100                let COUNTER=COUNTER+1
12101            done
12102            cd $STARTDIR
12103            BINARY=$sym_link_dir/$sym_link_file
12104        fi
12105    fi
12106
12107        BOOT_JDK=`dirname "$BINARY"`
12108        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12109        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12110            # Looks like we found ourselves an JDK
12111            BOOT_JDK_FOUND=maybe
12112            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12113$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12114        fi
12115    fi
12116
12117
12118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12120      # Do we have a bin/java?
12121      if test ! -x "$BOOT_JDK/bin/java"; then
12122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12124        BOOT_JDK_FOUND=no
12125      else
12126        # Do we have a bin/javac?
12127        if test ! -x "$BOOT_JDK/bin/javac"; then
12128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12132          BOOT_JDK_FOUND=no
12133        else
12134          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12135          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12136            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12138            BOOT_JDK_FOUND=no
12139          else
12140            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12141            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12142
12143            # Extra M4 quote needed to protect [] in grep expression.
12144            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12145            if test "x$FOUND_VERSION_78" = x; then
12146              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12148              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12149$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12150              BOOT_JDK_FOUND=no
12151            else
12152              # We're done! :-)
12153              BOOT_JDK_FOUND=yes
12154
12155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12156
12157  # Input might be given as Windows format, start by converting to
12158  # unix format.
12159  path="$BOOT_JDK"
12160  new_path=`$CYGPATH -u "$path"`
12161
12162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12165  # "foo.exe" is OK but "foo" is an error.
12166  #
12167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12168  # It is also a way to make sure we got the proper file name for the real test later on.
12169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12170  if test "x$test_shortpath" = x; then
12171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12174  fi
12175
12176  # Call helper function which possibly converts this using DOS-style short mode.
12177  # If so, the updated path is stored in $new_path.
12178
12179  input_path="$new_path"
12180  # Check if we need to convert this using DOS-style short mode. If the path
12181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12182  # take no chances and rewrite it.
12183  # Note: m4 eats our [], so we need to use [ and ] instead.
12184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12185  if test "x$has_forbidden_chars" != x; then
12186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12190      # Going to short mode and back again did indeed matter. Since short mode is
12191      # case insensitive, let's make it lowercase to improve readability.
12192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12193      # Now convert it back to Unix-stile (cygpath)
12194      input_path=`$CYGPATH -u "$shortmode_path"`
12195      new_path="$input_path"
12196    fi
12197  fi
12198
12199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12200  if test "x$test_cygdrive_prefix" = x; then
12201    # As a simple fix, exclude /usr/bin since it's not a real path.
12202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12204      # a path prefixed by /cygdrive for fixpath to work.
12205      new_path="$CYGWIN_ROOT_PATH$input_path"
12206    fi
12207  fi
12208
12209
12210  if test "x$path" != "x$new_path"; then
12211    BOOT_JDK="$new_path"
12212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12214  fi
12215
12216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12217
12218  path="$BOOT_JDK"
12219  has_colon=`$ECHO $path | $GREP ^.:`
12220  new_path="$path"
12221  if test "x$has_colon" = x; then
12222    # Not in mixed or Windows style, start by that.
12223    new_path=`cmd //c echo $path`
12224  fi
12225
12226
12227  input_path="$new_path"
12228  # Check if we need to convert this using DOS-style short mode. If the path
12229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12230  # take no chances and rewrite it.
12231  # Note: m4 eats our [], so we need to use [ and ] instead.
12232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12233  if test "x$has_forbidden_chars" != x; then
12234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12236  fi
12237
12238
12239  windows_path="$new_path"
12240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12241    unix_path=`$CYGPATH -u "$windows_path"`
12242    new_path="$unix_path"
12243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12245    new_path="$unix_path"
12246  fi
12247
12248  if test "x$path" != "x$new_path"; then
12249    BOOT_JDK="$new_path"
12250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252  fi
12253
12254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12256
12257  else
12258    # We're on a posix platform. Hooray! :)
12259    path="$BOOT_JDK"
12260    has_space=`$ECHO "$path" | $GREP " "`
12261    if test "x$has_space" != x; then
12262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12264      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12265    fi
12266
12267    # Use eval to expand a potential ~
12268    eval path="$path"
12269    if test ! -f "$path" && test ! -d "$path"; then
12270      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12271    fi
12272
12273    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12274  fi
12275
12276              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12277$as_echo_n "checking for Boot JDK... " >&6; }
12278              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12279$as_echo "$BOOT_JDK" >&6; }
12280              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12281$as_echo_n "checking Boot JDK version... " >&6; }
12282              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12284$as_echo "$BOOT_JDK_VERSION" >&6; }
12285            fi # end check jdk version
12286          fi # end check rt.jar
12287        fi # end check javac
12288      fi # end check java
12289    fi # end check boot jdk found
12290  fi
12291
12292
12293# Test: Is there a JDK installed in default, well-known locations?
12294
12295  if test "x$BOOT_JDK_FOUND" = xno; then
12296    # Now execute the test
12297
12298  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12299
12300  if test "x$BOOT_JDK_FOUND" = xno; then
12301    # Now execute the test
12302
12303  if test "x$ProgramW6432" != x; then
12304    VIRTUAL_DIR="$ProgramW6432/Java"
12305
12306  windows_path="$VIRTUAL_DIR"
12307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12308    unix_path=`$CYGPATH -u "$windows_path"`
12309    VIRTUAL_DIR="$unix_path"
12310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12312    VIRTUAL_DIR="$unix_path"
12313  fi
12314
12315
12316  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12317  BOOT_JDK_SUFFIX=""
12318  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12319  if test "x$ALL_JDKS_FOUND" != x; then
12320    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12321
12322  if test "x$BOOT_JDK_FOUND" = xno; then
12323    # Now execute the test
12324
12325        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12326        if test -d "$BOOT_JDK"; then
12327          BOOT_JDK_FOUND=maybe
12328          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12329$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12330        fi
12331
12332
12333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12335      # Do we have a bin/java?
12336      if test ! -x "$BOOT_JDK/bin/java"; then
12337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12339        BOOT_JDK_FOUND=no
12340      else
12341        # Do we have a bin/javac?
12342        if test ! -x "$BOOT_JDK/bin/javac"; then
12343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12347          BOOT_JDK_FOUND=no
12348        else
12349          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12350          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12353            BOOT_JDK_FOUND=no
12354          else
12355            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12356            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12357
12358            # Extra M4 quote needed to protect [] in grep expression.
12359            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12360            if test "x$FOUND_VERSION_78" = x; then
12361              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12363              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12364$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12365              BOOT_JDK_FOUND=no
12366            else
12367              # We're done! :-)
12368              BOOT_JDK_FOUND=yes
12369
12370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12371
12372  # Input might be given as Windows format, start by converting to
12373  # unix format.
12374  path="$BOOT_JDK"
12375  new_path=`$CYGPATH -u "$path"`
12376
12377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12380  # "foo.exe" is OK but "foo" is an error.
12381  #
12382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12383  # It is also a way to make sure we got the proper file name for the real test later on.
12384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12385  if test "x$test_shortpath" = x; then
12386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12389  fi
12390
12391  # Call helper function which possibly converts this using DOS-style short mode.
12392  # If so, the updated path is stored in $new_path.
12393
12394  input_path="$new_path"
12395  # Check if we need to convert this using DOS-style short mode. If the path
12396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12397  # take no chances and rewrite it.
12398  # Note: m4 eats our [], so we need to use [ and ] instead.
12399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12400  if test "x$has_forbidden_chars" != x; then
12401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12405      # Going to short mode and back again did indeed matter. Since short mode is
12406      # case insensitive, let's make it lowercase to improve readability.
12407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12408      # Now convert it back to Unix-stile (cygpath)
12409      input_path=`$CYGPATH -u "$shortmode_path"`
12410      new_path="$input_path"
12411    fi
12412  fi
12413
12414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12415  if test "x$test_cygdrive_prefix" = x; then
12416    # As a simple fix, exclude /usr/bin since it's not a real path.
12417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12419      # a path prefixed by /cygdrive for fixpath to work.
12420      new_path="$CYGWIN_ROOT_PATH$input_path"
12421    fi
12422  fi
12423
12424
12425  if test "x$path" != "x$new_path"; then
12426    BOOT_JDK="$new_path"
12427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12429  fi
12430
12431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12432
12433  path="$BOOT_JDK"
12434  has_colon=`$ECHO $path | $GREP ^.:`
12435  new_path="$path"
12436  if test "x$has_colon" = x; then
12437    # Not in mixed or Windows style, start by that.
12438    new_path=`cmd //c echo $path`
12439  fi
12440
12441
12442  input_path="$new_path"
12443  # Check if we need to convert this using DOS-style short mode. If the path
12444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12445  # take no chances and rewrite it.
12446  # Note: m4 eats our [], so we need to use [ and ] instead.
12447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12448  if test "x$has_forbidden_chars" != x; then
12449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12451  fi
12452
12453
12454  windows_path="$new_path"
12455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12456    unix_path=`$CYGPATH -u "$windows_path"`
12457    new_path="$unix_path"
12458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12460    new_path="$unix_path"
12461  fi
12462
12463  if test "x$path" != "x$new_path"; then
12464    BOOT_JDK="$new_path"
12465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12467  fi
12468
12469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12471
12472  else
12473    # We're on a posix platform. Hooray! :)
12474    path="$BOOT_JDK"
12475    has_space=`$ECHO "$path" | $GREP " "`
12476    if test "x$has_space" != x; then
12477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12479      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12480    fi
12481
12482    # Use eval to expand a potential ~
12483    eval path="$path"
12484    if test ! -f "$path" && test ! -d "$path"; then
12485      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12486    fi
12487
12488    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12489  fi
12490
12491              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12492$as_echo_n "checking for Boot JDK... " >&6; }
12493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12494$as_echo "$BOOT_JDK" >&6; }
12495              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12496$as_echo_n "checking Boot JDK version... " >&6; }
12497              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12498              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12499$as_echo "$BOOT_JDK_VERSION" >&6; }
12500            fi # end check jdk version
12501          fi # end check rt.jar
12502        fi # end check javac
12503      fi # end check java
12504    fi # end check boot jdk found
12505  fi
12506
12507    done
12508  fi
12509
12510  fi
12511
12512
12513    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12514    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12515      # Do we have a bin/java?
12516      if test ! -x "$BOOT_JDK/bin/java"; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12519        BOOT_JDK_FOUND=no
12520      else
12521        # Do we have a bin/javac?
12522        if test ! -x "$BOOT_JDK/bin/javac"; then
12523          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12525          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12526$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12527          BOOT_JDK_FOUND=no
12528        else
12529          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12530          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12533            BOOT_JDK_FOUND=no
12534          else
12535            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12537
12538            # Extra M4 quote needed to protect [] in grep expression.
12539            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12540            if test "x$FOUND_VERSION_78" = x; then
12541              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12543              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12544$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12545              BOOT_JDK_FOUND=no
12546            else
12547              # We're done! :-)
12548              BOOT_JDK_FOUND=yes
12549
12550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551
12552  # Input might be given as Windows format, start by converting to
12553  # unix format.
12554  path="$BOOT_JDK"
12555  new_path=`$CYGPATH -u "$path"`
12556
12557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12560  # "foo.exe" is OK but "foo" is an error.
12561  #
12562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12563  # It is also a way to make sure we got the proper file name for the real test later on.
12564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12565  if test "x$test_shortpath" = x; then
12566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12569  fi
12570
12571  # Call helper function which possibly converts this using DOS-style short mode.
12572  # If so, the updated path is stored in $new_path.
12573
12574  input_path="$new_path"
12575  # Check if we need to convert this using DOS-style short mode. If the path
12576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12577  # take no chances and rewrite it.
12578  # Note: m4 eats our [], so we need to use [ and ] instead.
12579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12580  if test "x$has_forbidden_chars" != x; then
12581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12585      # Going to short mode and back again did indeed matter. Since short mode is
12586      # case insensitive, let's make it lowercase to improve readability.
12587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588      # Now convert it back to Unix-stile (cygpath)
12589      input_path=`$CYGPATH -u "$shortmode_path"`
12590      new_path="$input_path"
12591    fi
12592  fi
12593
12594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12595  if test "x$test_cygdrive_prefix" = x; then
12596    # As a simple fix, exclude /usr/bin since it's not a real path.
12597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12599      # a path prefixed by /cygdrive for fixpath to work.
12600      new_path="$CYGWIN_ROOT_PATH$input_path"
12601    fi
12602  fi
12603
12604
12605  if test "x$path" != "x$new_path"; then
12606    BOOT_JDK="$new_path"
12607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12609  fi
12610
12611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612
12613  path="$BOOT_JDK"
12614  has_colon=`$ECHO $path | $GREP ^.:`
12615  new_path="$path"
12616  if test "x$has_colon" = x; then
12617    # Not in mixed or Windows style, start by that.
12618    new_path=`cmd //c echo $path`
12619  fi
12620
12621
12622  input_path="$new_path"
12623  # Check if we need to convert this using DOS-style short mode. If the path
12624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625  # take no chances and rewrite it.
12626  # Note: m4 eats our [], so we need to use [ and ] instead.
12627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12628  if test "x$has_forbidden_chars" != x; then
12629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631  fi
12632
12633
12634  windows_path="$new_path"
12635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636    unix_path=`$CYGPATH -u "$windows_path"`
12637    new_path="$unix_path"
12638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640    new_path="$unix_path"
12641  fi
12642
12643  if test "x$path" != "x$new_path"; then
12644    BOOT_JDK="$new_path"
12645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647  fi
12648
12649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12651
12652  else
12653    # We're on a posix platform. Hooray! :)
12654    path="$BOOT_JDK"
12655    has_space=`$ECHO "$path" | $GREP " "`
12656    if test "x$has_space" != x; then
12657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12659      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12660    fi
12661
12662    # Use eval to expand a potential ~
12663    eval path="$path"
12664    if test ! -f "$path" && test ! -d "$path"; then
12665      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12666    fi
12667
12668    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12669  fi
12670
12671              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12672$as_echo_n "checking for Boot JDK... " >&6; }
12673              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12674$as_echo "$BOOT_JDK" >&6; }
12675              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12676$as_echo_n "checking Boot JDK version... " >&6; }
12677              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12678              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12679$as_echo "$BOOT_JDK_VERSION" >&6; }
12680            fi # end check jdk version
12681          fi # end check rt.jar
12682        fi # end check javac
12683      fi # end check java
12684    fi # end check boot jdk found
12685  fi
12686
12687
12688  if test "x$BOOT_JDK_FOUND" = xno; then
12689    # Now execute the test
12690
12691  if test "x$PROGRAMW6432" != x; then
12692    VIRTUAL_DIR="$PROGRAMW6432/Java"
12693
12694  windows_path="$VIRTUAL_DIR"
12695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696    unix_path=`$CYGPATH -u "$windows_path"`
12697    VIRTUAL_DIR="$unix_path"
12698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12700    VIRTUAL_DIR="$unix_path"
12701  fi
12702
12703
12704  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12705  BOOT_JDK_SUFFIX=""
12706  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12707  if test "x$ALL_JDKS_FOUND" != x; then
12708    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12709
12710  if test "x$BOOT_JDK_FOUND" = xno; then
12711    # Now execute the test
12712
12713        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12714        if test -d "$BOOT_JDK"; then
12715          BOOT_JDK_FOUND=maybe
12716          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12717$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12718        fi
12719
12720
12721    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12722    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12723      # Do we have a bin/java?
12724      if test ! -x "$BOOT_JDK/bin/java"; then
12725        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12727        BOOT_JDK_FOUND=no
12728      else
12729        # Do we have a bin/javac?
12730        if test ! -x "$BOOT_JDK/bin/javac"; then
12731          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12733          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12734$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12735          BOOT_JDK_FOUND=no
12736        else
12737          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12738          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12739            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12741            BOOT_JDK_FOUND=no
12742          else
12743            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12744            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12745
12746            # Extra M4 quote needed to protect [] in grep expression.
12747            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12748            if test "x$FOUND_VERSION_78" = x; then
12749              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12751              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12752$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12753              BOOT_JDK_FOUND=no
12754            else
12755              # We're done! :-)
12756              BOOT_JDK_FOUND=yes
12757
12758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12759
12760  # Input might be given as Windows format, start by converting to
12761  # unix format.
12762  path="$BOOT_JDK"
12763  new_path=`$CYGPATH -u "$path"`
12764
12765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12768  # "foo.exe" is OK but "foo" is an error.
12769  #
12770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12771  # It is also a way to make sure we got the proper file name for the real test later on.
12772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12773  if test "x$test_shortpath" = x; then
12774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12777  fi
12778
12779  # Call helper function which possibly converts this using DOS-style short mode.
12780  # If so, the updated path is stored in $new_path.
12781
12782  input_path="$new_path"
12783  # Check if we need to convert this using DOS-style short mode. If the path
12784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12785  # take no chances and rewrite it.
12786  # Note: m4 eats our [], so we need to use [ and ] instead.
12787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12788  if test "x$has_forbidden_chars" != x; then
12789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12793      # Going to short mode and back again did indeed matter. Since short mode is
12794      # case insensitive, let's make it lowercase to improve readability.
12795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12796      # Now convert it back to Unix-stile (cygpath)
12797      input_path=`$CYGPATH -u "$shortmode_path"`
12798      new_path="$input_path"
12799    fi
12800  fi
12801
12802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12803  if test "x$test_cygdrive_prefix" = x; then
12804    # As a simple fix, exclude /usr/bin since it's not a real path.
12805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12807      # a path prefixed by /cygdrive for fixpath to work.
12808      new_path="$CYGWIN_ROOT_PATH$input_path"
12809    fi
12810  fi
12811
12812
12813  if test "x$path" != "x$new_path"; then
12814    BOOT_JDK="$new_path"
12815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12817  fi
12818
12819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12820
12821  path="$BOOT_JDK"
12822  has_colon=`$ECHO $path | $GREP ^.:`
12823  new_path="$path"
12824  if test "x$has_colon" = x; then
12825    # Not in mixed or Windows style, start by that.
12826    new_path=`cmd //c echo $path`
12827  fi
12828
12829
12830  input_path="$new_path"
12831  # Check if we need to convert this using DOS-style short mode. If the path
12832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12833  # take no chances and rewrite it.
12834  # Note: m4 eats our [], so we need to use [ and ] instead.
12835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12836  if test "x$has_forbidden_chars" != x; then
12837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12839  fi
12840
12841
12842  windows_path="$new_path"
12843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12844    unix_path=`$CYGPATH -u "$windows_path"`
12845    new_path="$unix_path"
12846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12848    new_path="$unix_path"
12849  fi
12850
12851  if test "x$path" != "x$new_path"; then
12852    BOOT_JDK="$new_path"
12853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12855  fi
12856
12857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12859
12860  else
12861    # We're on a posix platform. Hooray! :)
12862    path="$BOOT_JDK"
12863    has_space=`$ECHO "$path" | $GREP " "`
12864    if test "x$has_space" != x; then
12865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12867      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12868    fi
12869
12870    # Use eval to expand a potential ~
12871    eval path="$path"
12872    if test ! -f "$path" && test ! -d "$path"; then
12873      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12874    fi
12875
12876    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12877  fi
12878
12879              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12880$as_echo_n "checking for Boot JDK... " >&6; }
12881              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12882$as_echo "$BOOT_JDK" >&6; }
12883              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12884$as_echo_n "checking Boot JDK version... " >&6; }
12885              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12886              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12887$as_echo "$BOOT_JDK_VERSION" >&6; }
12888            fi # end check jdk version
12889          fi # end check rt.jar
12890        fi # end check javac
12891      fi # end check java
12892    fi # end check boot jdk found
12893  fi
12894
12895    done
12896  fi
12897
12898  fi
12899
12900
12901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12903      # Do we have a bin/java?
12904      if test ! -x "$BOOT_JDK/bin/java"; then
12905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12907        BOOT_JDK_FOUND=no
12908      else
12909        # Do we have a bin/javac?
12910        if test ! -x "$BOOT_JDK/bin/javac"; then
12911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12915          BOOT_JDK_FOUND=no
12916        else
12917          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12918          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12921            BOOT_JDK_FOUND=no
12922          else
12923            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12925
12926            # Extra M4 quote needed to protect [] in grep expression.
12927            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12928            if test "x$FOUND_VERSION_78" = x; then
12929              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12931              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12932$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12933              BOOT_JDK_FOUND=no
12934            else
12935              # We're done! :-)
12936              BOOT_JDK_FOUND=yes
12937
12938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12939
12940  # Input might be given as Windows format, start by converting to
12941  # unix format.
12942  path="$BOOT_JDK"
12943  new_path=`$CYGPATH -u "$path"`
12944
12945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12948  # "foo.exe" is OK but "foo" is an error.
12949  #
12950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12951  # It is also a way to make sure we got the proper file name for the real test later on.
12952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12953  if test "x$test_shortpath" = x; then
12954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12957  fi
12958
12959  # Call helper function which possibly converts this using DOS-style short mode.
12960  # If so, the updated path is stored in $new_path.
12961
12962  input_path="$new_path"
12963  # Check if we need to convert this using DOS-style short mode. If the path
12964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12965  # take no chances and rewrite it.
12966  # Note: m4 eats our [], so we need to use [ and ] instead.
12967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12968  if test "x$has_forbidden_chars" != x; then
12969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12973      # Going to short mode and back again did indeed matter. Since short mode is
12974      # case insensitive, let's make it lowercase to improve readability.
12975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976      # Now convert it back to Unix-stile (cygpath)
12977      input_path=`$CYGPATH -u "$shortmode_path"`
12978      new_path="$input_path"
12979    fi
12980  fi
12981
12982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12983  if test "x$test_cygdrive_prefix" = x; then
12984    # As a simple fix, exclude /usr/bin since it's not a real path.
12985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12987      # a path prefixed by /cygdrive for fixpath to work.
12988      new_path="$CYGWIN_ROOT_PATH$input_path"
12989    fi
12990  fi
12991
12992
12993  if test "x$path" != "x$new_path"; then
12994    BOOT_JDK="$new_path"
12995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12997  fi
12998
12999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13000
13001  path="$BOOT_JDK"
13002  has_colon=`$ECHO $path | $GREP ^.:`
13003  new_path="$path"
13004  if test "x$has_colon" = x; then
13005    # Not in mixed or Windows style, start by that.
13006    new_path=`cmd //c echo $path`
13007  fi
13008
13009
13010  input_path="$new_path"
13011  # Check if we need to convert this using DOS-style short mode. If the path
13012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013  # take no chances and rewrite it.
13014  # Note: m4 eats our [], so we need to use [ and ] instead.
13015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13016  if test "x$has_forbidden_chars" != x; then
13017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019  fi
13020
13021
13022  windows_path="$new_path"
13023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13024    unix_path=`$CYGPATH -u "$windows_path"`
13025    new_path="$unix_path"
13026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13028    new_path="$unix_path"
13029  fi
13030
13031  if test "x$path" != "x$new_path"; then
13032    BOOT_JDK="$new_path"
13033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035  fi
13036
13037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13039
13040  else
13041    # We're on a posix platform. Hooray! :)
13042    path="$BOOT_JDK"
13043    has_space=`$ECHO "$path" | $GREP " "`
13044    if test "x$has_space" != x; then
13045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13047      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13048    fi
13049
13050    # Use eval to expand a potential ~
13051    eval path="$path"
13052    if test ! -f "$path" && test ! -d "$path"; then
13053      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13054    fi
13055
13056    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13057  fi
13058
13059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13060$as_echo_n "checking for Boot JDK... " >&6; }
13061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13062$as_echo "$BOOT_JDK" >&6; }
13063              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13064$as_echo_n "checking Boot JDK version... " >&6; }
13065              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13067$as_echo "$BOOT_JDK_VERSION" >&6; }
13068            fi # end check jdk version
13069          fi # end check rt.jar
13070        fi # end check javac
13071      fi # end check java
13072    fi # end check boot jdk found
13073  fi
13074
13075
13076  if test "x$BOOT_JDK_FOUND" = xno; then
13077    # Now execute the test
13078
13079  if test "x$PROGRAMFILES" != x; then
13080    VIRTUAL_DIR="$PROGRAMFILES/Java"
13081
13082  windows_path="$VIRTUAL_DIR"
13083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13084    unix_path=`$CYGPATH -u "$windows_path"`
13085    VIRTUAL_DIR="$unix_path"
13086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13088    VIRTUAL_DIR="$unix_path"
13089  fi
13090
13091
13092  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13093  BOOT_JDK_SUFFIX=""
13094  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13095  if test "x$ALL_JDKS_FOUND" != x; then
13096    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13097
13098  if test "x$BOOT_JDK_FOUND" = xno; then
13099    # Now execute the test
13100
13101        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13102        if test -d "$BOOT_JDK"; then
13103          BOOT_JDK_FOUND=maybe
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13105$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13106        fi
13107
13108
13109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13111      # Do we have a bin/java?
13112      if test ! -x "$BOOT_JDK/bin/java"; then
13113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13115        BOOT_JDK_FOUND=no
13116      else
13117        # Do we have a bin/javac?
13118        if test ! -x "$BOOT_JDK/bin/javac"; then
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13123          BOOT_JDK_FOUND=no
13124        else
13125          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13126          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13127            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13129            BOOT_JDK_FOUND=no
13130          else
13131            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13132            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13133
13134            # Extra M4 quote needed to protect [] in grep expression.
13135            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13136            if test "x$FOUND_VERSION_78" = x; then
13137              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13139              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13140$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13141              BOOT_JDK_FOUND=no
13142            else
13143              # We're done! :-)
13144              BOOT_JDK_FOUND=yes
13145
13146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13147
13148  # Input might be given as Windows format, start by converting to
13149  # unix format.
13150  path="$BOOT_JDK"
13151  new_path=`$CYGPATH -u "$path"`
13152
13153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13156  # "foo.exe" is OK but "foo" is an error.
13157  #
13158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13159  # It is also a way to make sure we got the proper file name for the real test later on.
13160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13161  if test "x$test_shortpath" = x; then
13162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13164    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13165  fi
13166
13167  # Call helper function which possibly converts this using DOS-style short mode.
13168  # If so, the updated path is stored in $new_path.
13169
13170  input_path="$new_path"
13171  # Check if we need to convert this using DOS-style short mode. If the path
13172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13173  # take no chances and rewrite it.
13174  # Note: m4 eats our [], so we need to use [ and ] instead.
13175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13176  if test "x$has_forbidden_chars" != x; then
13177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13181      # Going to short mode and back again did indeed matter. Since short mode is
13182      # case insensitive, let's make it lowercase to improve readability.
13183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13184      # Now convert it back to Unix-stile (cygpath)
13185      input_path=`$CYGPATH -u "$shortmode_path"`
13186      new_path="$input_path"
13187    fi
13188  fi
13189
13190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13191  if test "x$test_cygdrive_prefix" = x; then
13192    # As a simple fix, exclude /usr/bin since it's not a real path.
13193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13195      # a path prefixed by /cygdrive for fixpath to work.
13196      new_path="$CYGWIN_ROOT_PATH$input_path"
13197    fi
13198  fi
13199
13200
13201  if test "x$path" != "x$new_path"; then
13202    BOOT_JDK="$new_path"
13203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13204$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13205  fi
13206
13207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13208
13209  path="$BOOT_JDK"
13210  has_colon=`$ECHO $path | $GREP ^.:`
13211  new_path="$path"
13212  if test "x$has_colon" = x; then
13213    # Not in mixed or Windows style, start by that.
13214    new_path=`cmd //c echo $path`
13215  fi
13216
13217
13218  input_path="$new_path"
13219  # Check if we need to convert this using DOS-style short mode. If the path
13220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13221  # take no chances and rewrite it.
13222  # Note: m4 eats our [], so we need to use [ and ] instead.
13223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13224  if test "x$has_forbidden_chars" != x; then
13225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13227  fi
13228
13229
13230  windows_path="$new_path"
13231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13232    unix_path=`$CYGPATH -u "$windows_path"`
13233    new_path="$unix_path"
13234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13236    new_path="$unix_path"
13237  fi
13238
13239  if test "x$path" != "x$new_path"; then
13240    BOOT_JDK="$new_path"
13241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243  fi
13244
13245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13247
13248  else
13249    # We're on a posix platform. Hooray! :)
13250    path="$BOOT_JDK"
13251    has_space=`$ECHO "$path" | $GREP " "`
13252    if test "x$has_space" != x; then
13253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13255      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13256    fi
13257
13258    # Use eval to expand a potential ~
13259    eval path="$path"
13260    if test ! -f "$path" && test ! -d "$path"; then
13261      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13262    fi
13263
13264    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13265  fi
13266
13267              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13268$as_echo_n "checking for Boot JDK... " >&6; }
13269              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13270$as_echo "$BOOT_JDK" >&6; }
13271              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13272$as_echo_n "checking Boot JDK version... " >&6; }
13273              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13274              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13275$as_echo "$BOOT_JDK_VERSION" >&6; }
13276            fi # end check jdk version
13277          fi # end check rt.jar
13278        fi # end check javac
13279      fi # end check java
13280    fi # end check boot jdk found
13281  fi
13282
13283    done
13284  fi
13285
13286  fi
13287
13288
13289    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13290    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13291      # Do we have a bin/java?
13292      if test ! -x "$BOOT_JDK/bin/java"; then
13293        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13295        BOOT_JDK_FOUND=no
13296      else
13297        # Do we have a bin/javac?
13298        if test ! -x "$BOOT_JDK/bin/javac"; then
13299          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13301          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13302$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13303          BOOT_JDK_FOUND=no
13304        else
13305          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13306          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13307            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13309            BOOT_JDK_FOUND=no
13310          else
13311            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13313
13314            # Extra M4 quote needed to protect [] in grep expression.
13315            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13316            if test "x$FOUND_VERSION_78" = x; then
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13319              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13320$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13321              BOOT_JDK_FOUND=no
13322            else
13323              # We're done! :-)
13324              BOOT_JDK_FOUND=yes
13325
13326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13327
13328  # Input might be given as Windows format, start by converting to
13329  # unix format.
13330  path="$BOOT_JDK"
13331  new_path=`$CYGPATH -u "$path"`
13332
13333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13336  # "foo.exe" is OK but "foo" is an error.
13337  #
13338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13339  # It is also a way to make sure we got the proper file name for the real test later on.
13340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13341  if test "x$test_shortpath" = x; then
13342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13345  fi
13346
13347  # Call helper function which possibly converts this using DOS-style short mode.
13348  # If so, the updated path is stored in $new_path.
13349
13350  input_path="$new_path"
13351  # Check if we need to convert this using DOS-style short mode. If the path
13352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13353  # take no chances and rewrite it.
13354  # Note: m4 eats our [], so we need to use [ and ] instead.
13355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13356  if test "x$has_forbidden_chars" != x; then
13357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13361      # Going to short mode and back again did indeed matter. Since short mode is
13362      # case insensitive, let's make it lowercase to improve readability.
13363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364      # Now convert it back to Unix-stile (cygpath)
13365      input_path=`$CYGPATH -u "$shortmode_path"`
13366      new_path="$input_path"
13367    fi
13368  fi
13369
13370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13371  if test "x$test_cygdrive_prefix" = x; then
13372    # As a simple fix, exclude /usr/bin since it's not a real path.
13373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13375      # a path prefixed by /cygdrive for fixpath to work.
13376      new_path="$CYGWIN_ROOT_PATH$input_path"
13377    fi
13378  fi
13379
13380
13381  if test "x$path" != "x$new_path"; then
13382    BOOT_JDK="$new_path"
13383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13385  fi
13386
13387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388
13389  path="$BOOT_JDK"
13390  has_colon=`$ECHO $path | $GREP ^.:`
13391  new_path="$path"
13392  if test "x$has_colon" = x; then
13393    # Not in mixed or Windows style, start by that.
13394    new_path=`cmd //c echo $path`
13395  fi
13396
13397
13398  input_path="$new_path"
13399  # Check if we need to convert this using DOS-style short mode. If the path
13400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401  # take no chances and rewrite it.
13402  # Note: m4 eats our [], so we need to use [ and ] instead.
13403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13404  if test "x$has_forbidden_chars" != x; then
13405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407  fi
13408
13409
13410  windows_path="$new_path"
13411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13412    unix_path=`$CYGPATH -u "$windows_path"`
13413    new_path="$unix_path"
13414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13416    new_path="$unix_path"
13417  fi
13418
13419  if test "x$path" != "x$new_path"; then
13420    BOOT_JDK="$new_path"
13421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423  fi
13424
13425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13427
13428  else
13429    # We're on a posix platform. Hooray! :)
13430    path="$BOOT_JDK"
13431    has_space=`$ECHO "$path" | $GREP " "`
13432    if test "x$has_space" != x; then
13433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13436    fi
13437
13438    # Use eval to expand a potential ~
13439    eval path="$path"
13440    if test ! -f "$path" && test ! -d "$path"; then
13441      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13442    fi
13443
13444    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13445  fi
13446
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448$as_echo_n "checking for Boot JDK... " >&6; }
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450$as_echo "$BOOT_JDK" >&6; }
13451              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452$as_echo_n "checking Boot JDK version... " >&6; }
13453              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455$as_echo "$BOOT_JDK_VERSION" >&6; }
13456            fi # end check jdk version
13457          fi # end check rt.jar
13458        fi # end check javac
13459      fi # end check java
13460    fi # end check boot jdk found
13461  fi
13462
13463
13464  if test "x$BOOT_JDK_FOUND" = xno; then
13465    # Now execute the test
13466
13467  if test "x$ProgramFiles" != x; then
13468    VIRTUAL_DIR="$ProgramFiles/Java"
13469
13470  windows_path="$VIRTUAL_DIR"
13471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13472    unix_path=`$CYGPATH -u "$windows_path"`
13473    VIRTUAL_DIR="$unix_path"
13474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13476    VIRTUAL_DIR="$unix_path"
13477  fi
13478
13479
13480  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13481  BOOT_JDK_SUFFIX=""
13482  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13483  if test "x$ALL_JDKS_FOUND" != x; then
13484    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13485
13486  if test "x$BOOT_JDK_FOUND" = xno; then
13487    # Now execute the test
13488
13489        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13490        if test -d "$BOOT_JDK"; then
13491          BOOT_JDK_FOUND=maybe
13492          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13493$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13494        fi
13495
13496
13497    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13498    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13499      # Do we have a bin/java?
13500      if test ! -x "$BOOT_JDK/bin/java"; then
13501        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13503        BOOT_JDK_FOUND=no
13504      else
13505        # Do we have a bin/javac?
13506        if test ! -x "$BOOT_JDK/bin/javac"; then
13507          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13509          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13510$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13511          BOOT_JDK_FOUND=no
13512        else
13513          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13514          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13515            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13517            BOOT_JDK_FOUND=no
13518          else
13519            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13520            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13521
13522            # Extra M4 quote needed to protect [] in grep expression.
13523            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13524            if test "x$FOUND_VERSION_78" = x; then
13525              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13527              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13528$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13529              BOOT_JDK_FOUND=no
13530            else
13531              # We're done! :-)
13532              BOOT_JDK_FOUND=yes
13533
13534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13535
13536  # Input might be given as Windows format, start by converting to
13537  # unix format.
13538  path="$BOOT_JDK"
13539  new_path=`$CYGPATH -u "$path"`
13540
13541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13544  # "foo.exe" is OK but "foo" is an error.
13545  #
13546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13547  # It is also a way to make sure we got the proper file name for the real test later on.
13548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13549  if test "x$test_shortpath" = x; then
13550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13553  fi
13554
13555  # Call helper function which possibly converts this using DOS-style short mode.
13556  # If so, the updated path is stored in $new_path.
13557
13558  input_path="$new_path"
13559  # Check if we need to convert this using DOS-style short mode. If the path
13560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13561  # take no chances and rewrite it.
13562  # Note: m4 eats our [], so we need to use [ and ] instead.
13563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13564  if test "x$has_forbidden_chars" != x; then
13565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13569      # Going to short mode and back again did indeed matter. Since short mode is
13570      # case insensitive, let's make it lowercase to improve readability.
13571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13572      # Now convert it back to Unix-stile (cygpath)
13573      input_path=`$CYGPATH -u "$shortmode_path"`
13574      new_path="$input_path"
13575    fi
13576  fi
13577
13578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13579  if test "x$test_cygdrive_prefix" = x; then
13580    # As a simple fix, exclude /usr/bin since it's not a real path.
13581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13583      # a path prefixed by /cygdrive for fixpath to work.
13584      new_path="$CYGWIN_ROOT_PATH$input_path"
13585    fi
13586  fi
13587
13588
13589  if test "x$path" != "x$new_path"; then
13590    BOOT_JDK="$new_path"
13591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13593  fi
13594
13595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13596
13597  path="$BOOT_JDK"
13598  has_colon=`$ECHO $path | $GREP ^.:`
13599  new_path="$path"
13600  if test "x$has_colon" = x; then
13601    # Not in mixed or Windows style, start by that.
13602    new_path=`cmd //c echo $path`
13603  fi
13604
13605
13606  input_path="$new_path"
13607  # Check if we need to convert this using DOS-style short mode. If the path
13608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13609  # take no chances and rewrite it.
13610  # Note: m4 eats our [], so we need to use [ and ] instead.
13611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13612  if test "x$has_forbidden_chars" != x; then
13613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13615  fi
13616
13617
13618  windows_path="$new_path"
13619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13620    unix_path=`$CYGPATH -u "$windows_path"`
13621    new_path="$unix_path"
13622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13624    new_path="$unix_path"
13625  fi
13626
13627  if test "x$path" != "x$new_path"; then
13628    BOOT_JDK="$new_path"
13629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13631  fi
13632
13633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13635
13636  else
13637    # We're on a posix platform. Hooray! :)
13638    path="$BOOT_JDK"
13639    has_space=`$ECHO "$path" | $GREP " "`
13640    if test "x$has_space" != x; then
13641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13643      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13644    fi
13645
13646    # Use eval to expand a potential ~
13647    eval path="$path"
13648    if test ! -f "$path" && test ! -d "$path"; then
13649      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13650    fi
13651
13652    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13653  fi
13654
13655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13656$as_echo_n "checking for Boot JDK... " >&6; }
13657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13658$as_echo "$BOOT_JDK" >&6; }
13659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13660$as_echo_n "checking Boot JDK version... " >&6; }
13661              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13663$as_echo "$BOOT_JDK_VERSION" >&6; }
13664            fi # end check jdk version
13665          fi # end check rt.jar
13666        fi # end check javac
13667      fi # end check java
13668    fi # end check boot jdk found
13669  fi
13670
13671    done
13672  fi
13673
13674  fi
13675
13676
13677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13679      # Do we have a bin/java?
13680      if test ! -x "$BOOT_JDK/bin/java"; then
13681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13683        BOOT_JDK_FOUND=no
13684      else
13685        # Do we have a bin/javac?
13686        if test ! -x "$BOOT_JDK/bin/javac"; then
13687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13691          BOOT_JDK_FOUND=no
13692        else
13693          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13694          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13695            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13697            BOOT_JDK_FOUND=no
13698          else
13699            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13700            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13701
13702            # Extra M4 quote needed to protect [] in grep expression.
13703            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13704            if test "x$FOUND_VERSION_78" = x; then
13705              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13707              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13708$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13709              BOOT_JDK_FOUND=no
13710            else
13711              # We're done! :-)
13712              BOOT_JDK_FOUND=yes
13713
13714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13715
13716  # Input might be given as Windows format, start by converting to
13717  # unix format.
13718  path="$BOOT_JDK"
13719  new_path=`$CYGPATH -u "$path"`
13720
13721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13724  # "foo.exe" is OK but "foo" is an error.
13725  #
13726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13727  # It is also a way to make sure we got the proper file name for the real test later on.
13728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13729  if test "x$test_shortpath" = x; then
13730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13733  fi
13734
13735  # Call helper function which possibly converts this using DOS-style short mode.
13736  # If so, the updated path is stored in $new_path.
13737
13738  input_path="$new_path"
13739  # Check if we need to convert this using DOS-style short mode. If the path
13740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13741  # take no chances and rewrite it.
13742  # Note: m4 eats our [], so we need to use [ and ] instead.
13743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13744  if test "x$has_forbidden_chars" != x; then
13745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13749      # Going to short mode and back again did indeed matter. Since short mode is
13750      # case insensitive, let's make it lowercase to improve readability.
13751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752      # Now convert it back to Unix-stile (cygpath)
13753      input_path=`$CYGPATH -u "$shortmode_path"`
13754      new_path="$input_path"
13755    fi
13756  fi
13757
13758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13759  if test "x$test_cygdrive_prefix" = x; then
13760    # As a simple fix, exclude /usr/bin since it's not a real path.
13761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13763      # a path prefixed by /cygdrive for fixpath to work.
13764      new_path="$CYGWIN_ROOT_PATH$input_path"
13765    fi
13766  fi
13767
13768
13769  if test "x$path" != "x$new_path"; then
13770    BOOT_JDK="$new_path"
13771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773  fi
13774
13775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13776
13777  path="$BOOT_JDK"
13778  has_colon=`$ECHO $path | $GREP ^.:`
13779  new_path="$path"
13780  if test "x$has_colon" = x; then
13781    # Not in mixed or Windows style, start by that.
13782    new_path=`cmd //c echo $path`
13783  fi
13784
13785
13786  input_path="$new_path"
13787  # Check if we need to convert this using DOS-style short mode. If the path
13788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789  # take no chances and rewrite it.
13790  # Note: m4 eats our [], so we need to use [ and ] instead.
13791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13792  if test "x$has_forbidden_chars" != x; then
13793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795  fi
13796
13797
13798  windows_path="$new_path"
13799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13800    unix_path=`$CYGPATH -u "$windows_path"`
13801    new_path="$unix_path"
13802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13804    new_path="$unix_path"
13805  fi
13806
13807  if test "x$path" != "x$new_path"; then
13808    BOOT_JDK="$new_path"
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811  fi
13812
13813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13815
13816  else
13817    # We're on a posix platform. Hooray! :)
13818    path="$BOOT_JDK"
13819    has_space=`$ECHO "$path" | $GREP " "`
13820    if test "x$has_space" != x; then
13821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13824    fi
13825
13826    # Use eval to expand a potential ~
13827    eval path="$path"
13828    if test ! -f "$path" && test ! -d "$path"; then
13829      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13830    fi
13831
13832    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13833  fi
13834
13835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13836$as_echo_n "checking for Boot JDK... " >&6; }
13837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13838$as_echo "$BOOT_JDK" >&6; }
13839              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13840$as_echo_n "checking Boot JDK version... " >&6; }
13841              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13842              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13843$as_echo "$BOOT_JDK_VERSION" >&6; }
13844            fi # end check jdk version
13845          fi # end check rt.jar
13846        fi # end check javac
13847      fi # end check java
13848    fi # end check boot jdk found
13849  fi
13850
13851
13852  if test "x$BOOT_JDK_FOUND" = xno; then
13853    # Now execute the test
13854
13855  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13856  BOOT_JDK_SUFFIX=""
13857  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13858  if test "x$ALL_JDKS_FOUND" != x; then
13859    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13860
13861  if test "x$BOOT_JDK_FOUND" = xno; then
13862    # Now execute the test
13863
13864        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13865        if test -d "$BOOT_JDK"; then
13866          BOOT_JDK_FOUND=maybe
13867          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13868$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13869        fi
13870
13871
13872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874      # Do we have a bin/java?
13875      if test ! -x "$BOOT_JDK/bin/java"; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878        BOOT_JDK_FOUND=no
13879      else
13880        # Do we have a bin/javac?
13881        if test ! -x "$BOOT_JDK/bin/javac"; then
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886          BOOT_JDK_FOUND=no
13887        else
13888          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892            BOOT_JDK_FOUND=no
13893          else
13894            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896
13897            # Extra M4 quote needed to protect [] in grep expression.
13898            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899            if test "x$FOUND_VERSION_78" = x; then
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904              BOOT_JDK_FOUND=no
13905            else
13906              # We're done! :-)
13907              BOOT_JDK_FOUND=yes
13908
13909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910
13911  # Input might be given as Windows format, start by converting to
13912  # unix format.
13913  path="$BOOT_JDK"
13914  new_path=`$CYGPATH -u "$path"`
13915
13916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919  # "foo.exe" is OK but "foo" is an error.
13920  #
13921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922  # It is also a way to make sure we got the proper file name for the real test later on.
13923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924  if test "x$test_shortpath" = x; then
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928  fi
13929
13930  # Call helper function which possibly converts this using DOS-style short mode.
13931  # If so, the updated path is stored in $new_path.
13932
13933  input_path="$new_path"
13934  # Check if we need to convert this using DOS-style short mode. If the path
13935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936  # take no chances and rewrite it.
13937  # Note: m4 eats our [], so we need to use [ and ] instead.
13938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939  if test "x$has_forbidden_chars" != x; then
13940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944      # Going to short mode and back again did indeed matter. Since short mode is
13945      # case insensitive, let's make it lowercase to improve readability.
13946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947      # Now convert it back to Unix-stile (cygpath)
13948      input_path=`$CYGPATH -u "$shortmode_path"`
13949      new_path="$input_path"
13950    fi
13951  fi
13952
13953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954  if test "x$test_cygdrive_prefix" = x; then
13955    # As a simple fix, exclude /usr/bin since it's not a real path.
13956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958      # a path prefixed by /cygdrive for fixpath to work.
13959      new_path="$CYGWIN_ROOT_PATH$input_path"
13960    fi
13961  fi
13962
13963
13964  if test "x$path" != "x$new_path"; then
13965    BOOT_JDK="$new_path"
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968  fi
13969
13970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971
13972  path="$BOOT_JDK"
13973  has_colon=`$ECHO $path | $GREP ^.:`
13974  new_path="$path"
13975  if test "x$has_colon" = x; then
13976    # Not in mixed or Windows style, start by that.
13977    new_path=`cmd //c echo $path`
13978  fi
13979
13980
13981  input_path="$new_path"
13982  # Check if we need to convert this using DOS-style short mode. If the path
13983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984  # take no chances and rewrite it.
13985  # Note: m4 eats our [], so we need to use [ and ] instead.
13986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987  if test "x$has_forbidden_chars" != x; then
13988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990  fi
13991
13992
13993  windows_path="$new_path"
13994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995    unix_path=`$CYGPATH -u "$windows_path"`
13996    new_path="$unix_path"
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999    new_path="$unix_path"
14000  fi
14001
14002  if test "x$path" != "x$new_path"; then
14003    BOOT_JDK="$new_path"
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006  fi
14007
14008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010
14011  else
14012    # We're on a posix platform. Hooray! :)
14013    path="$BOOT_JDK"
14014    has_space=`$ECHO "$path" | $GREP " "`
14015    if test "x$has_space" != x; then
14016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019    fi
14020
14021    # Use eval to expand a potential ~
14022    eval path="$path"
14023    if test ! -f "$path" && test ! -d "$path"; then
14024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025    fi
14026
14027    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028  fi
14029
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031$as_echo_n "checking for Boot JDK... " >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033$as_echo "$BOOT_JDK" >&6; }
14034              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035$as_echo_n "checking Boot JDK version... " >&6; }
14036              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038$as_echo "$BOOT_JDK_VERSION" >&6; }
14039            fi # end check jdk version
14040          fi # end check rt.jar
14041        fi # end check javac
14042      fi # end check java
14043    fi # end check boot jdk found
14044  fi
14045
14046    done
14047  fi
14048
14049
14050    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14051    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14052      # Do we have a bin/java?
14053      if test ! -x "$BOOT_JDK/bin/java"; then
14054        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14056        BOOT_JDK_FOUND=no
14057      else
14058        # Do we have a bin/javac?
14059        if test ! -x "$BOOT_JDK/bin/javac"; then
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14062          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14063$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14064          BOOT_JDK_FOUND=no
14065        else
14066          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14067          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14068            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14070            BOOT_JDK_FOUND=no
14071          else
14072            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14073            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14074
14075            # Extra M4 quote needed to protect [] in grep expression.
14076            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14077            if test "x$FOUND_VERSION_78" = x; then
14078              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14080              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14081$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14082              BOOT_JDK_FOUND=no
14083            else
14084              # We're done! :-)
14085              BOOT_JDK_FOUND=yes
14086
14087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14088
14089  # Input might be given as Windows format, start by converting to
14090  # unix format.
14091  path="$BOOT_JDK"
14092  new_path=`$CYGPATH -u "$path"`
14093
14094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14097  # "foo.exe" is OK but "foo" is an error.
14098  #
14099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14100  # It is also a way to make sure we got the proper file name for the real test later on.
14101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14102  if test "x$test_shortpath" = x; then
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14105    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14106  fi
14107
14108  # Call helper function which possibly converts this using DOS-style short mode.
14109  # If so, the updated path is stored in $new_path.
14110
14111  input_path="$new_path"
14112  # Check if we need to convert this using DOS-style short mode. If the path
14113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14114  # take no chances and rewrite it.
14115  # Note: m4 eats our [], so we need to use [ and ] instead.
14116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14117  if test "x$has_forbidden_chars" != x; then
14118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14122      # Going to short mode and back again did indeed matter. Since short mode is
14123      # case insensitive, let's make it lowercase to improve readability.
14124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14125      # Now convert it back to Unix-stile (cygpath)
14126      input_path=`$CYGPATH -u "$shortmode_path"`
14127      new_path="$input_path"
14128    fi
14129  fi
14130
14131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14132  if test "x$test_cygdrive_prefix" = x; then
14133    # As a simple fix, exclude /usr/bin since it's not a real path.
14134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14136      # a path prefixed by /cygdrive for fixpath to work.
14137      new_path="$CYGWIN_ROOT_PATH$input_path"
14138    fi
14139  fi
14140
14141
14142  if test "x$path" != "x$new_path"; then
14143    BOOT_JDK="$new_path"
14144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14146  fi
14147
14148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149
14150  path="$BOOT_JDK"
14151  has_colon=`$ECHO $path | $GREP ^.:`
14152  new_path="$path"
14153  if test "x$has_colon" = x; then
14154    # Not in mixed or Windows style, start by that.
14155    new_path=`cmd //c echo $path`
14156  fi
14157
14158
14159  input_path="$new_path"
14160  # Check if we need to convert this using DOS-style short mode. If the path
14161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14162  # take no chances and rewrite it.
14163  # Note: m4 eats our [], so we need to use [ and ] instead.
14164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14165  if test "x$has_forbidden_chars" != x; then
14166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14168  fi
14169
14170
14171  windows_path="$new_path"
14172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14173    unix_path=`$CYGPATH -u "$windows_path"`
14174    new_path="$unix_path"
14175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14177    new_path="$unix_path"
14178  fi
14179
14180  if test "x$path" != "x$new_path"; then
14181    BOOT_JDK="$new_path"
14182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14184  fi
14185
14186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14188
14189  else
14190    # We're on a posix platform. Hooray! :)
14191    path="$BOOT_JDK"
14192    has_space=`$ECHO "$path" | $GREP " "`
14193    if test "x$has_space" != x; then
14194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14196      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14197    fi
14198
14199    # Use eval to expand a potential ~
14200    eval path="$path"
14201    if test ! -f "$path" && test ! -d "$path"; then
14202      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14203    fi
14204
14205    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14206  fi
14207
14208              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14209$as_echo_n "checking for Boot JDK... " >&6; }
14210              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14211$as_echo "$BOOT_JDK" >&6; }
14212              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14213$as_echo_n "checking Boot JDK version... " >&6; }
14214              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14215              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14216$as_echo "$BOOT_JDK_VERSION" >&6; }
14217            fi # end check jdk version
14218          fi # end check rt.jar
14219        fi # end check javac
14220      fi # end check java
14221    fi # end check boot jdk found
14222  fi
14223
14224  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14225
14226  if test "x$BOOT_JDK_FOUND" = xno; then
14227    # Now execute the test
14228
14229  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14230  BOOT_JDK_SUFFIX="/Contents/Home"
14231  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14232  if test "x$ALL_JDKS_FOUND" != x; then
14233    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14234
14235  if test "x$BOOT_JDK_FOUND" = xno; then
14236    # Now execute the test
14237
14238        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14239        if test -d "$BOOT_JDK"; then
14240          BOOT_JDK_FOUND=maybe
14241          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14242$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14243        fi
14244
14245
14246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14248      # Do we have a bin/java?
14249      if test ! -x "$BOOT_JDK/bin/java"; then
14250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14252        BOOT_JDK_FOUND=no
14253      else
14254        # Do we have a bin/javac?
14255        if test ! -x "$BOOT_JDK/bin/javac"; then
14256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14260          BOOT_JDK_FOUND=no
14261        else
14262          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14263          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14266            BOOT_JDK_FOUND=no
14267          else
14268            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14269            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14270
14271            # Extra M4 quote needed to protect [] in grep expression.
14272            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14273            if test "x$FOUND_VERSION_78" = x; then
14274              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14276              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14277$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14278              BOOT_JDK_FOUND=no
14279            else
14280              # We're done! :-)
14281              BOOT_JDK_FOUND=yes
14282
14283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14284
14285  # Input might be given as Windows format, start by converting to
14286  # unix format.
14287  path="$BOOT_JDK"
14288  new_path=`$CYGPATH -u "$path"`
14289
14290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14293  # "foo.exe" is OK but "foo" is an error.
14294  #
14295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14296  # It is also a way to make sure we got the proper file name for the real test later on.
14297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14298  if test "x$test_shortpath" = x; then
14299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14301    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14302  fi
14303
14304  # Call helper function which possibly converts this using DOS-style short mode.
14305  # If so, the updated path is stored in $new_path.
14306
14307  input_path="$new_path"
14308  # Check if we need to convert this using DOS-style short mode. If the path
14309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14310  # take no chances and rewrite it.
14311  # Note: m4 eats our [], so we need to use [ and ] instead.
14312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14313  if test "x$has_forbidden_chars" != x; then
14314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14318      # Going to short mode and back again did indeed matter. Since short mode is
14319      # case insensitive, let's make it lowercase to improve readability.
14320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14321      # Now convert it back to Unix-stile (cygpath)
14322      input_path=`$CYGPATH -u "$shortmode_path"`
14323      new_path="$input_path"
14324    fi
14325  fi
14326
14327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14328  if test "x$test_cygdrive_prefix" = x; then
14329    # As a simple fix, exclude /usr/bin since it's not a real path.
14330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14332      # a path prefixed by /cygdrive for fixpath to work.
14333      new_path="$CYGWIN_ROOT_PATH$input_path"
14334    fi
14335  fi
14336
14337
14338  if test "x$path" != "x$new_path"; then
14339    BOOT_JDK="$new_path"
14340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14342  fi
14343
14344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345
14346  path="$BOOT_JDK"
14347  has_colon=`$ECHO $path | $GREP ^.:`
14348  new_path="$path"
14349  if test "x$has_colon" = x; then
14350    # Not in mixed or Windows style, start by that.
14351    new_path=`cmd //c echo $path`
14352  fi
14353
14354
14355  input_path="$new_path"
14356  # Check if we need to convert this using DOS-style short mode. If the path
14357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14358  # take no chances and rewrite it.
14359  # Note: m4 eats our [], so we need to use [ and ] instead.
14360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14361  if test "x$has_forbidden_chars" != x; then
14362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14364  fi
14365
14366
14367  windows_path="$new_path"
14368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14369    unix_path=`$CYGPATH -u "$windows_path"`
14370    new_path="$unix_path"
14371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14373    new_path="$unix_path"
14374  fi
14375
14376  if test "x$path" != "x$new_path"; then
14377    BOOT_JDK="$new_path"
14378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14380  fi
14381
14382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14384
14385  else
14386    # We're on a posix platform. Hooray! :)
14387    path="$BOOT_JDK"
14388    has_space=`$ECHO "$path" | $GREP " "`
14389    if test "x$has_space" != x; then
14390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14393    fi
14394
14395    # Use eval to expand a potential ~
14396    eval path="$path"
14397    if test ! -f "$path" && test ! -d "$path"; then
14398      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14399    fi
14400
14401    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14402  fi
14403
14404              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14405$as_echo_n "checking for Boot JDK... " >&6; }
14406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14407$as_echo "$BOOT_JDK" >&6; }
14408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14409$as_echo_n "checking Boot JDK version... " >&6; }
14410              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14411              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14412$as_echo "$BOOT_JDK_VERSION" >&6; }
14413            fi # end check jdk version
14414          fi # end check rt.jar
14415        fi # end check javac
14416      fi # end check java
14417    fi # end check boot jdk found
14418  fi
14419
14420    done
14421  fi
14422
14423
14424    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14425    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14426      # Do we have a bin/java?
14427      if test ! -x "$BOOT_JDK/bin/java"; then
14428        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14430        BOOT_JDK_FOUND=no
14431      else
14432        # Do we have a bin/javac?
14433        if test ! -x "$BOOT_JDK/bin/javac"; then
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14436          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14437$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14438          BOOT_JDK_FOUND=no
14439        else
14440          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14441          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14442            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14444            BOOT_JDK_FOUND=no
14445          else
14446            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14447            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14448
14449            # Extra M4 quote needed to protect [] in grep expression.
14450            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14451            if test "x$FOUND_VERSION_78" = x; then
14452              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14454              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14455$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14456              BOOT_JDK_FOUND=no
14457            else
14458              # We're done! :-)
14459              BOOT_JDK_FOUND=yes
14460
14461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14462
14463  # Input might be given as Windows format, start by converting to
14464  # unix format.
14465  path="$BOOT_JDK"
14466  new_path=`$CYGPATH -u "$path"`
14467
14468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14471  # "foo.exe" is OK but "foo" is an error.
14472  #
14473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14474  # It is also a way to make sure we got the proper file name for the real test later on.
14475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14476  if test "x$test_shortpath" = x; then
14477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14479    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14480  fi
14481
14482  # Call helper function which possibly converts this using DOS-style short mode.
14483  # If so, the updated path is stored in $new_path.
14484
14485  input_path="$new_path"
14486  # Check if we need to convert this using DOS-style short mode. If the path
14487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14488  # take no chances and rewrite it.
14489  # Note: m4 eats our [], so we need to use [ and ] instead.
14490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14491  if test "x$has_forbidden_chars" != x; then
14492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14496      # Going to short mode and back again did indeed matter. Since short mode is
14497      # case insensitive, let's make it lowercase to improve readability.
14498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14499      # Now convert it back to Unix-stile (cygpath)
14500      input_path=`$CYGPATH -u "$shortmode_path"`
14501      new_path="$input_path"
14502    fi
14503  fi
14504
14505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14506  if test "x$test_cygdrive_prefix" = x; then
14507    # As a simple fix, exclude /usr/bin since it's not a real path.
14508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14510      # a path prefixed by /cygdrive for fixpath to work.
14511      new_path="$CYGWIN_ROOT_PATH$input_path"
14512    fi
14513  fi
14514
14515
14516  if test "x$path" != "x$new_path"; then
14517    BOOT_JDK="$new_path"
14518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14520  fi
14521
14522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14523
14524  path="$BOOT_JDK"
14525  has_colon=`$ECHO $path | $GREP ^.:`
14526  new_path="$path"
14527  if test "x$has_colon" = x; then
14528    # Not in mixed or Windows style, start by that.
14529    new_path=`cmd //c echo $path`
14530  fi
14531
14532
14533  input_path="$new_path"
14534  # Check if we need to convert this using DOS-style short mode. If the path
14535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14536  # take no chances and rewrite it.
14537  # Note: m4 eats our [], so we need to use [ and ] instead.
14538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14539  if test "x$has_forbidden_chars" != x; then
14540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14542  fi
14543
14544
14545  windows_path="$new_path"
14546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14547    unix_path=`$CYGPATH -u "$windows_path"`
14548    new_path="$unix_path"
14549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14551    new_path="$unix_path"
14552  fi
14553
14554  if test "x$path" != "x$new_path"; then
14555    BOOT_JDK="$new_path"
14556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14557$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14558  fi
14559
14560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14562
14563  else
14564    # We're on a posix platform. Hooray! :)
14565    path="$BOOT_JDK"
14566    has_space=`$ECHO "$path" | $GREP " "`
14567    if test "x$has_space" != x; then
14568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14570      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14571    fi
14572
14573    # Use eval to expand a potential ~
14574    eval path="$path"
14575    if test ! -f "$path" && test ! -d "$path"; then
14576      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14577    fi
14578
14579    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14580  fi
14581
14582              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14583$as_echo_n "checking for Boot JDK... " >&6; }
14584              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14585$as_echo "$BOOT_JDK" >&6; }
14586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14587$as_echo_n "checking Boot JDK version... " >&6; }
14588              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14589              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14590$as_echo "$BOOT_JDK_VERSION" >&6; }
14591            fi # end check jdk version
14592          fi # end check rt.jar
14593        fi # end check javac
14594      fi # end check java
14595    fi # end check boot jdk found
14596  fi
14597
14598
14599  if test "x$BOOT_JDK_FOUND" = xno; then
14600    # Now execute the test
14601
14602  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14603  BOOT_JDK_SUFFIX="/Contents/Home"
14604  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14605  if test "x$ALL_JDKS_FOUND" != x; then
14606    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14607
14608  if test "x$BOOT_JDK_FOUND" = xno; then
14609    # Now execute the test
14610
14611        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14612        if test -d "$BOOT_JDK"; then
14613          BOOT_JDK_FOUND=maybe
14614          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14615$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14616        fi
14617
14618
14619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621      # Do we have a bin/java?
14622      if test ! -x "$BOOT_JDK/bin/java"; then
14623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625        BOOT_JDK_FOUND=no
14626      else
14627        # Do we have a bin/javac?
14628        if test ! -x "$BOOT_JDK/bin/javac"; then
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633          BOOT_JDK_FOUND=no
14634        else
14635          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639            BOOT_JDK_FOUND=no
14640          else
14641            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643
14644            # Extra M4 quote needed to protect [] in grep expression.
14645            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646            if test "x$FOUND_VERSION_78" = x; then
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651              BOOT_JDK_FOUND=no
14652            else
14653              # We're done! :-)
14654              BOOT_JDK_FOUND=yes
14655
14656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657
14658  # Input might be given as Windows format, start by converting to
14659  # unix format.
14660  path="$BOOT_JDK"
14661  new_path=`$CYGPATH -u "$path"`
14662
14663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666  # "foo.exe" is OK but "foo" is an error.
14667  #
14668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669  # It is also a way to make sure we got the proper file name for the real test later on.
14670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671  if test "x$test_shortpath" = x; then
14672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675  fi
14676
14677  # Call helper function which possibly converts this using DOS-style short mode.
14678  # If so, the updated path is stored in $new_path.
14679
14680  input_path="$new_path"
14681  # Check if we need to convert this using DOS-style short mode. If the path
14682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683  # take no chances and rewrite it.
14684  # Note: m4 eats our [], so we need to use [ and ] instead.
14685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686  if test "x$has_forbidden_chars" != x; then
14687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691      # Going to short mode and back again did indeed matter. Since short mode is
14692      # case insensitive, let's make it lowercase to improve readability.
14693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694      # Now convert it back to Unix-stile (cygpath)
14695      input_path=`$CYGPATH -u "$shortmode_path"`
14696      new_path="$input_path"
14697    fi
14698  fi
14699
14700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701  if test "x$test_cygdrive_prefix" = x; then
14702    # As a simple fix, exclude /usr/bin since it's not a real path.
14703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705      # a path prefixed by /cygdrive for fixpath to work.
14706      new_path="$CYGWIN_ROOT_PATH$input_path"
14707    fi
14708  fi
14709
14710
14711  if test "x$path" != "x$new_path"; then
14712    BOOT_JDK="$new_path"
14713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715  fi
14716
14717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718
14719  path="$BOOT_JDK"
14720  has_colon=`$ECHO $path | $GREP ^.:`
14721  new_path="$path"
14722  if test "x$has_colon" = x; then
14723    # Not in mixed or Windows style, start by that.
14724    new_path=`cmd //c echo $path`
14725  fi
14726
14727
14728  input_path="$new_path"
14729  # Check if we need to convert this using DOS-style short mode. If the path
14730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731  # take no chances and rewrite it.
14732  # Note: m4 eats our [], so we need to use [ and ] instead.
14733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734  if test "x$has_forbidden_chars" != x; then
14735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737  fi
14738
14739
14740  windows_path="$new_path"
14741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742    unix_path=`$CYGPATH -u "$windows_path"`
14743    new_path="$unix_path"
14744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746    new_path="$unix_path"
14747  fi
14748
14749  if test "x$path" != "x$new_path"; then
14750    BOOT_JDK="$new_path"
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753  fi
14754
14755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757
14758  else
14759    # We're on a posix platform. Hooray! :)
14760    path="$BOOT_JDK"
14761    has_space=`$ECHO "$path" | $GREP " "`
14762    if test "x$has_space" != x; then
14763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766    fi
14767
14768    # Use eval to expand a potential ~
14769    eval path="$path"
14770    if test ! -f "$path" && test ! -d "$path"; then
14771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772    fi
14773
14774    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775  fi
14776
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778$as_echo_n "checking for Boot JDK... " >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780$as_echo "$BOOT_JDK" >&6; }
14781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782$as_echo_n "checking Boot JDK version... " >&6; }
14783              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785$as_echo "$BOOT_JDK_VERSION" >&6; }
14786            fi # end check jdk version
14787          fi # end check rt.jar
14788        fi # end check javac
14789      fi # end check java
14790    fi # end check boot jdk found
14791  fi
14792
14793    done
14794  fi
14795
14796
14797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14799      # Do we have a bin/java?
14800      if test ! -x "$BOOT_JDK/bin/java"; then
14801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14803        BOOT_JDK_FOUND=no
14804      else
14805        # Do we have a bin/javac?
14806        if test ! -x "$BOOT_JDK/bin/javac"; then
14807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14811          BOOT_JDK_FOUND=no
14812        else
14813          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14814          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14817            BOOT_JDK_FOUND=no
14818          else
14819            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14820            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14821
14822            # Extra M4 quote needed to protect [] in grep expression.
14823            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14824            if test "x$FOUND_VERSION_78" = x; then
14825              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14827              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14828$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14829              BOOT_JDK_FOUND=no
14830            else
14831              # We're done! :-)
14832              BOOT_JDK_FOUND=yes
14833
14834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14835
14836  # Input might be given as Windows format, start by converting to
14837  # unix format.
14838  path="$BOOT_JDK"
14839  new_path=`$CYGPATH -u "$path"`
14840
14841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14844  # "foo.exe" is OK but "foo" is an error.
14845  #
14846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14847  # It is also a way to make sure we got the proper file name for the real test later on.
14848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14849  if test "x$test_shortpath" = x; then
14850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14853  fi
14854
14855  # Call helper function which possibly converts this using DOS-style short mode.
14856  # If so, the updated path is stored in $new_path.
14857
14858  input_path="$new_path"
14859  # Check if we need to convert this using DOS-style short mode. If the path
14860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14861  # take no chances and rewrite it.
14862  # Note: m4 eats our [], so we need to use [ and ] instead.
14863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14864  if test "x$has_forbidden_chars" != x; then
14865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14869      # Going to short mode and back again did indeed matter. Since short mode is
14870      # case insensitive, let's make it lowercase to improve readability.
14871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872      # Now convert it back to Unix-stile (cygpath)
14873      input_path=`$CYGPATH -u "$shortmode_path"`
14874      new_path="$input_path"
14875    fi
14876  fi
14877
14878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14879  if test "x$test_cygdrive_prefix" = x; then
14880    # As a simple fix, exclude /usr/bin since it's not a real path.
14881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14883      # a path prefixed by /cygdrive for fixpath to work.
14884      new_path="$CYGWIN_ROOT_PATH$input_path"
14885    fi
14886  fi
14887
14888
14889  if test "x$path" != "x$new_path"; then
14890    BOOT_JDK="$new_path"
14891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14893  fi
14894
14895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14896
14897  path="$BOOT_JDK"
14898  has_colon=`$ECHO $path | $GREP ^.:`
14899  new_path="$path"
14900  if test "x$has_colon" = x; then
14901    # Not in mixed or Windows style, start by that.
14902    new_path=`cmd //c echo $path`
14903  fi
14904
14905
14906  input_path="$new_path"
14907  # Check if we need to convert this using DOS-style short mode. If the path
14908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14909  # take no chances and rewrite it.
14910  # Note: m4 eats our [], so we need to use [ and ] instead.
14911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14912  if test "x$has_forbidden_chars" != x; then
14913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14915  fi
14916
14917
14918  windows_path="$new_path"
14919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14920    unix_path=`$CYGPATH -u "$windows_path"`
14921    new_path="$unix_path"
14922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14924    new_path="$unix_path"
14925  fi
14926
14927  if test "x$path" != "x$new_path"; then
14928    BOOT_JDK="$new_path"
14929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14931  fi
14932
14933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14935
14936  else
14937    # We're on a posix platform. Hooray! :)
14938    path="$BOOT_JDK"
14939    has_space=`$ECHO "$path" | $GREP " "`
14940    if test "x$has_space" != x; then
14941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14944    fi
14945
14946    # Use eval to expand a potential ~
14947    eval path="$path"
14948    if test ! -f "$path" && test ! -d "$path"; then
14949      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14950    fi
14951
14952    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14953  fi
14954
14955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14956$as_echo_n "checking for Boot JDK... " >&6; }
14957              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14958$as_echo "$BOOT_JDK" >&6; }
14959              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14960$as_echo_n "checking Boot JDK version... " >&6; }
14961              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14963$as_echo "$BOOT_JDK_VERSION" >&6; }
14964            fi # end check jdk version
14965          fi # end check rt.jar
14966        fi # end check javac
14967      fi # end check java
14968    fi # end check boot jdk found
14969  fi
14970
14971  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14972
14973  if test "x$BOOT_JDK_FOUND" = xno; then
14974    # Now execute the test
14975
14976  BOOT_JDK_PREFIX="/usr/lib/jvm"
14977  BOOT_JDK_SUFFIX=""
14978  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14979  if test "x$ALL_JDKS_FOUND" != x; then
14980    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14981
14982  if test "x$BOOT_JDK_FOUND" = xno; then
14983    # Now execute the test
14984
14985        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14986        if test -d "$BOOT_JDK"; then
14987          BOOT_JDK_FOUND=maybe
14988          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14989$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14990        fi
14991
14992
14993    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14994    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14995      # Do we have a bin/java?
14996      if test ! -x "$BOOT_JDK/bin/java"; then
14997        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14999        BOOT_JDK_FOUND=no
15000      else
15001        # Do we have a bin/javac?
15002        if test ! -x "$BOOT_JDK/bin/javac"; then
15003          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15005          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15006$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15007          BOOT_JDK_FOUND=no
15008        else
15009          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15010          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15013            BOOT_JDK_FOUND=no
15014          else
15015            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15016            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15017
15018            # Extra M4 quote needed to protect [] in grep expression.
15019            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15020            if test "x$FOUND_VERSION_78" = x; then
15021              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15023              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15024$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15025              BOOT_JDK_FOUND=no
15026            else
15027              # We're done! :-)
15028              BOOT_JDK_FOUND=yes
15029
15030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15031
15032  # Input might be given as Windows format, start by converting to
15033  # unix format.
15034  path="$BOOT_JDK"
15035  new_path=`$CYGPATH -u "$path"`
15036
15037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15040  # "foo.exe" is OK but "foo" is an error.
15041  #
15042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15043  # It is also a way to make sure we got the proper file name for the real test later on.
15044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15045  if test "x$test_shortpath" = x; then
15046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15049  fi
15050
15051  # Call helper function which possibly converts this using DOS-style short mode.
15052  # If so, the updated path is stored in $new_path.
15053
15054  input_path="$new_path"
15055  # Check if we need to convert this using DOS-style short mode. If the path
15056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15057  # take no chances and rewrite it.
15058  # Note: m4 eats our [], so we need to use [ and ] instead.
15059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15060  if test "x$has_forbidden_chars" != x; then
15061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15065      # Going to short mode and back again did indeed matter. Since short mode is
15066      # case insensitive, let's make it lowercase to improve readability.
15067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15068      # Now convert it back to Unix-stile (cygpath)
15069      input_path=`$CYGPATH -u "$shortmode_path"`
15070      new_path="$input_path"
15071    fi
15072  fi
15073
15074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15075  if test "x$test_cygdrive_prefix" = x; then
15076    # As a simple fix, exclude /usr/bin since it's not a real path.
15077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15079      # a path prefixed by /cygdrive for fixpath to work.
15080      new_path="$CYGWIN_ROOT_PATH$input_path"
15081    fi
15082  fi
15083
15084
15085  if test "x$path" != "x$new_path"; then
15086    BOOT_JDK="$new_path"
15087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15089  fi
15090
15091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15092
15093  path="$BOOT_JDK"
15094  has_colon=`$ECHO $path | $GREP ^.:`
15095  new_path="$path"
15096  if test "x$has_colon" = x; then
15097    # Not in mixed or Windows style, start by that.
15098    new_path=`cmd //c echo $path`
15099  fi
15100
15101
15102  input_path="$new_path"
15103  # Check if we need to convert this using DOS-style short mode. If the path
15104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15105  # take no chances and rewrite it.
15106  # Note: m4 eats our [], so we need to use [ and ] instead.
15107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15108  if test "x$has_forbidden_chars" != x; then
15109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15111  fi
15112
15113
15114  windows_path="$new_path"
15115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116    unix_path=`$CYGPATH -u "$windows_path"`
15117    new_path="$unix_path"
15118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15120    new_path="$unix_path"
15121  fi
15122
15123  if test "x$path" != "x$new_path"; then
15124    BOOT_JDK="$new_path"
15125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15127  fi
15128
15129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15131
15132  else
15133    # We're on a posix platform. Hooray! :)
15134    path="$BOOT_JDK"
15135    has_space=`$ECHO "$path" | $GREP " "`
15136    if test "x$has_space" != x; then
15137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15140    fi
15141
15142    # Use eval to expand a potential ~
15143    eval path="$path"
15144    if test ! -f "$path" && test ! -d "$path"; then
15145      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146    fi
15147
15148    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15149  fi
15150
15151              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15152$as_echo_n "checking for Boot JDK... " >&6; }
15153              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15154$as_echo "$BOOT_JDK" >&6; }
15155              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15156$as_echo_n "checking Boot JDK version... " >&6; }
15157              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15158              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15159$as_echo "$BOOT_JDK_VERSION" >&6; }
15160            fi # end check jdk version
15161          fi # end check rt.jar
15162        fi # end check javac
15163      fi # end check java
15164    fi # end check boot jdk found
15165  fi
15166
15167    done
15168  fi
15169
15170
15171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15173      # Do we have a bin/java?
15174      if test ! -x "$BOOT_JDK/bin/java"; then
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15177        BOOT_JDK_FOUND=no
15178      else
15179        # Do we have a bin/javac?
15180        if test ! -x "$BOOT_JDK/bin/javac"; then
15181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15185          BOOT_JDK_FOUND=no
15186        else
15187          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15188          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15191            BOOT_JDK_FOUND=no
15192          else
15193            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15194            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15195
15196            # Extra M4 quote needed to protect [] in grep expression.
15197            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15198            if test "x$FOUND_VERSION_78" = x; then
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15202$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15203              BOOT_JDK_FOUND=no
15204            else
15205              # We're done! :-)
15206              BOOT_JDK_FOUND=yes
15207
15208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209
15210  # Input might be given as Windows format, start by converting to
15211  # unix format.
15212  path="$BOOT_JDK"
15213  new_path=`$CYGPATH -u "$path"`
15214
15215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218  # "foo.exe" is OK but "foo" is an error.
15219  #
15220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221  # It is also a way to make sure we got the proper file name for the real test later on.
15222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223  if test "x$test_shortpath" = x; then
15224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15227  fi
15228
15229  # Call helper function which possibly converts this using DOS-style short mode.
15230  # If so, the updated path is stored in $new_path.
15231
15232  input_path="$new_path"
15233  # Check if we need to convert this using DOS-style short mode. If the path
15234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235  # take no chances and rewrite it.
15236  # Note: m4 eats our [], so we need to use [ and ] instead.
15237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238  if test "x$has_forbidden_chars" != x; then
15239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243      # Going to short mode and back again did indeed matter. Since short mode is
15244      # case insensitive, let's make it lowercase to improve readability.
15245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246      # Now convert it back to Unix-stile (cygpath)
15247      input_path=`$CYGPATH -u "$shortmode_path"`
15248      new_path="$input_path"
15249    fi
15250  fi
15251
15252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253  if test "x$test_cygdrive_prefix" = x; then
15254    # As a simple fix, exclude /usr/bin since it's not a real path.
15255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257      # a path prefixed by /cygdrive for fixpath to work.
15258      new_path="$CYGWIN_ROOT_PATH$input_path"
15259    fi
15260  fi
15261
15262
15263  if test "x$path" != "x$new_path"; then
15264    BOOT_JDK="$new_path"
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15267  fi
15268
15269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270
15271  path="$BOOT_JDK"
15272  has_colon=`$ECHO $path | $GREP ^.:`
15273  new_path="$path"
15274  if test "x$has_colon" = x; then
15275    # Not in mixed or Windows style, start by that.
15276    new_path=`cmd //c echo $path`
15277  fi
15278
15279
15280  input_path="$new_path"
15281  # Check if we need to convert this using DOS-style short mode. If the path
15282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283  # take no chances and rewrite it.
15284  # Note: m4 eats our [], so we need to use [ and ] instead.
15285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286  if test "x$has_forbidden_chars" != x; then
15287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289  fi
15290
15291
15292  windows_path="$new_path"
15293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294    unix_path=`$CYGPATH -u "$windows_path"`
15295    new_path="$unix_path"
15296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298    new_path="$unix_path"
15299  fi
15300
15301  if test "x$path" != "x$new_path"; then
15302    BOOT_JDK="$new_path"
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15305  fi
15306
15307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309
15310  else
15311    # We're on a posix platform. Hooray! :)
15312    path="$BOOT_JDK"
15313    has_space=`$ECHO "$path" | $GREP " "`
15314    if test "x$has_space" != x; then
15315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318    fi
15319
15320    # Use eval to expand a potential ~
15321    eval path="$path"
15322    if test ! -f "$path" && test ! -d "$path"; then
15323      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15324    fi
15325
15326    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15327  fi
15328
15329              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15330$as_echo_n "checking for Boot JDK... " >&6; }
15331              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15332$as_echo "$BOOT_JDK" >&6; }
15333              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15334$as_echo_n "checking Boot JDK version... " >&6; }
15335              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15336              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15337$as_echo "$BOOT_JDK_VERSION" >&6; }
15338            fi # end check jdk version
15339          fi # end check rt.jar
15340        fi # end check javac
15341      fi # end check java
15342    fi # end check boot jdk found
15343  fi
15344
15345  fi
15346
15347
15348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15350      # Do we have a bin/java?
15351      if test ! -x "$BOOT_JDK/bin/java"; then
15352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15354        BOOT_JDK_FOUND=no
15355      else
15356        # Do we have a bin/javac?
15357        if test ! -x "$BOOT_JDK/bin/javac"; then
15358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15362          BOOT_JDK_FOUND=no
15363        else
15364          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15365          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15366            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15368            BOOT_JDK_FOUND=no
15369          else
15370            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15371            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15372
15373            # Extra M4 quote needed to protect [] in grep expression.
15374            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15375            if test "x$FOUND_VERSION_78" = x; then
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15379$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15380              BOOT_JDK_FOUND=no
15381            else
15382              # We're done! :-)
15383              BOOT_JDK_FOUND=yes
15384
15385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386
15387  # Input might be given as Windows format, start by converting to
15388  # unix format.
15389  path="$BOOT_JDK"
15390  new_path=`$CYGPATH -u "$path"`
15391
15392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15395  # "foo.exe" is OK but "foo" is an error.
15396  #
15397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15398  # It is also a way to make sure we got the proper file name for the real test later on.
15399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15400  if test "x$test_shortpath" = x; then
15401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15403    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15404  fi
15405
15406  # Call helper function which possibly converts this using DOS-style short mode.
15407  # If so, the updated path is stored in $new_path.
15408
15409  input_path="$new_path"
15410  # Check if we need to convert this using DOS-style short mode. If the path
15411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412  # take no chances and rewrite it.
15413  # Note: m4 eats our [], so we need to use [ and ] instead.
15414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15415  if test "x$has_forbidden_chars" != x; then
15416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15420      # Going to short mode and back again did indeed matter. Since short mode is
15421      # case insensitive, let's make it lowercase to improve readability.
15422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423      # Now convert it back to Unix-stile (cygpath)
15424      input_path=`$CYGPATH -u "$shortmode_path"`
15425      new_path="$input_path"
15426    fi
15427  fi
15428
15429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15430  if test "x$test_cygdrive_prefix" = x; then
15431    # As a simple fix, exclude /usr/bin since it's not a real path.
15432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15434      # a path prefixed by /cygdrive for fixpath to work.
15435      new_path="$CYGWIN_ROOT_PATH$input_path"
15436    fi
15437  fi
15438
15439
15440  if test "x$path" != "x$new_path"; then
15441    BOOT_JDK="$new_path"
15442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15444  fi
15445
15446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447
15448  path="$BOOT_JDK"
15449  has_colon=`$ECHO $path | $GREP ^.:`
15450  new_path="$path"
15451  if test "x$has_colon" = x; then
15452    # Not in mixed or Windows style, start by that.
15453    new_path=`cmd //c echo $path`
15454  fi
15455
15456
15457  input_path="$new_path"
15458  # Check if we need to convert this using DOS-style short mode. If the path
15459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15460  # take no chances and rewrite it.
15461  # Note: m4 eats our [], so we need to use [ and ] instead.
15462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15463  if test "x$has_forbidden_chars" != x; then
15464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15466  fi
15467
15468
15469  windows_path="$new_path"
15470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471    unix_path=`$CYGPATH -u "$windows_path"`
15472    new_path="$unix_path"
15473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15475    new_path="$unix_path"
15476  fi
15477
15478  if test "x$path" != "x$new_path"; then
15479    BOOT_JDK="$new_path"
15480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15482  fi
15483
15484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15486
15487  else
15488    # We're on a posix platform. Hooray! :)
15489    path="$BOOT_JDK"
15490    has_space=`$ECHO "$path" | $GREP " "`
15491    if test "x$has_space" != x; then
15492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15494      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15495    fi
15496
15497    # Use eval to expand a potential ~
15498    eval path="$path"
15499    if test ! -f "$path" && test ! -d "$path"; then
15500      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15501    fi
15502
15503    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15504  fi
15505
15506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15507$as_echo_n "checking for Boot JDK... " >&6; }
15508              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15509$as_echo "$BOOT_JDK" >&6; }
15510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15511$as_echo_n "checking Boot JDK version... " >&6; }
15512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15514$as_echo "$BOOT_JDK_VERSION" >&6; }
15515            fi # end check jdk version
15516          fi # end check rt.jar
15517        fi # end check javac
15518      fi # end check java
15519    fi # end check boot jdk found
15520  fi
15521
15522
15523# If we haven't found anything yet, we've truly lost. Give up.
15524if test "x$BOOT_JDK_FOUND" = xno; then
15525
15526    # Print a helpful message on how to acquire the necessary build dependency.
15527    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15528    MISSING_DEPENDENCY=openjdk
15529    PKGHANDLER_COMMAND=
15530
15531    case $PKGHANDLER in
15532	apt-get)
15533                apt_help     $MISSING_DEPENDENCY ;;
15534    yum)
15535                yum_help     $MISSING_DEPENDENCY ;;
15536	port)
15537                port_help    $MISSING_DEPENDENCY ;;
15538	pkgutil)
15539                pkgutil_help $MISSING_DEPENDENCY ;;
15540	pkgadd)
15541                pkgadd_help  $MISSING_DEPENDENCY ;;
15542    * )
15543      break ;;
15544    esac
15545
15546    if test "x$PKGHANDLER_COMMAND" != x; then
15547        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15548    fi
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15551$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15553$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15554  as_fn_error $? "Cannot continue" "$LINENO" 5
15555fi
15556
15557# Setup proper paths for what we found
15558BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15559if test ! -f "$BOOT_RTJAR"; then
15560    # On MacOSX it is called classes.jar
15561    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15562    if test -f "$BOOT_RTJAR"; then
15563      # Remove the ..
15564      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15565    fi
15566fi
15567BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15568BOOT_JDK="$BOOT_JDK"
15569
15570
15571
15572
15573# Setup tools from the Boot JDK.
15574
15575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15576$as_echo_n "checking for java in Boot JDK... " >&6; }
15577  JAVA=$BOOT_JDK/bin/java
15578  if test ! -x $JAVA; then
15579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15580$as_echo "not found" >&6; }
15581      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15582$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15583      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15584  fi
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15586$as_echo "ok" >&6; }
15587
15588
15589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15590$as_echo_n "checking for javac in Boot JDK... " >&6; }
15591  JAVAC=$BOOT_JDK/bin/javac
15592  if test ! -x $JAVAC; then
15593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15594$as_echo "not found" >&6; }
15595      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15596$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15597      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15598  fi
15599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15600$as_echo "ok" >&6; }
15601
15602
15603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15604$as_echo_n "checking for javah in Boot JDK... " >&6; }
15605  JAVAH=$BOOT_JDK/bin/javah
15606  if test ! -x $JAVAH; then
15607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15608$as_echo "not found" >&6; }
15609      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15610$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15611      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15612  fi
15613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15614$as_echo "ok" >&6; }
15615
15616
15617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15618$as_echo_n "checking for javap in Boot JDK... " >&6; }
15619  JAVAP=$BOOT_JDK/bin/javap
15620  if test ! -x $JAVAP; then
15621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15622$as_echo "not found" >&6; }
15623      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15624$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15625      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15626  fi
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15628$as_echo "ok" >&6; }
15629
15630
15631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15632$as_echo_n "checking for jar in Boot JDK... " >&6; }
15633  JAR=$BOOT_JDK/bin/jar
15634  if test ! -x $JAR; then
15635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636$as_echo "not found" >&6; }
15637      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15640  fi
15641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642$as_echo "ok" >&6; }
15643
15644
15645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15646$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15647  RMIC=$BOOT_JDK/bin/rmic
15648  if test ! -x $RMIC; then
15649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650$as_echo "not found" >&6; }
15651      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15654  fi
15655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656$as_echo "ok" >&6; }
15657
15658
15659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15660$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15661  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15662  if test ! -x $NATIVE2ASCII; then
15663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664$as_echo "not found" >&6; }
15665      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15668  fi
15669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670$as_echo "ok" >&6; }
15671
15672
15673# Finally, set some other options...
15674
15675# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15676BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15677
15678
15679
15680
15681##############################################################################
15682#
15683# Specify options for anything that is run with the Boot JDK.
15684#
15685
15686# Check whether --with-boot-jdk-jvmargs was given.
15687if test "${with_boot_jdk_jvmargs+set}" = set; then :
15688  withval=$with_boot_jdk_jvmargs;
15689fi
15690
15691
15692if test "x$with_boot_jdk_jvmargs" = x; then
15693    # Not all JVM:s accept the same arguments on the command line.
15694    # OpenJDK specific increase in thread stack for JDK build,
15695    # well more specifically, when running javac.
15696    if test "x$BUILD_NUM_BITS" = x32; then
15697       STACK_SIZE=768
15698    else
15699       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15700       # since 64-bit pointers are pushed on the stach. Apparently, we need
15701       # to increase the stack space when javacing the JDK....
15702       STACK_SIZE=1536
15703    fi
15704
15705    # Minimum amount of heap memory.
15706
15707    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15708    $ECHO "Command: $JAVA -Xms64M -version" >&5
15709    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15710    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15711    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15712    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15713        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15714	JVM_ARG_OK=true
15715    else
15716	$ECHO "Arg failed:" >&5
15717	$ECHO "$OUTPUT" >&5
15718	JVM_ARG_OK=false
15719    fi
15720
15721    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15722        # Why does macosx need more heap? Its the huge JDK batch.
15723
15724    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15725    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15726    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15727    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15728    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15729    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15730        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15731	JVM_ARG_OK=true
15732    else
15733	$ECHO "Arg failed:" >&5
15734	$ECHO "$OUTPUT" >&5
15735	JVM_ARG_OK=false
15736    fi
15737
15738    else
15739
15740    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15741    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15742    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15743    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15744    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15745    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15746        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15747	JVM_ARG_OK=true
15748    else
15749	$ECHO "Arg failed:" >&5
15750	$ECHO "$OUTPUT" >&5
15751	JVM_ARG_OK=false
15752    fi
15753
15754    fi
15755    # When is adding -client something that speeds up the JVM?
15756    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15757
15758    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15759    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15760    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15761    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15762    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15763    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15764        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15765	JVM_ARG_OK=true
15766    else
15767	$ECHO "Arg failed:" >&5
15768	$ECHO "$OUTPUT" >&5
15769	JVM_ARG_OK=false
15770    fi
15771
15772
15773    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15774    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15775    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15776    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15777    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15778    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15779        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15780	JVM_ARG_OK=true
15781    else
15782	$ECHO "Arg failed:" >&5
15783	$ECHO "$OUTPUT" >&5
15784	JVM_ARG_OK=false
15785    fi
15786
15787
15788    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15789    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15790    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15791    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15792    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15793    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15794        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15795	JVM_ARG_OK=true
15796    else
15797	$ECHO "Arg failed:" >&5
15798	$ECHO "$OUTPUT" >&5
15799	JVM_ARG_OK=false
15800    fi
15801
15802    # Disable special log output when a debug build is used as Boot JDK...
15803
15804    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15805    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15806    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15807    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15808    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15809    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15810        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15811	JVM_ARG_OK=true
15812    else
15813	$ECHO "Arg failed:" >&5
15814	$ECHO "$OUTPUT" >&5
15815	JVM_ARG_OK=false
15816    fi
15817
15818fi
15819
15820BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15821
15822
15823
15824###############################################################################
15825#
15826# Configure the sources to use. We can add or override individual directories.
15827#
15828###############################################################################
15829
15830
15831
15832# Where are the sources. Any of these can be overridden
15833# using --with-override-corba and the likes.
15834LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15835CORBA_TOPDIR="$SRC_ROOT/corba"
15836JAXP_TOPDIR="$SRC_ROOT/jaxp"
15837JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15838HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15839NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15840JDK_TOPDIR="$SRC_ROOT/jdk"
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851###############################################################################
15852#
15853# Pickup additional source for a component from outside of the source root
15854# or override source for a component.
15855#
15856
15857# Check whether --with-add-source-root was given.
15858if test "${with_add_source_root+set}" = set; then :
15859  withval=$with_add_source_root;
15860fi
15861
15862
15863
15864# Check whether --with-override-source-root was given.
15865if test "${with_override_source_root+set}" = set; then :
15866  withval=$with_override_source_root;
15867fi
15868
15869
15870
15871# Check whether --with-adds-and-overrides was given.
15872if test "${with_adds_and_overrides+set}" = set; then :
15873  withval=$with_adds_and_overrides;
15874fi
15875
15876
15877if test "x$with_adds_and_overrides" != x; then
15878    with_add_source_root="$with_adds_and_overrides/adds"
15879    with_override_source_root="$with_adds_and_overrides/overrides"
15880fi
15881
15882if test "x$with_add_source_root" != x; then
15883    if ! test -d $with_add_source_root; then
15884       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15885    fi
15886    CURDIR="$PWD"
15887    cd "$with_add_source_root"
15888    ADD_SRC_ROOT="`pwd`"
15889    cd "$CURDIR"
15890    # Verify that the addon source root does not have any root makefiles.
15891    # If it does, then it is usually an error, prevent this.
15892    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15893       test -f $with_add_source_root/langtools/make/Makefile; then
15894        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
15895    fi
15896    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15897       test -f $with_add_source_root/corba/make/Makefile; then
15898        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
15899    fi
15900    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15901       test -f $with_add_source_root/jaxp/make/Makefile; then
15902        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
15903    fi
15904    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15905       test -f $with_add_source_root/jaxws/make/Makefile; then
15906        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
15907    fi
15908    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15909       test -f $with_add_source_root/hotspot/make/Makefile; then
15910        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
15911    fi
15912    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15913       test -f $with_add_source_root/jdk/make/Makefile; then
15914        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
15915    fi
15916fi
15917
15918
15919if test "x$with_override_source_root" != x; then
15920    if ! test -d $with_override_source_root; then
15921       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15922    fi
15923    CURDIR="$PWD"
15924    cd "$with_override_source_root"
15925    OVERRIDE_SRC_ROOT="`pwd`"
15926    cd "$CURDIR"
15927    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15928       test -f $with_override_source_root/langtools/make/Makefile; then
15929        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
15930    fi
15931    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15932       test -f $with_override_source_root/corba/make/Makefile; then
15933        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
15934    fi
15935    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15936       test -f $with_override_source_root/jaxp/make/Makefile; then
15937        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
15938    fi
15939    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15940       test -f $with_override_source_root/jaxws/make/Makefile; then
15941        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
15942    fi
15943    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15944       test -f $with_override_source_root/hotspot/make/Makefile; then
15945        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
15946    fi
15947    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15948       test -f $with_override_source_root/jdk/make/Makefile; then
15949        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
15950    fi
15951fi
15952
15953
15954###############################################################################
15955#
15956# Override a repo completely, this is used for example when you have 3 small
15957# development sandboxes of the langtools sources and want to avoid having 3 full
15958# OpenJDK sources checked out on disk.
15959#
15960# Assuming that the 3 langtools sandboxes are located here:
15961# /home/fredrik/sandbox1/langtools
15962# /home/fredrik/sandbox2/langtools
15963# /home/fredrik/sandbox3/langtools
15964#
15965# From the source root you create build subdirs manually:
15966#     mkdir -p build1 build2 build3
15967# in each build directory run:
15968#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15969#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15970#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15971#
15972
15973
15974# Check whether --with-override-langtools was given.
15975if test "${with_override_langtools+set}" = set; then :
15976  withval=$with_override_langtools;
15977fi
15978
15979
15980
15981# Check whether --with-override-corba was given.
15982if test "${with_override_corba+set}" = set; then :
15983  withval=$with_override_corba;
15984fi
15985
15986
15987
15988# Check whether --with-override-jaxp was given.
15989if test "${with_override_jaxp+set}" = set; then :
15990  withval=$with_override_jaxp;
15991fi
15992
15993
15994
15995# Check whether --with-override-jaxws was given.
15996if test "${with_override_jaxws+set}" = set; then :
15997  withval=$with_override_jaxws;
15998fi
15999
16000
16001
16002# Check whether --with-override-hotspot was given.
16003if test "${with_override_hotspot+set}" = set; then :
16004  withval=$with_override_hotspot;
16005fi
16006
16007
16008
16009# Check whether --with-override-jdk was given.
16010if test "${with_override_jdk+set}" = set; then :
16011  withval=$with_override_jdk;
16012fi
16013
16014
16015if test "x$with_override_langtools" != x; then
16016    CURDIR="$PWD"
16017    cd "$with_override_langtools"
16018    LANGTOOLS_TOPDIR="`pwd`"
16019    cd "$CURDIR"
16020    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16021        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16022    fi
16023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16024$as_echo_n "checking if langtools should be overridden... " >&6; }
16025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16026$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16027fi
16028if test "x$with_override_corba" != x; then
16029    CURDIR="$PWD"
16030    cd "$with_override_corba"
16031    CORBA_TOPDIR="`pwd`"
16032    cd "$CURDIR"
16033    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16034        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16035    fi
16036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16037$as_echo_n "checking if corba should be overridden... " >&6; }
16038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16039$as_echo "yes with $CORBA_TOPDIR" >&6; }
16040fi
16041if test "x$with_override_jaxp" != x; then
16042    CURDIR="$PWD"
16043    cd "$with_override_jaxp"
16044    JAXP_TOPDIR="`pwd`"
16045    cd "$CURDIR"
16046    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16047        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16048    fi
16049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16050$as_echo_n "checking if jaxp should be overridden... " >&6; }
16051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16052$as_echo "yes with $JAXP_TOPDIR" >&6; }
16053fi
16054if test "x$with_override_jaxws" != x; then
16055    CURDIR="$PWD"
16056    cd "$with_override_jaxws"
16057    JAXWS_TOPDIR="`pwd`"
16058    cd "$CURDIR"
16059    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16060        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16061    fi
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16063$as_echo_n "checking if jaxws should be overridden... " >&6; }
16064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16065$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16066fi
16067if test "x$with_override_hotspot" != x; then
16068    CURDIR="$PWD"
16069    cd "$with_override_hotspot"
16070    HOTSPOT_TOPDIR="`pwd`"
16071    cd "$CURDIR"
16072    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16073       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16074        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16075    fi
16076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16077$as_echo_n "checking if hotspot should be overridden... " >&6; }
16078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16079$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16080fi
16081if test "x$with_override_nashorn" != x; then
16082    CURDIR="$PWD"
16083    cd "$with_override_nashorn"
16084    NASHORN_TOPDIR="`pwd`"
16085    cd "$CURDIR"
16086    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16087        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16088    fi
16089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16090$as_echo_n "checking if nashorn should be overridden... " >&6; }
16091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16092$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16093fi
16094if test "x$with_override_jdk" != x; then
16095    CURDIR="$PWD"
16096    cd "$with_override_jdk"
16097    JDK_TOPDIR="`pwd`"
16098    cd "$CURDIR"
16099    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16100        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16101    fi
16102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16103$as_echo_n "checking if JDK should be overridden... " >&6; }
16104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16105$as_echo "yes with $JDK_TOPDIR" >&6; }
16106fi
16107
16108
16109
16110BUILD_OUTPUT="$OUTPUT_ROOT"
16111
16112
16113HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16114BUILD_HOTSPOT=true
16115
16116
16117
16118# Check whether --with-import-hotspot was given.
16119if test "${with_import_hotspot+set}" = set; then :
16120  withval=$with_import_hotspot;
16121fi
16122
16123if test "x$with_import_hotspot" != x; then
16124    CURDIR="$PWD"
16125    cd "$with_import_hotspot"
16126    HOTSPOT_DIST="`pwd`"
16127    cd "$CURDIR"
16128    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16129        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16130    fi
16131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16132$as_echo_n "checking if hotspot should be imported... " >&6; }
16133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16134$as_echo "yes from $HOTSPOT_DIST" >&6; }
16135    BUILD_HOTSPOT=false
16136fi
16137
16138JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16139
16140
16141###############################################################################
16142#
16143# Setup the toolchain (compilers etc), i.e. the tools that need to be
16144# cross-compilation aware.
16145#
16146###############################################################################
16147
16148
16149###############################################################################
16150#
16151# Configure the development tool paths and potential sysroot.
16152#
16153ac_ext=cpp
16154ac_cpp='$CXXCPP $CPPFLAGS'
16155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16158
16159
16160# The option used to specify the target .o,.a or .so file.
16161# When compiling, how to specify the to be created object file.
16162CC_OUT_OPTION='-o$(SPACE)'
16163# When linking, how to specify the to be created executable.
16164EXE_OUT_OPTION='-o$(SPACE)'
16165# When linking, how to specify the to be created dynamically linkable library.
16166LD_OUT_OPTION='-o$(SPACE)'
16167# When archiving, how to specify the to be create static archive for object files.
16168AR_OUT_OPTION='rcs$(SPACE)'
16169
16170
16171
16172
16173
16174# Locate the actual tools
16175
16176
16177# Check whether --with-jtreg was given.
16178if test "${with_jtreg+set}" = set; then :
16179  withval=$with_jtreg;
16180fi
16181
16182
16183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTReg Regression Test Harness" >&5
16184$as_echo_n "checking for JTReg Regression Test Harness... " >&6; }
16185
16186  if test "x$with_jtreg" != x; then
16187    JT_HOME="$with_jtreg"
16188
16189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16190
16191  # Input might be given as Windows format, start by converting to
16192  # unix format.
16193  path="$JT_HOME"
16194  new_path=`$CYGPATH -u "$path"`
16195
16196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16199  # "foo.exe" is OK but "foo" is an error.
16200  #
16201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16202  # It is also a way to make sure we got the proper file name for the real test later on.
16203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16204  if test "x$test_shortpath" = x; then
16205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16206$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16207    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16208  fi
16209
16210  # Call helper function which possibly converts this using DOS-style short mode.
16211  # If so, the updated path is stored in $new_path.
16212
16213  input_path="$new_path"
16214  # Check if we need to convert this using DOS-style short mode. If the path
16215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16216  # take no chances and rewrite it.
16217  # Note: m4 eats our [], so we need to use [ and ] instead.
16218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16219  if test "x$has_forbidden_chars" != x; then
16220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16224      # Going to short mode and back again did indeed matter. Since short mode is
16225      # case insensitive, let's make it lowercase to improve readability.
16226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16227      # Now convert it back to Unix-stile (cygpath)
16228      input_path=`$CYGPATH -u "$shortmode_path"`
16229      new_path="$input_path"
16230    fi
16231  fi
16232
16233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16234  if test "x$test_cygdrive_prefix" = x; then
16235    # As a simple fix, exclude /usr/bin since it's not a real path.
16236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16238      # a path prefixed by /cygdrive for fixpath to work.
16239      new_path="$CYGWIN_ROOT_PATH$input_path"
16240    fi
16241  fi
16242
16243
16244  if test "x$path" != "x$new_path"; then
16245    JT_HOME="$new_path"
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16247$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16248  fi
16249
16250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16251
16252  path="$JT_HOME"
16253  has_colon=`$ECHO $path | $GREP ^.:`
16254  new_path="$path"
16255  if test "x$has_colon" = x; then
16256    # Not in mixed or Windows style, start by that.
16257    new_path=`cmd //c echo $path`
16258  fi
16259
16260
16261  input_path="$new_path"
16262  # Check if we need to convert this using DOS-style short mode. If the path
16263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16264  # take no chances and rewrite it.
16265  # Note: m4 eats our [], so we need to use [ and ] instead.
16266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16267  if test "x$has_forbidden_chars" != x; then
16268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16270  fi
16271
16272
16273  windows_path="$new_path"
16274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16275    unix_path=`$CYGPATH -u "$windows_path"`
16276    new_path="$unix_path"
16277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16279    new_path="$unix_path"
16280  fi
16281
16282  if test "x$path" != "x$new_path"; then
16283    JT_HOME="$new_path"
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16285$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16286  fi
16287
16288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16290
16291  else
16292    # We're on a posix platform. Hooray! :)
16293    path="$JT_HOME"
16294    has_space=`$ECHO "$path" | $GREP " "`
16295    if test "x$has_space" != x; then
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16297$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16299    fi
16300
16301    # Use eval to expand a potential ~
16302    eval path="$path"
16303    if test ! -f "$path" && test ! -d "$path"; then
16304      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16305    fi
16306
16307    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16308  fi
16309
16310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
16311$as_echo "$JT_HOME" >&6; }
16312
16313    # jtreg win32 script works for everybody
16314    JTREGEXE="$JT_HOME/win32/bin/jtreg"
16315    if test ! -f "$JTREGEXE"; then
16316      as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16317    fi
16318  else
16319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16320$as_echo "no" >&6; }
16321  fi
16322
16323
16324
16325
16326
16327if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16328
16329  # Store path to cygwin link.exe to help excluding it when searching for
16330  # VS linker. This must be done before changing the PATH when looking for VS.
16331  # Extract the first word of "link", so it can be a program name with args.
16332set dummy link; ac_word=$2
16333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16334$as_echo_n "checking for $ac_word... " >&6; }
16335if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16336  $as_echo_n "(cached) " >&6
16337else
16338  case $CYGWIN_LINK in
16339  [\\/]* | ?:[\\/]*)
16340  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16341  ;;
16342  *)
16343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16344for as_dir in $PATH
16345do
16346  IFS=$as_save_IFS
16347  test -z "$as_dir" && as_dir=.
16348    for ac_exec_ext in '' $ac_executable_extensions; do
16349  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16350    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16352    break 2
16353  fi
16354done
16355  done
16356IFS=$as_save_IFS
16357
16358  ;;
16359esac
16360fi
16361CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16362if test -n "$CYGWIN_LINK"; then
16363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16364$as_echo "$CYGWIN_LINK" >&6; }
16365else
16366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16367$as_echo "no" >&6; }
16368fi
16369
16370
16371  if test "x$CYGWIN_LINK" != x; then
16372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16373$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16374    "$CYGWIN_LINK" --version > /dev/null
16375    if test $? -eq 0 ; then
16376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16377$as_echo "yes" >&6; }
16378    else
16379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16380$as_echo "no" >&6; }
16381      # This might be the VS linker. Don't exclude it later on.
16382      CYGWIN_LINK=""
16383    fi
16384  fi
16385
16386  # First-hand choice is to locate and run the vsvars bat file.
16387
16388  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16389    VCVARSFILE="vc/bin/vcvars32.bat"
16390  else
16391    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16392  fi
16393
16394  VS_ENV_CMD=""
16395  VS_ENV_ARGS=""
16396  if test "x$with_toolsdir" != x; then
16397
16398  if test "x$VS_ENV_CMD" = x; then
16399    VS100BASE="$with_toolsdir/../.."
16400    METHOD="--with-tools-dir"
16401
16402  windows_path="$VS100BASE"
16403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16404    unix_path=`$CYGPATH -u "$windows_path"`
16405    VS100BASE="$unix_path"
16406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16408    VS100BASE="$unix_path"
16409  fi
16410
16411    if test -d "$VS100BASE"; then
16412      if test -f "$VS100BASE/$VCVARSFILE"; then
16413        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16414$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16415        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16416      else
16417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16418$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16419        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16420$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16421      fi
16422    fi
16423  fi
16424
16425  fi
16426
16427  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16428    # Having specified an argument which is incorrect will produce an instant failure;
16429    # we should not go on looking
16430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16431$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16432    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16433$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16434    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16435  fi
16436
16437  if test "x$ProgramW6432" != x; then
16438
16439  if test "x$VS_ENV_CMD" = x; then
16440    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16441    METHOD="well-known name"
16442
16443  windows_path="$WIN_SDK_BASE"
16444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445    unix_path=`$CYGPATH -u "$windows_path"`
16446    WIN_SDK_BASE="$unix_path"
16447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16449    WIN_SDK_BASE="$unix_path"
16450  fi
16451
16452    if test -d "$WIN_SDK_BASE"; then
16453      # There have been cases of partial or broken SDK installations. A missing
16454      # lib dir is not going to work.
16455      if test ! -d "$WIN_SDK_BASE/../lib"; then
16456        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16457$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16459$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16460      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16461        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16462$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16463        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16464        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16465          VS_ENV_ARGS="/x86"
16466        else
16467          VS_ENV_ARGS="/x64"
16468        fi
16469      else
16470        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16471$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16472        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16473$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16474      fi
16475    fi
16476  fi
16477
16478  fi
16479  if test "x$PROGRAMW6432" != x; then
16480
16481  if test "x$VS_ENV_CMD" = x; then
16482    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16483    METHOD="well-known name"
16484
16485  windows_path="$WIN_SDK_BASE"
16486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16487    unix_path=`$CYGPATH -u "$windows_path"`
16488    WIN_SDK_BASE="$unix_path"
16489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16491    WIN_SDK_BASE="$unix_path"
16492  fi
16493
16494    if test -d "$WIN_SDK_BASE"; then
16495      # There have been cases of partial or broken SDK installations. A missing
16496      # lib dir is not going to work.
16497      if test ! -d "$WIN_SDK_BASE/../lib"; then
16498        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16499$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16500        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16501$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16502      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16503        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16504$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16505        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16506        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16507          VS_ENV_ARGS="/x86"
16508        else
16509          VS_ENV_ARGS="/x64"
16510        fi
16511      else
16512        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16513$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16514        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16515$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16516      fi
16517    fi
16518  fi
16519
16520  fi
16521  if test "x$PROGRAMFILES" != x; then
16522
16523  if test "x$VS_ENV_CMD" = x; then
16524    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16525    METHOD="well-known name"
16526
16527  windows_path="$WIN_SDK_BASE"
16528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16529    unix_path=`$CYGPATH -u "$windows_path"`
16530    WIN_SDK_BASE="$unix_path"
16531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16533    WIN_SDK_BASE="$unix_path"
16534  fi
16535
16536    if test -d "$WIN_SDK_BASE"; then
16537      # There have been cases of partial or broken SDK installations. A missing
16538      # lib dir is not going to work.
16539      if test ! -d "$WIN_SDK_BASE/../lib"; then
16540        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16541$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16542        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16543$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16544      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16546$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16547        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16548        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16549          VS_ENV_ARGS="/x86"
16550        else
16551          VS_ENV_ARGS="/x64"
16552        fi
16553      else
16554        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16555$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16556        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16557$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16558      fi
16559    fi
16560  fi
16561
16562  fi
16563
16564  if test "x$VS_ENV_CMD" = x; then
16565    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16566    METHOD="well-known name"
16567
16568  windows_path="$WIN_SDK_BASE"
16569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16570    unix_path=`$CYGPATH -u "$windows_path"`
16571    WIN_SDK_BASE="$unix_path"
16572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16574    WIN_SDK_BASE="$unix_path"
16575  fi
16576
16577    if test -d "$WIN_SDK_BASE"; then
16578      # There have been cases of partial or broken SDK installations. A missing
16579      # lib dir is not going to work.
16580      if test ! -d "$WIN_SDK_BASE/../lib"; then
16581        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16582$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16584$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16585      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16586        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16587$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16588        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16589        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16590          VS_ENV_ARGS="/x86"
16591        else
16592          VS_ENV_ARGS="/x64"
16593        fi
16594      else
16595        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16596$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16597        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16598$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16599      fi
16600    fi
16601  fi
16602
16603
16604  if test "x$VS_ENV_CMD" = x; then
16605    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16606    METHOD="well-known name"
16607
16608  windows_path="$WIN_SDK_BASE"
16609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16610    unix_path=`$CYGPATH -u "$windows_path"`
16611    WIN_SDK_BASE="$unix_path"
16612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16614    WIN_SDK_BASE="$unix_path"
16615  fi
16616
16617    if test -d "$WIN_SDK_BASE"; then
16618      # There have been cases of partial or broken SDK installations. A missing
16619      # lib dir is not going to work.
16620      if test ! -d "$WIN_SDK_BASE/../lib"; then
16621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16622$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16623        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16624$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16625      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16626        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16627$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16628        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16629        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16630          VS_ENV_ARGS="/x86"
16631        else
16632          VS_ENV_ARGS="/x64"
16633        fi
16634      else
16635        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16636$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16637        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16638$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16639      fi
16640    fi
16641  fi
16642
16643
16644  if test "x$VS100COMNTOOLS" != x; then
16645
16646  if test "x$VS_ENV_CMD" = x; then
16647    VS100BASE="$VS100COMNTOOLS/../.."
16648    METHOD="VS100COMNTOOLS variable"
16649
16650  windows_path="$VS100BASE"
16651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16652    unix_path=`$CYGPATH -u "$windows_path"`
16653    VS100BASE="$unix_path"
16654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16656    VS100BASE="$unix_path"
16657  fi
16658
16659    if test -d "$VS100BASE"; then
16660      if test -f "$VS100BASE/$VCVARSFILE"; then
16661        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16662$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16663        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16664      else
16665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16666$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16668$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16669      fi
16670    fi
16671  fi
16672
16673  fi
16674  if test "x$PROGRAMFILES" != x; then
16675
16676  if test "x$VS_ENV_CMD" = x; then
16677    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16678    METHOD="well-known name"
16679
16680  windows_path="$VS100BASE"
16681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16682    unix_path=`$CYGPATH -u "$windows_path"`
16683    VS100BASE="$unix_path"
16684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16686    VS100BASE="$unix_path"
16687  fi
16688
16689    if test -d "$VS100BASE"; then
16690      if test -f "$VS100BASE/$VCVARSFILE"; then
16691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16692$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16693        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16694      else
16695        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16696$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16697        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16698$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16699      fi
16700    fi
16701  fi
16702
16703  fi
16704
16705  if test "x$VS_ENV_CMD" = x; then
16706    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16707    METHOD="well-known name"
16708
16709  windows_path="$VS100BASE"
16710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16711    unix_path=`$CYGPATH -u "$windows_path"`
16712    VS100BASE="$unix_path"
16713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16715    VS100BASE="$unix_path"
16716  fi
16717
16718    if test -d "$VS100BASE"; then
16719      if test -f "$VS100BASE/$VCVARSFILE"; then
16720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16721$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16722        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16723      else
16724        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16725$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16726        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16727$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16728      fi
16729    fi
16730  fi
16731
16732
16733  if test "x$VS_ENV_CMD" = x; then
16734    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16735    METHOD="well-known name"
16736
16737  windows_path="$VS100BASE"
16738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16739    unix_path=`$CYGPATH -u "$windows_path"`
16740    VS100BASE="$unix_path"
16741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16743    VS100BASE="$unix_path"
16744  fi
16745
16746    if test -d "$VS100BASE"; then
16747      if test -f "$VS100BASE/$VCVARSFILE"; then
16748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16749$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16750        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16751      else
16752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16753$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16755$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16756      fi
16757    fi
16758  fi
16759
16760
16761  if test "x$VS_ENV_CMD" != x; then
16762    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16763
16764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16765
16766  # First separate the path from the arguments. This will split at the first
16767  # space.
16768  complete="$VS_ENV_CMD"
16769  path="${complete%% *}"
16770  tmp="$complete EOL"
16771  arguments="${tmp#* }"
16772
16773  # Input might be given as Windows format, start by converting to
16774  # unix format.
16775  new_path=`$CYGPATH -u "$path"`
16776
16777  # Now try to locate executable using which
16778  new_path=`$WHICH "$new_path" 2> /dev/null`
16779  # bat and cmd files are not always considered executable in cygwin causing which
16780  # to not find them
16781  if test "x$new_path" = x \
16782           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16783           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16784    new_path=`$CYGPATH -u "$path"`
16785  fi
16786  if test "x$new_path" = x; then
16787    # Oops. Which didn't find the executable.
16788    # The splitting of arguments from the executable at a space might have been incorrect,
16789    # since paths with space are more likely in Windows. Give it another try with the whole
16790    # argument.
16791    path="$complete"
16792    arguments="EOL"
16793    new_path=`$CYGPATH -u "$path"`
16794    new_path=`$WHICH "$new_path" 2> /dev/null`
16795    # bat and cmd files are not always considered executable in cygwin causing which
16796    # to not find them
16797    if test "x$new_path" = x \
16798             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16799             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16800      new_path=`$CYGPATH -u "$path"`
16801    fi
16802    if test "x$new_path" = x; then
16803      # It's still not found. Now this is an unrecoverable error.
16804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16805$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16806      has_space=`$ECHO "$complete" | $GREP " "`
16807      if test "x$has_space" != x; then
16808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16810      fi
16811      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16812    fi
16813  fi
16814
16815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16818  # "foo.exe" is OK but "foo" is an error.
16819  #
16820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16821  # It is also a way to make sure we got the proper file name for the real test later on.
16822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16823  if test "x$test_shortpath" = x; then
16824    # Short path failed, file does not exist as specified.
16825    # Try adding .exe or .cmd
16826    if test -f "${new_path}.exe"; then
16827       input_to_shortpath="${new_path}.exe"
16828    elif test -f "${new_path}.cmd"; then
16829       input_to_shortpath="${new_path}.cmd"
16830    else
16831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16832$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16833      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16834$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16835      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16836    fi
16837  else
16838    input_to_shortpath="$new_path"
16839  fi
16840
16841  # Call helper function which possibly converts this using DOS-style short mode.
16842  # If so, the updated path is stored in $new_path.
16843  new_path="$input_to_shortpath"
16844
16845  input_path="$input_to_shortpath"
16846  # Check if we need to convert this using DOS-style short mode. If the path
16847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16848  # take no chances and rewrite it.
16849  # Note: m4 eats our [], so we need to use [ and ] instead.
16850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16851  if test "x$has_forbidden_chars" != x; then
16852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16856      # Going to short mode and back again did indeed matter. Since short mode is
16857      # case insensitive, let's make it lowercase to improve readability.
16858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16859      # Now convert it back to Unix-stile (cygpath)
16860      input_path=`$CYGPATH -u "$shortmode_path"`
16861      new_path="$input_path"
16862    fi
16863  fi
16864
16865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16866  if test "x$test_cygdrive_prefix" = x; then
16867    # As a simple fix, exclude /usr/bin since it's not a real path.
16868    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16870      # a path prefixed by /cygdrive for fixpath to work.
16871      new_path="$CYGWIN_ROOT_PATH$input_path"
16872    fi
16873  fi
16874
16875  # remove trailing .exe if any
16876  new_path="${new_path/%.exe/}"
16877
16878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16879
16880  # First separate the path from the arguments. This will split at the first
16881  # space.
16882  complete="$VS_ENV_CMD"
16883  path="${complete%% *}"
16884  tmp="$complete EOL"
16885  arguments="${tmp#* }"
16886
16887  # Input might be given as Windows format, start by converting to
16888  # unix format.
16889  new_path="$path"
16890
16891  windows_path="$new_path"
16892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16893    unix_path=`$CYGPATH -u "$windows_path"`
16894    new_path="$unix_path"
16895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16897    new_path="$unix_path"
16898  fi
16899
16900
16901  # Now try to locate executable using which
16902  new_path=`$WHICH "$new_path" 2> /dev/null`
16903
16904  if test "x$new_path" = x; then
16905    # Oops. Which didn't find the executable.
16906    # The splitting of arguments from the executable at a space might have been incorrect,
16907    # since paths with space are more likely in Windows. Give it another try with the whole
16908    # argument.
16909    path="$complete"
16910    arguments="EOL"
16911    new_path="$path"
16912
16913  windows_path="$new_path"
16914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16915    unix_path=`$CYGPATH -u "$windows_path"`
16916    new_path="$unix_path"
16917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16919    new_path="$unix_path"
16920  fi
16921
16922
16923    new_path=`$WHICH "$new_path" 2> /dev/null`
16924
16925    if test "x$new_path" = x; then
16926      # It's still not found. Now this is an unrecoverable error.
16927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16928$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16929      has_space=`$ECHO "$complete" | $GREP " "`
16930      if test "x$has_space" != x; then
16931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16933      fi
16934      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16935    fi
16936  fi
16937
16938  # Now new_path has a complete unix path to the binary
16939  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16940    # Keep paths in /bin as-is, but remove trailing .exe if any
16941    new_path="${new_path/%.exe/}"
16942    # Do not save /bin paths to all_fixpath_prefixes!
16943  else
16944    # Not in mixed or Windows style, start by that.
16945    new_path=`cmd //c echo $new_path`
16946
16947  input_path="$new_path"
16948  # Check if we need to convert this using DOS-style short mode. If the path
16949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16950  # take no chances and rewrite it.
16951  # Note: m4 eats our [], so we need to use [ and ] instead.
16952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16953  if test "x$has_forbidden_chars" != x; then
16954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16956  fi
16957
16958    # Output is in $new_path
16959
16960  windows_path="$new_path"
16961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16962    unix_path=`$CYGPATH -u "$windows_path"`
16963    new_path="$unix_path"
16964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16966    new_path="$unix_path"
16967  fi
16968
16969    # remove trailing .exe if any
16970    new_path="${new_path/%.exe/}"
16971
16972    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16973    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16974  fi
16975
16976  else
16977    # We're on a posix platform. Hooray! :)
16978    # First separate the path from the arguments. This will split at the first
16979    # space.
16980    complete="$VS_ENV_CMD"
16981    path="${complete%% *}"
16982    tmp="$complete EOL"
16983    arguments="${tmp#* }"
16984
16985    # Cannot rely on the command "which" here since it doesn't always work.
16986    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16987    if test -z "$is_absolute_path"; then
16988      # Path to executable is not absolute. Find it.
16989      IFS_save="$IFS"
16990      IFS=:
16991      for p in $PATH; do
16992        if test -f "$p/$path" && test -x "$p/$path"; then
16993          new_path="$p/$path"
16994          break
16995        fi
16996      done
16997      IFS="$IFS_save"
16998    else
16999      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17000$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17001      new_path="$path"
17002    fi
17003
17004    if test "x$new_path" = x; then
17005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17006$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17007        has_space=`$ECHO "$complete" | $GREP " "`
17008        if test "x$has_space" != x; then
17009          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17011        fi
17012        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17013      fi
17014  fi
17015
17016      # Now join together the path and the arguments once again
17017      if test "x$arguments" != xEOL; then
17018        new_complete="$new_path ${arguments% *}"
17019      else
17020        new_complete="$new_path"
17021      fi
17022
17023  if test "x$complete" != "x$new_complete"; then
17024      VS_ENV_CMD="$new_complete"
17025      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17026$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17027    fi
17028
17029
17030    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17031    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17032$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17033    cd $OUTPUT_ROOT
17034    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17035    # to autoconf standards.
17036
17037    #----
17038
17039    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17040    # but calculate the difference in Cygwin environment before/after running it and then
17041    # apply the diff.
17042
17043    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17044      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17045      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17046      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17047    else
17048      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17049      _dosbash=`cmd //c echo \`which bash\``
17050    fi
17051
17052    # generate the set of exported vars before/after the vs10 setup
17053    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17054    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17055    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17056    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17057
17058    # Now execute the newly created bat file.
17059    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17060    cmd /c localdevenvtmp.bat | cat
17061
17062    # apply the diff (less some non-vs10 vars named by "!")
17063    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17064    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17065    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17066
17067    # cleanup
17068    $RM localdevenvtmp*
17069    #----
17070    cd $CURDIR
17071    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17073$as_echo "no" >&6; }
17074      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17075$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17076      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17077$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17078      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17079$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17080      as_fn_error $? "Cannot continue" "$LINENO" 5
17081    fi
17082
17083    # Now set all paths and other env variables. This will allow the rest of
17084    # the configure script to find and run the compiler in the proper way.
17085    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17086$as_echo "$as_me: Setting extracted environment variables" >&6;}
17087    . $OUTPUT_ROOT/localdevenv.sh
17088  else
17089    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17090    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17091$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17092  fi
17093
17094  # At this point, we should have corrent variables in the environment, or we can't continue.
17095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17096$as_echo_n "checking for Visual Studio variables... " >&6; }
17097
17098  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17099    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17101$as_echo "present but broken" >&6; }
17102      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17103    else
17104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17105$as_echo "ok" >&6; }
17106      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17107      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17108      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17109      VS_PATH="$PATH"
17110
17111
17112
17113    fi
17114  else
17115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17116$as_echo "not found" >&6; }
17117
17118    if test "x$VS_ENV_CMD" = x; then
17119      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17120$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17121      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17122$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17123    else
17124      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17125$as_echo "$as_me: Running the extraction script failed." >&6;}
17126    fi
17127    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17128$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17129    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17130$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17131    as_fn_error $? "Cannot continue" "$LINENO" 5
17132  fi
17133
17134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17135$as_echo_n "checking for msvcr100.dll... " >&6; }
17136
17137# Check whether --with-msvcr-dll was given.
17138if test "${with_msvcr_dll+set}" = set; then :
17139  withval=$with_msvcr_dll;
17140fi
17141
17142  if test "x$with_msvcr_dll" != x; then
17143    MSVCR_DLL="$with_msvcr_dll"
17144  else
17145    if test "x$VCINSTALLDIR" != x; then
17146      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17147        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17148      else
17149        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17150        if test "x$MSVCR_DLL" = x; then
17151          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17152        fi
17153      fi
17154      if test "x$MSVCR_DLL" != x; then
17155        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17156$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17157      else
17158        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17159$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17160      fi
17161    fi
17162    if test "x$MSVCR_DLL" = x; then
17163      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17164        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17165$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17166        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17167      fi
17168    fi
17169  fi
17170  if test "x$MSVCR_DLL" = x; then
17171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17172$as_echo "no" >&6; }
17173    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17174  fi
17175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17176$as_echo "$MSVCR_DLL" >&6; }
17177
17178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179
17180  # Input might be given as Windows format, start by converting to
17181  # unix format.
17182  path="$MSVCR_DLL"
17183  new_path=`$CYGPATH -u "$path"`
17184
17185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17188  # "foo.exe" is OK but "foo" is an error.
17189  #
17190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17191  # It is also a way to make sure we got the proper file name for the real test later on.
17192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17193  if test "x$test_shortpath" = x; then
17194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17195$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17196    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17197  fi
17198
17199  # Call helper function which possibly converts this using DOS-style short mode.
17200  # If so, the updated path is stored in $new_path.
17201
17202  input_path="$new_path"
17203  # Check if we need to convert this using DOS-style short mode. If the path
17204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17205  # take no chances and rewrite it.
17206  # Note: m4 eats our [], so we need to use [ and ] instead.
17207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17208  if test "x$has_forbidden_chars" != x; then
17209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17213      # Going to short mode and back again did indeed matter. Since short mode is
17214      # case insensitive, let's make it lowercase to improve readability.
17215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17216      # Now convert it back to Unix-stile (cygpath)
17217      input_path=`$CYGPATH -u "$shortmode_path"`
17218      new_path="$input_path"
17219    fi
17220  fi
17221
17222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17223  if test "x$test_cygdrive_prefix" = x; then
17224    # As a simple fix, exclude /usr/bin since it's not a real path.
17225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17227      # a path prefixed by /cygdrive for fixpath to work.
17228      new_path="$CYGWIN_ROOT_PATH$input_path"
17229    fi
17230  fi
17231
17232
17233  if test "x$path" != "x$new_path"; then
17234    MSVCR_DLL="$new_path"
17235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17236$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17237  fi
17238
17239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17240
17241  path="$MSVCR_DLL"
17242  has_colon=`$ECHO $path | $GREP ^.:`
17243  new_path="$path"
17244  if test "x$has_colon" = x; then
17245    # Not in mixed or Windows style, start by that.
17246    new_path=`cmd //c echo $path`
17247  fi
17248
17249
17250  input_path="$new_path"
17251  # Check if we need to convert this using DOS-style short mode. If the path
17252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17253  # take no chances and rewrite it.
17254  # Note: m4 eats our [], so we need to use [ and ] instead.
17255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17256  if test "x$has_forbidden_chars" != x; then
17257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17259  fi
17260
17261
17262  windows_path="$new_path"
17263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17264    unix_path=`$CYGPATH -u "$windows_path"`
17265    new_path="$unix_path"
17266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17268    new_path="$unix_path"
17269  fi
17270
17271  if test "x$path" != "x$new_path"; then
17272    MSVCR_DLL="$new_path"
17273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17274$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17275  fi
17276
17277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17279
17280  else
17281    # We're on a posix platform. Hooray! :)
17282    path="$MSVCR_DLL"
17283    has_space=`$ECHO "$path" | $GREP " "`
17284    if test "x$has_space" != x; then
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17286$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17288    fi
17289
17290    # Use eval to expand a potential ~
17291    eval path="$path"
17292    if test ! -f "$path" && test ! -d "$path"; then
17293      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17294    fi
17295
17296    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17297  fi
17298
17299
17300
17301
17302# Check whether --with-dxsdk was given.
17303if test "${with_dxsdk+set}" = set; then :
17304  withval=$with_dxsdk;
17305fi
17306
17307
17308# Check whether --with-dxsdk-lib was given.
17309if test "${with_dxsdk_lib+set}" = set; then :
17310  withval=$with_dxsdk_lib;
17311fi
17312
17313
17314# Check whether --with-dxsdk-include was given.
17315if test "${with_dxsdk_include+set}" = set; then :
17316  withval=$with_dxsdk_include;
17317fi
17318
17319
17320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17321$as_echo_n "checking for DirectX SDK... " >&6; }
17322
17323  if test "x$with_dxsdk" != x; then
17324    dxsdk_path="$with_dxsdk"
17325  elif test "x$DXSDK_DIR" != x; then
17326    dxsdk_path="$DXSDK_DIR"
17327  elif test -d "C:/DXSDK"; then
17328    dxsdk_path="C:/DXSDK"
17329  else
17330    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17331  fi
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17333$as_echo "$dxsdk_path" >&6; }
17334
17335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17336
17337  # Input might be given as Windows format, start by converting to
17338  # unix format.
17339  path="$dxsdk_path"
17340  new_path=`$CYGPATH -u "$path"`
17341
17342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17345  # "foo.exe" is OK but "foo" is an error.
17346  #
17347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17348  # It is also a way to make sure we got the proper file name for the real test later on.
17349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17350  if test "x$test_shortpath" = x; then
17351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17352$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17353    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17354  fi
17355
17356  # Call helper function which possibly converts this using DOS-style short mode.
17357  # If so, the updated path is stored in $new_path.
17358
17359  input_path="$new_path"
17360  # Check if we need to convert this using DOS-style short mode. If the path
17361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17362  # take no chances and rewrite it.
17363  # Note: m4 eats our [], so we need to use [ and ] instead.
17364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17365  if test "x$has_forbidden_chars" != x; then
17366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17370      # Going to short mode and back again did indeed matter. Since short mode is
17371      # case insensitive, let's make it lowercase to improve readability.
17372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17373      # Now convert it back to Unix-stile (cygpath)
17374      input_path=`$CYGPATH -u "$shortmode_path"`
17375      new_path="$input_path"
17376    fi
17377  fi
17378
17379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17380  if test "x$test_cygdrive_prefix" = x; then
17381    # As a simple fix, exclude /usr/bin since it's not a real path.
17382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17384      # a path prefixed by /cygdrive for fixpath to work.
17385      new_path="$CYGWIN_ROOT_PATH$input_path"
17386    fi
17387  fi
17388
17389
17390  if test "x$path" != "x$new_path"; then
17391    dxsdk_path="$new_path"
17392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17393$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17394  fi
17395
17396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17397
17398  path="$dxsdk_path"
17399  has_colon=`$ECHO $path | $GREP ^.:`
17400  new_path="$path"
17401  if test "x$has_colon" = x; then
17402    # Not in mixed or Windows style, start by that.
17403    new_path=`cmd //c echo $path`
17404  fi
17405
17406
17407  input_path="$new_path"
17408  # Check if we need to convert this using DOS-style short mode. If the path
17409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17410  # take no chances and rewrite it.
17411  # Note: m4 eats our [], so we need to use [ and ] instead.
17412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17413  if test "x$has_forbidden_chars" != x; then
17414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17416  fi
17417
17418
17419  windows_path="$new_path"
17420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17421    unix_path=`$CYGPATH -u "$windows_path"`
17422    new_path="$unix_path"
17423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17425    new_path="$unix_path"
17426  fi
17427
17428  if test "x$path" != "x$new_path"; then
17429    dxsdk_path="$new_path"
17430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17431$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17432  fi
17433
17434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17436
17437  else
17438    # We're on a posix platform. Hooray! :)
17439    path="$dxsdk_path"
17440    has_space=`$ECHO "$path" | $GREP " "`
17441    if test "x$has_space" != x; then
17442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17443$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17444      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17445    fi
17446
17447    # Use eval to expand a potential ~
17448    eval path="$path"
17449    if test ! -f "$path" && test ! -d "$path"; then
17450      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17451    fi
17452
17453    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17454  fi
17455
17456
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17458$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17459  if test "x$with_dxsdk_lib" != x; then
17460    DXSDK_LIB_PATH="$with_dxsdk_lib"
17461  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17462    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17463  else
17464    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17465  fi
17466  # dsound.lib is linked to in jsoundds
17467  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17468    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17469  fi
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17471$as_echo "$DXSDK_LIB_PATH" >&6; }
17472
17473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17474
17475  # Input might be given as Windows format, start by converting to
17476  # unix format.
17477  path="$DXSDK_LIB_PATH"
17478  new_path=`$CYGPATH -u "$path"`
17479
17480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17483  # "foo.exe" is OK but "foo" is an error.
17484  #
17485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17486  # It is also a way to make sure we got the proper file name for the real test later on.
17487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17488  if test "x$test_shortpath" = x; then
17489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17490$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17491    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17492  fi
17493
17494  # Call helper function which possibly converts this using DOS-style short mode.
17495  # If so, the updated path is stored in $new_path.
17496
17497  input_path="$new_path"
17498  # Check if we need to convert this using DOS-style short mode. If the path
17499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17500  # take no chances and rewrite it.
17501  # Note: m4 eats our [], so we need to use [ and ] instead.
17502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17503  if test "x$has_forbidden_chars" != x; then
17504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17508      # Going to short mode and back again did indeed matter. Since short mode is
17509      # case insensitive, let's make it lowercase to improve readability.
17510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17511      # Now convert it back to Unix-stile (cygpath)
17512      input_path=`$CYGPATH -u "$shortmode_path"`
17513      new_path="$input_path"
17514    fi
17515  fi
17516
17517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17518  if test "x$test_cygdrive_prefix" = x; then
17519    # As a simple fix, exclude /usr/bin since it's not a real path.
17520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17522      # a path prefixed by /cygdrive for fixpath to work.
17523      new_path="$CYGWIN_ROOT_PATH$input_path"
17524    fi
17525  fi
17526
17527
17528  if test "x$path" != "x$new_path"; then
17529    DXSDK_LIB_PATH="$new_path"
17530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17531$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17532  fi
17533
17534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17535
17536  path="$DXSDK_LIB_PATH"
17537  has_colon=`$ECHO $path | $GREP ^.:`
17538  new_path="$path"
17539  if test "x$has_colon" = x; then
17540    # Not in mixed or Windows style, start by that.
17541    new_path=`cmd //c echo $path`
17542  fi
17543
17544
17545  input_path="$new_path"
17546  # Check if we need to convert this using DOS-style short mode. If the path
17547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17548  # take no chances and rewrite it.
17549  # Note: m4 eats our [], so we need to use [ and ] instead.
17550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17551  if test "x$has_forbidden_chars" != x; then
17552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17554  fi
17555
17556
17557  windows_path="$new_path"
17558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17559    unix_path=`$CYGPATH -u "$windows_path"`
17560    new_path="$unix_path"
17561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17563    new_path="$unix_path"
17564  fi
17565
17566  if test "x$path" != "x$new_path"; then
17567    DXSDK_LIB_PATH="$new_path"
17568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17569$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17570  fi
17571
17572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17574
17575  else
17576    # We're on a posix platform. Hooray! :)
17577    path="$DXSDK_LIB_PATH"
17578    has_space=`$ECHO "$path" | $GREP " "`
17579    if test "x$has_space" != x; then
17580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17581$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17583    fi
17584
17585    # Use eval to expand a potential ~
17586    eval path="$path"
17587    if test ! -f "$path" && test ! -d "$path"; then
17588      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17589    fi
17590
17591    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17592  fi
17593
17594
17595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17596$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17597  if test "x$with_dxsdk_include" != x; then
17598    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17599  else
17600    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17601  fi
17602  # dsound.h is included in jsoundds
17603  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17604    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17605  fi
17606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17607$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17608
17609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17610
17611  # Input might be given as Windows format, start by converting to
17612  # unix format.
17613  path="$DXSDK_INCLUDE_PATH"
17614  new_path=`$CYGPATH -u "$path"`
17615
17616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17619  # "foo.exe" is OK but "foo" is an error.
17620  #
17621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17622  # It is also a way to make sure we got the proper file name for the real test later on.
17623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17624  if test "x$test_shortpath" = x; then
17625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17626$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17627    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17628  fi
17629
17630  # Call helper function which possibly converts this using DOS-style short mode.
17631  # If so, the updated path is stored in $new_path.
17632
17633  input_path="$new_path"
17634  # Check if we need to convert this using DOS-style short mode. If the path
17635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17636  # take no chances and rewrite it.
17637  # Note: m4 eats our [], so we need to use [ and ] instead.
17638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17639  if test "x$has_forbidden_chars" != x; then
17640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17644      # Going to short mode and back again did indeed matter. Since short mode is
17645      # case insensitive, let's make it lowercase to improve readability.
17646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17647      # Now convert it back to Unix-stile (cygpath)
17648      input_path=`$CYGPATH -u "$shortmode_path"`
17649      new_path="$input_path"
17650    fi
17651  fi
17652
17653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17654  if test "x$test_cygdrive_prefix" = x; then
17655    # As a simple fix, exclude /usr/bin since it's not a real path.
17656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17658      # a path prefixed by /cygdrive for fixpath to work.
17659      new_path="$CYGWIN_ROOT_PATH$input_path"
17660    fi
17661  fi
17662
17663
17664  if test "x$path" != "x$new_path"; then
17665    DXSDK_INCLUDE_PATH="$new_path"
17666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17667$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17668  fi
17669
17670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17671
17672  path="$DXSDK_INCLUDE_PATH"
17673  has_colon=`$ECHO $path | $GREP ^.:`
17674  new_path="$path"
17675  if test "x$has_colon" = x; then
17676    # Not in mixed or Windows style, start by that.
17677    new_path=`cmd //c echo $path`
17678  fi
17679
17680
17681  input_path="$new_path"
17682  # Check if we need to convert this using DOS-style short mode. If the path
17683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17684  # take no chances and rewrite it.
17685  # Note: m4 eats our [], so we need to use [ and ] instead.
17686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17687  if test "x$has_forbidden_chars" != x; then
17688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17690  fi
17691
17692
17693  windows_path="$new_path"
17694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17695    unix_path=`$CYGPATH -u "$windows_path"`
17696    new_path="$unix_path"
17697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17699    new_path="$unix_path"
17700  fi
17701
17702  if test "x$path" != "x$new_path"; then
17703    DXSDK_INCLUDE_PATH="$new_path"
17704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17705$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17706  fi
17707
17708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17710
17711  else
17712    # We're on a posix platform. Hooray! :)
17713    path="$DXSDK_INCLUDE_PATH"
17714    has_space=`$ECHO "$path" | $GREP " "`
17715    if test "x$has_space" != x; then
17716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17717$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17718      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17719    fi
17720
17721    # Use eval to expand a potential ~
17722    eval path="$path"
17723    if test ! -f "$path" && test ! -d "$path"; then
17724      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17725    fi
17726
17727    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17728  fi
17729
17730
17731
17732
17733  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17734
17735fi
17736
17737
17738
17739# If --build AND --host is set, then the configure script will find any
17740# cross compilation tools in the PATH. Cross compilation tools
17741# follows the cross compilation standard where they are prefixed with ${host}.
17742# For example the binary i686-sun-solaris2.10-gcc
17743# will cross compile for i686-sun-solaris2.10
17744# If neither of build and host is not set, then build=host and the
17745# default compiler found in the path will be used.
17746# Setting only --host, does not seem to be really supported.
17747# Please set both --build and --host if you want to cross compile.
17748
17749if test "x$COMPILE_TYPE" = "xcross"; then
17750    # Now we to find a C/C++ compiler that can build executables for the build
17751    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17752    # once. Also, we need to do this before adding a tools dir to the path,
17753    # otherwise we might pick up cross-compilers which don't use standard naming.
17754    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17755    # to wait until they are properly discovered.
17756    for ac_prog in cl cc gcc
17757do
17758  # Extract the first word of "$ac_prog", so it can be a program name with args.
17759set dummy $ac_prog; ac_word=$2
17760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17761$as_echo_n "checking for $ac_word... " >&6; }
17762if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17763  $as_echo_n "(cached) " >&6
17764else
17765  case $BUILD_CC in
17766  [\\/]* | ?:[\\/]*)
17767  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17768  ;;
17769  *)
17770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17771for as_dir in $PATH
17772do
17773  IFS=$as_save_IFS
17774  test -z "$as_dir" && as_dir=.
17775    for ac_exec_ext in '' $ac_executable_extensions; do
17776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17777    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17779    break 2
17780  fi
17781done
17782  done
17783IFS=$as_save_IFS
17784
17785  ;;
17786esac
17787fi
17788BUILD_CC=$ac_cv_path_BUILD_CC
17789if test -n "$BUILD_CC"; then
17790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17791$as_echo "$BUILD_CC" >&6; }
17792else
17793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17794$as_echo "no" >&6; }
17795fi
17796
17797
17798  test -n "$BUILD_CC" && break
17799done
17800
17801
17802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17803
17804  # First separate the path from the arguments. This will split at the first
17805  # space.
17806  complete="$BUILD_CC"
17807  path="${complete%% *}"
17808  tmp="$complete EOL"
17809  arguments="${tmp#* }"
17810
17811  # Input might be given as Windows format, start by converting to
17812  # unix format.
17813  new_path=`$CYGPATH -u "$path"`
17814
17815  # Now try to locate executable using which
17816  new_path=`$WHICH "$new_path" 2> /dev/null`
17817  # bat and cmd files are not always considered executable in cygwin causing which
17818  # to not find them
17819  if test "x$new_path" = x \
17820           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17821           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17822    new_path=`$CYGPATH -u "$path"`
17823  fi
17824  if test "x$new_path" = x; then
17825    # Oops. Which didn't find the executable.
17826    # The splitting of arguments from the executable at a space might have been incorrect,
17827    # since paths with space are more likely in Windows. Give it another try with the whole
17828    # argument.
17829    path="$complete"
17830    arguments="EOL"
17831    new_path=`$CYGPATH -u "$path"`
17832    new_path=`$WHICH "$new_path" 2> /dev/null`
17833    # bat and cmd files are not always considered executable in cygwin causing which
17834    # to not find them
17835    if test "x$new_path" = x \
17836             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17837             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17838      new_path=`$CYGPATH -u "$path"`
17839    fi
17840    if test "x$new_path" = x; then
17841      # It's still not found. Now this is an unrecoverable error.
17842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17843$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17844      has_space=`$ECHO "$complete" | $GREP " "`
17845      if test "x$has_space" != x; then
17846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17848      fi
17849      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17850    fi
17851  fi
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    # Short path failed, file does not exist as specified.
17863    # Try adding .exe or .cmd
17864    if test -f "${new_path}.exe"; then
17865       input_to_shortpath="${new_path}.exe"
17866    elif test -f "${new_path}.cmd"; then
17867       input_to_shortpath="${new_path}.cmd"
17868    else
17869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17870$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17873      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17874    fi
17875  else
17876    input_to_shortpath="$new_path"
17877  fi
17878
17879  # Call helper function which possibly converts this using DOS-style short mode.
17880  # If so, the updated path is stored in $new_path.
17881  new_path="$input_to_shortpath"
17882
17883  input_path="$input_to_shortpath"
17884  # Check if we need to convert this using DOS-style short mode. If the path
17885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17886  # take no chances and rewrite it.
17887  # Note: m4 eats our [], so we need to use [ and ] instead.
17888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17889  if test "x$has_forbidden_chars" != x; then
17890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17894      # Going to short mode and back again did indeed matter. Since short mode is
17895      # case insensitive, let's make it lowercase to improve readability.
17896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17897      # Now convert it back to Unix-stile (cygpath)
17898      input_path=`$CYGPATH -u "$shortmode_path"`
17899      new_path="$input_path"
17900    fi
17901  fi
17902
17903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17904  if test "x$test_cygdrive_prefix" = x; then
17905    # As a simple fix, exclude /usr/bin since it's not a real path.
17906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17908      # a path prefixed by /cygdrive for fixpath to work.
17909      new_path="$CYGWIN_ROOT_PATH$input_path"
17910    fi
17911  fi
17912
17913  # remove trailing .exe if any
17914  new_path="${new_path/%.exe/}"
17915
17916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17917
17918  # First separate the path from the arguments. This will split at the first
17919  # space.
17920  complete="$BUILD_CC"
17921  path="${complete%% *}"
17922  tmp="$complete EOL"
17923  arguments="${tmp#* }"
17924
17925  # Input might be given as Windows format, start by converting to
17926  # unix format.
17927  new_path="$path"
17928
17929  windows_path="$new_path"
17930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17931    unix_path=`$CYGPATH -u "$windows_path"`
17932    new_path="$unix_path"
17933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17935    new_path="$unix_path"
17936  fi
17937
17938
17939  # Now try to locate executable using which
17940  new_path=`$WHICH "$new_path" 2> /dev/null`
17941
17942  if test "x$new_path" = x; then
17943    # Oops. Which didn't find the executable.
17944    # The splitting of arguments from the executable at a space might have been incorrect,
17945    # since paths with space are more likely in Windows. Give it another try with the whole
17946    # argument.
17947    path="$complete"
17948    arguments="EOL"
17949    new_path="$path"
17950
17951  windows_path="$new_path"
17952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17953    unix_path=`$CYGPATH -u "$windows_path"`
17954    new_path="$unix_path"
17955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17957    new_path="$unix_path"
17958  fi
17959
17960
17961    new_path=`$WHICH "$new_path" 2> /dev/null`
17962
17963    if test "x$new_path" = x; then
17964      # It's still not found. Now this is an unrecoverable error.
17965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17966$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17967      has_space=`$ECHO "$complete" | $GREP " "`
17968      if test "x$has_space" != x; then
17969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17971      fi
17972      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17973    fi
17974  fi
17975
17976  # Now new_path has a complete unix path to the binary
17977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17978    # Keep paths in /bin as-is, but remove trailing .exe if any
17979    new_path="${new_path/%.exe/}"
17980    # Do not save /bin paths to all_fixpath_prefixes!
17981  else
17982    # Not in mixed or Windows style, start by that.
17983    new_path=`cmd //c echo $new_path`
17984
17985  input_path="$new_path"
17986  # Check if we need to convert this using DOS-style short mode. If the path
17987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17988  # take no chances and rewrite it.
17989  # Note: m4 eats our [], so we need to use [ and ] instead.
17990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17991  if test "x$has_forbidden_chars" != x; then
17992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17994  fi
17995
17996    # Output is in $new_path
17997
17998  windows_path="$new_path"
17999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18000    unix_path=`$CYGPATH -u "$windows_path"`
18001    new_path="$unix_path"
18002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18004    new_path="$unix_path"
18005  fi
18006
18007    # remove trailing .exe if any
18008    new_path="${new_path/%.exe/}"
18009
18010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18012  fi
18013
18014  else
18015    # We're on a posix platform. Hooray! :)
18016    # First separate the path from the arguments. This will split at the first
18017    # space.
18018    complete="$BUILD_CC"
18019    path="${complete%% *}"
18020    tmp="$complete EOL"
18021    arguments="${tmp#* }"
18022
18023    # Cannot rely on the command "which" here since it doesn't always work.
18024    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18025    if test -z "$is_absolute_path"; then
18026      # Path to executable is not absolute. Find it.
18027      IFS_save="$IFS"
18028      IFS=:
18029      for p in $PATH; do
18030        if test -f "$p/$path" && test -x "$p/$path"; then
18031          new_path="$p/$path"
18032          break
18033        fi
18034      done
18035      IFS="$IFS_save"
18036    else
18037      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18038$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18039      new_path="$path"
18040    fi
18041
18042    if test "x$new_path" = x; then
18043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18044$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18045        has_space=`$ECHO "$complete" | $GREP " "`
18046        if test "x$has_space" != x; then
18047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18049        fi
18050        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18051      fi
18052  fi
18053
18054      # Now join together the path and the arguments once again
18055      if test "x$arguments" != xEOL; then
18056        new_complete="$new_path ${arguments% *}"
18057      else
18058        new_complete="$new_path"
18059      fi
18060
18061  if test "x$complete" != "x$new_complete"; then
18062      BUILD_CC="$new_complete"
18063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18064$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18065    fi
18066
18067    for ac_prog in cl CC g++
18068do
18069  # Extract the first word of "$ac_prog", so it can be a program name with args.
18070set dummy $ac_prog; ac_word=$2
18071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072$as_echo_n "checking for $ac_word... " >&6; }
18073if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18074  $as_echo_n "(cached) " >&6
18075else
18076  case $BUILD_CXX in
18077  [\\/]* | ?:[\\/]*)
18078  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18079  ;;
18080  *)
18081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082for as_dir in $PATH
18083do
18084  IFS=$as_save_IFS
18085  test -z "$as_dir" && as_dir=.
18086    for ac_exec_ext in '' $ac_executable_extensions; do
18087  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18088    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090    break 2
18091  fi
18092done
18093  done
18094IFS=$as_save_IFS
18095
18096  ;;
18097esac
18098fi
18099BUILD_CXX=$ac_cv_path_BUILD_CXX
18100if test -n "$BUILD_CXX"; then
18101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18102$as_echo "$BUILD_CXX" >&6; }
18103else
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105$as_echo "no" >&6; }
18106fi
18107
18108
18109  test -n "$BUILD_CXX" && break
18110done
18111
18112
18113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18114
18115  # First separate the path from the arguments. This will split at the first
18116  # space.
18117  complete="$BUILD_CXX"
18118  path="${complete%% *}"
18119  tmp="$complete EOL"
18120  arguments="${tmp#* }"
18121
18122  # Input might be given as Windows format, start by converting to
18123  # unix format.
18124  new_path=`$CYGPATH -u "$path"`
18125
18126  # Now try to locate executable using which
18127  new_path=`$WHICH "$new_path" 2> /dev/null`
18128  # bat and cmd files are not always considered executable in cygwin causing which
18129  # to not find them
18130  if test "x$new_path" = x \
18131           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18132           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18133    new_path=`$CYGPATH -u "$path"`
18134  fi
18135  if test "x$new_path" = x; then
18136    # Oops. Which didn't find the executable.
18137    # The splitting of arguments from the executable at a space might have been incorrect,
18138    # since paths with space are more likely in Windows. Give it another try with the whole
18139    # argument.
18140    path="$complete"
18141    arguments="EOL"
18142    new_path=`$CYGPATH -u "$path"`
18143    new_path=`$WHICH "$new_path" 2> /dev/null`
18144    # bat and cmd files are not always considered executable in cygwin causing which
18145    # to not find them
18146    if test "x$new_path" = x \
18147             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18148             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18149      new_path=`$CYGPATH -u "$path"`
18150    fi
18151    if test "x$new_path" = x; then
18152      # It's still not found. Now this is an unrecoverable error.
18153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18154$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18155      has_space=`$ECHO "$complete" | $GREP " "`
18156      if test "x$has_space" != x; then
18157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18159      fi
18160      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18161    fi
18162  fi
18163
18164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18167  # "foo.exe" is OK but "foo" is an error.
18168  #
18169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18170  # It is also a way to make sure we got the proper file name for the real test later on.
18171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18172  if test "x$test_shortpath" = x; then
18173    # Short path failed, file does not exist as specified.
18174    # Try adding .exe or .cmd
18175    if test -f "${new_path}.exe"; then
18176       input_to_shortpath="${new_path}.exe"
18177    elif test -f "${new_path}.cmd"; then
18178       input_to_shortpath="${new_path}.cmd"
18179    else
18180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18181$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18182      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18183$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18184      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18185    fi
18186  else
18187    input_to_shortpath="$new_path"
18188  fi
18189
18190  # Call helper function which possibly converts this using DOS-style short mode.
18191  # If so, the updated path is stored in $new_path.
18192  new_path="$input_to_shortpath"
18193
18194  input_path="$input_to_shortpath"
18195  # Check if we need to convert this using DOS-style short mode. If the path
18196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18197  # take no chances and rewrite it.
18198  # Note: m4 eats our [], so we need to use [ and ] instead.
18199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18200  if test "x$has_forbidden_chars" != x; then
18201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18205      # Going to short mode and back again did indeed matter. Since short mode is
18206      # case insensitive, let's make it lowercase to improve readability.
18207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18208      # Now convert it back to Unix-stile (cygpath)
18209      input_path=`$CYGPATH -u "$shortmode_path"`
18210      new_path="$input_path"
18211    fi
18212  fi
18213
18214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18215  if test "x$test_cygdrive_prefix" = x; then
18216    # As a simple fix, exclude /usr/bin since it's not a real path.
18217    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18219      # a path prefixed by /cygdrive for fixpath to work.
18220      new_path="$CYGWIN_ROOT_PATH$input_path"
18221    fi
18222  fi
18223
18224  # remove trailing .exe if any
18225  new_path="${new_path/%.exe/}"
18226
18227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228
18229  # First separate the path from the arguments. This will split at the first
18230  # space.
18231  complete="$BUILD_CXX"
18232  path="${complete%% *}"
18233  tmp="$complete EOL"
18234  arguments="${tmp#* }"
18235
18236  # Input might be given as Windows format, start by converting to
18237  # unix format.
18238  new_path="$path"
18239
18240  windows_path="$new_path"
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242    unix_path=`$CYGPATH -u "$windows_path"`
18243    new_path="$unix_path"
18244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18246    new_path="$unix_path"
18247  fi
18248
18249
18250  # Now try to locate executable using which
18251  new_path=`$WHICH "$new_path" 2> /dev/null`
18252
18253  if test "x$new_path" = x; then
18254    # Oops. Which didn't find the executable.
18255    # The splitting of arguments from the executable at a space might have been incorrect,
18256    # since paths with space are more likely in Windows. Give it another try with the whole
18257    # argument.
18258    path="$complete"
18259    arguments="EOL"
18260    new_path="$path"
18261
18262  windows_path="$new_path"
18263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18264    unix_path=`$CYGPATH -u "$windows_path"`
18265    new_path="$unix_path"
18266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18268    new_path="$unix_path"
18269  fi
18270
18271
18272    new_path=`$WHICH "$new_path" 2> /dev/null`
18273
18274    if test "x$new_path" = x; then
18275      # It's still not found. Now this is an unrecoverable error.
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18277$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18278      has_space=`$ECHO "$complete" | $GREP " "`
18279      if test "x$has_space" != x; then
18280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18282      fi
18283      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18284    fi
18285  fi
18286
18287  # Now new_path has a complete unix path to the binary
18288  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18289    # Keep paths in /bin as-is, but remove trailing .exe if any
18290    new_path="${new_path/%.exe/}"
18291    # Do not save /bin paths to all_fixpath_prefixes!
18292  else
18293    # Not in mixed or Windows style, start by that.
18294    new_path=`cmd //c echo $new_path`
18295
18296  input_path="$new_path"
18297  # Check if we need to convert this using DOS-style short mode. If the path
18298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18299  # take no chances and rewrite it.
18300  # Note: m4 eats our [], so we need to use [ and ] instead.
18301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18302  if test "x$has_forbidden_chars" != x; then
18303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18305  fi
18306
18307    # Output is in $new_path
18308
18309  windows_path="$new_path"
18310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18311    unix_path=`$CYGPATH -u "$windows_path"`
18312    new_path="$unix_path"
18313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18315    new_path="$unix_path"
18316  fi
18317
18318    # remove trailing .exe if any
18319    new_path="${new_path/%.exe/}"
18320
18321    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18322    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18323  fi
18324
18325  else
18326    # We're on a posix platform. Hooray! :)
18327    # First separate the path from the arguments. This will split at the first
18328    # space.
18329    complete="$BUILD_CXX"
18330    path="${complete%% *}"
18331    tmp="$complete EOL"
18332    arguments="${tmp#* }"
18333
18334    # Cannot rely on the command "which" here since it doesn't always work.
18335    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18336    if test -z "$is_absolute_path"; then
18337      # Path to executable is not absolute. Find it.
18338      IFS_save="$IFS"
18339      IFS=:
18340      for p in $PATH; do
18341        if test -f "$p/$path" && test -x "$p/$path"; then
18342          new_path="$p/$path"
18343          break
18344        fi
18345      done
18346      IFS="$IFS_save"
18347    else
18348      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18349$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18350      new_path="$path"
18351    fi
18352
18353    if test "x$new_path" = x; then
18354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18355$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18356        has_space=`$ECHO "$complete" | $GREP " "`
18357        if test "x$has_space" != x; then
18358          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18359$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18360        fi
18361        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18362      fi
18363  fi
18364
18365      # Now join together the path and the arguments once again
18366      if test "x$arguments" != xEOL; then
18367        new_complete="$new_path ${arguments% *}"
18368      else
18369        new_complete="$new_path"
18370      fi
18371
18372  if test "x$complete" != "x$new_complete"; then
18373      BUILD_CXX="$new_complete"
18374      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18375$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18376    fi
18377
18378    # Extract the first word of "ld", so it can be a program name with args.
18379set dummy ld; ac_word=$2
18380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18381$as_echo_n "checking for $ac_word... " >&6; }
18382if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18383  $as_echo_n "(cached) " >&6
18384else
18385  case $BUILD_LD in
18386  [\\/]* | ?:[\\/]*)
18387  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18388  ;;
18389  *)
18390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18391for as_dir in $PATH
18392do
18393  IFS=$as_save_IFS
18394  test -z "$as_dir" && as_dir=.
18395    for ac_exec_ext in '' $ac_executable_extensions; do
18396  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18397    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18399    break 2
18400  fi
18401done
18402  done
18403IFS=$as_save_IFS
18404
18405  ;;
18406esac
18407fi
18408BUILD_LD=$ac_cv_path_BUILD_LD
18409if test -n "$BUILD_LD"; then
18410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18411$as_echo "$BUILD_LD" >&6; }
18412else
18413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18414$as_echo "no" >&6; }
18415fi
18416
18417
18418
18419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18420
18421  # First separate the path from the arguments. This will split at the first
18422  # space.
18423  complete="$BUILD_LD"
18424  path="${complete%% *}"
18425  tmp="$complete EOL"
18426  arguments="${tmp#* }"
18427
18428  # Input might be given as Windows format, start by converting to
18429  # unix format.
18430  new_path=`$CYGPATH -u "$path"`
18431
18432  # Now try to locate executable using which
18433  new_path=`$WHICH "$new_path" 2> /dev/null`
18434  # bat and cmd files are not always considered executable in cygwin causing which
18435  # to not find them
18436  if test "x$new_path" = x \
18437           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18438           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18439    new_path=`$CYGPATH -u "$path"`
18440  fi
18441  if test "x$new_path" = x; then
18442    # Oops. Which didn't find the executable.
18443    # The splitting of arguments from the executable at a space might have been incorrect,
18444    # since paths with space are more likely in Windows. Give it another try with the whole
18445    # argument.
18446    path="$complete"
18447    arguments="EOL"
18448    new_path=`$CYGPATH -u "$path"`
18449    new_path=`$WHICH "$new_path" 2> /dev/null`
18450    # bat and cmd files are not always considered executable in cygwin causing which
18451    # to not find them
18452    if test "x$new_path" = x \
18453             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18454             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18455      new_path=`$CYGPATH -u "$path"`
18456    fi
18457    if test "x$new_path" = x; then
18458      # It's still not found. Now this is an unrecoverable error.
18459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18460$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18461      has_space=`$ECHO "$complete" | $GREP " "`
18462      if test "x$has_space" != x; then
18463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18465      fi
18466      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18467    fi
18468  fi
18469
18470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18473  # "foo.exe" is OK but "foo" is an error.
18474  #
18475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18476  # It is also a way to make sure we got the proper file name for the real test later on.
18477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18478  if test "x$test_shortpath" = x; then
18479    # Short path failed, file does not exist as specified.
18480    # Try adding .exe or .cmd
18481    if test -f "${new_path}.exe"; then
18482       input_to_shortpath="${new_path}.exe"
18483    elif test -f "${new_path}.cmd"; then
18484       input_to_shortpath="${new_path}.cmd"
18485    else
18486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18487$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18490      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18491    fi
18492  else
18493    input_to_shortpath="$new_path"
18494  fi
18495
18496  # Call helper function which possibly converts this using DOS-style short mode.
18497  # If so, the updated path is stored in $new_path.
18498  new_path="$input_to_shortpath"
18499
18500  input_path="$input_to_shortpath"
18501  # Check if we need to convert this using DOS-style short mode. If the path
18502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18503  # take no chances and rewrite it.
18504  # Note: m4 eats our [], so we need to use [ and ] instead.
18505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18506  if test "x$has_forbidden_chars" != x; then
18507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18511      # Going to short mode and back again did indeed matter. Since short mode is
18512      # case insensitive, let's make it lowercase to improve readability.
18513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18514      # Now convert it back to Unix-stile (cygpath)
18515      input_path=`$CYGPATH -u "$shortmode_path"`
18516      new_path="$input_path"
18517    fi
18518  fi
18519
18520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18521  if test "x$test_cygdrive_prefix" = x; then
18522    # As a simple fix, exclude /usr/bin since it's not a real path.
18523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18525      # a path prefixed by /cygdrive for fixpath to work.
18526      new_path="$CYGWIN_ROOT_PATH$input_path"
18527    fi
18528  fi
18529
18530  # remove trailing .exe if any
18531  new_path="${new_path/%.exe/}"
18532
18533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18534
18535  # First separate the path from the arguments. This will split at the first
18536  # space.
18537  complete="$BUILD_LD"
18538  path="${complete%% *}"
18539  tmp="$complete EOL"
18540  arguments="${tmp#* }"
18541
18542  # Input might be given as Windows format, start by converting to
18543  # unix format.
18544  new_path="$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
18556  # Now try to locate executable using which
18557  new_path=`$WHICH "$new_path" 2> /dev/null`
18558
18559  if test "x$new_path" = x; then
18560    # Oops. Which didn't find the executable.
18561    # The splitting of arguments from the executable at a space might have been incorrect,
18562    # since paths with space are more likely in Windows. Give it another try with the whole
18563    # argument.
18564    path="$complete"
18565    arguments="EOL"
18566    new_path="$path"
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577
18578    new_path=`$WHICH "$new_path" 2> /dev/null`
18579
18580    if test "x$new_path" = x; then
18581      # It's still not found. Now this is an unrecoverable error.
18582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18583$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18584      has_space=`$ECHO "$complete" | $GREP " "`
18585      if test "x$has_space" != x; then
18586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18588      fi
18589      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18590    fi
18591  fi
18592
18593  # Now new_path has a complete unix path to the binary
18594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18595    # Keep paths in /bin as-is, but remove trailing .exe if any
18596    new_path="${new_path/%.exe/}"
18597    # Do not save /bin paths to all_fixpath_prefixes!
18598  else
18599    # Not in mixed or Windows style, start by that.
18600    new_path=`cmd //c echo $new_path`
18601
18602  input_path="$new_path"
18603  # Check if we need to convert this using DOS-style short mode. If the path
18604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18605  # take no chances and rewrite it.
18606  # Note: m4 eats our [], so we need to use [ and ] instead.
18607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18608  if test "x$has_forbidden_chars" != x; then
18609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18611  fi
18612
18613    # Output is in $new_path
18614
18615  windows_path="$new_path"
18616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18617    unix_path=`$CYGPATH -u "$windows_path"`
18618    new_path="$unix_path"
18619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18621    new_path="$unix_path"
18622  fi
18623
18624    # remove trailing .exe if any
18625    new_path="${new_path/%.exe/}"
18626
18627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18629  fi
18630
18631  else
18632    # We're on a posix platform. Hooray! :)
18633    # First separate the path from the arguments. This will split at the first
18634    # space.
18635    complete="$BUILD_LD"
18636    path="${complete%% *}"
18637    tmp="$complete EOL"
18638    arguments="${tmp#* }"
18639
18640    # Cannot rely on the command "which" here since it doesn't always work.
18641    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18642    if test -z "$is_absolute_path"; then
18643      # Path to executable is not absolute. Find it.
18644      IFS_save="$IFS"
18645      IFS=:
18646      for p in $PATH; do
18647        if test -f "$p/$path" && test -x "$p/$path"; then
18648          new_path="$p/$path"
18649          break
18650        fi
18651      done
18652      IFS="$IFS_save"
18653    else
18654      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18655$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18656      new_path="$path"
18657    fi
18658
18659    if test "x$new_path" = x; then
18660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18661$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18662        has_space=`$ECHO "$complete" | $GREP " "`
18663        if test "x$has_space" != x; then
18664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18666        fi
18667        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18668      fi
18669  fi
18670
18671      # Now join together the path and the arguments once again
18672      if test "x$arguments" != xEOL; then
18673        new_complete="$new_path ${arguments% *}"
18674      else
18675        new_complete="$new_path"
18676      fi
18677
18678  if test "x$complete" != "x$new_complete"; then
18679      BUILD_LD="$new_complete"
18680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18681$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18682    fi
18683
18684fi
18685
18686
18687
18688
18689# If a devkit is found on the builddeps server, then prepend its path to the
18690# PATH variable. If there are cross compilers available in the devkit, these
18691# will be found by AC_PROG_CC et al.
18692DEVKIT=
18693
18694
18695    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18696        # Source the builddeps file again, to make sure it uses the latest variables!
18697        . $builddepsfile
18698        # Look for a target and build machine specific resource!
18699        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18700        if test "x$resource" = x; then
18701            # Ok, lets instead look for a target specific resource
18702            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18703        fi
18704        if test "x$resource" = x; then
18705            # Ok, lets instead look for a build specific resource
18706            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18707        fi
18708        if test "x$resource" = x; then
18709            # Ok, lets instead look for a generic resource
18710            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18711            resource=${builddep_devkit}
18712        fi
18713        if test "x$resource" != x; then
18714            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18715$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18716	    # If the resource in the builddeps.conf file is an existing directory,
18717	    # for example /java/linux/cups
18718	    if test -d ${resource}; then
18719	       depdir=${resource}
18720	    else
18721
18722# devkit is for example mymodule
18723# $resource is for example libs/general/libmymod_1_2_3.zip
18724# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18725# $with_builddeps_dir is for example /localhome/builddeps
18726# depdir is the name of the variable into which we store the depdir, eg MYMOD
18727# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18728# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18729    filename=`basename $resource`
18730    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18731    filebase=${filename%%.*}
18732    extension=${filename#*.}
18733    installdir=$with_builddeps_dir/$filebase
18734    if test ! -f $installdir/$filename.unpacked; then
18735        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18736$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18737        if test ! -d $installdir; then
18738            mkdir -p $installdir
18739        fi
18740        if test ! -d $installdir; then
18741            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18742        fi
18743        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18744        touch $tmpfile
18745        if test ! -f $tmpfile; then
18746            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18747        fi
18748
18749    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18750    # $tmpfile is the local file name for the downloaded file.
18751    VALID_TOOL=no
18752    if test "x$BDEPS_FTP" = xwget; then
18753       VALID_TOOL=yes
18754       wget -O $tmpfile $with_builddeps_server/$resource
18755    fi
18756    if test "x$BDEPS_FTP" = xlftp; then
18757       VALID_TOOL=yes
18758       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18759    fi
18760    if test "x$BDEPS_FTP" = xftp; then
18761        VALID_TOOL=yes
18762        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18763        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18764        FTPUSERPWD=${FTPSERVER%%@*}
18765        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18766            FTPUSER=${userpwd%%:*}
18767            FTPPWD=${userpwd#*@}
18768            FTPSERVER=${FTPSERVER#*@}
18769        else
18770            FTPUSER=ftp
18771            FTPPWD=ftp
18772        fi
18773        # the "pass" command does not work on some
18774        # ftp clients (read ftp.exe) but if it works,
18775        # passive mode is better!
18776        (\
18777            echo "user $FTPUSER $FTPPWD"        ;\
18778            echo "pass"                         ;\
18779            echo "bin"                          ;\
18780            echo "get $FTPPATH $tmpfile"              ;\
18781        ) | ftp -in $FTPSERVER
18782    fi
18783    if test "x$VALID_TOOL" != xyes; then
18784       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18785    fi
18786
18787        mv $tmpfile $installdir/$filename
18788        if test ! -s $installdir/$filename; then
18789            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18790        fi
18791        case "$extension" in
18792            zip)  echo "Unzipping $installdir/$filename..."
18793               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18794            ;;
18795            tar.gz) echo "Untaring $installdir/$filename..."
18796               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18797            ;;
18798            tgz) echo "Untaring $installdir/$filename..."
18799               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18800            ;;
18801            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18802            ;;
18803        esac
18804    fi
18805    if test -f $installdir/$filename.unpacked; then
18806        depdir=$installdir
18807    fi
18808
18809	    fi
18810            # Source the builddeps file again, because in the previous command, the depdir
18811            # was updated to point at the current build dependency install directory.
18812            . $builddepsfile
18813            # Now extract variables from the builddeps.conf files.
18814            theroot=${builddep_devkit_ROOT}
18815            thecflags=${builddep_devkit_CFLAGS}
18816            thelibs=${builddep_devkit_LIBS}
18817            if test "x$depdir" = x; then
18818                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18819            fi
18820            DEVKIT=$depdir
18821            if test "x$theroot" != x; then
18822               DEVKIT="$theroot"
18823            fi
18824            if test "x$thecflags" != x; then
18825               DEVKIT_CFLAGS="$thecflags"
18826            fi
18827            if test "x$thelibs" != x; then
18828               DEVKIT_LIBS="$thelibs"
18829            fi
18830            # Found devkit
18831                     PATH="$DEVKIT/bin:$PATH"
18832                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18833                     if test "x$x_includes" = "xNONE"; then
18834                         x_includes="$SYS_ROOT/usr/include/X11"
18835                     fi
18836                     if test "x$x_libraries" = "xNONE"; then
18837                         x_libraries="$SYS_ROOT/usr/lib"
18838                     fi
18839
18840
18841        fi
18842
18843    fi
18844
18845
18846if test "x$SYS_ROOT" != "x/" ; then
18847    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18848    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18849    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18850    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18851    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18852    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18853fi
18854
18855# Store the CFLAGS etal passed to the configure script.
18856ORG_CFLAGS="$CFLAGS"
18857ORG_CXXFLAGS="$CXXFLAGS"
18858ORG_OBJCFLAGS="$OBJCFLAGS"
18859
18860# autoconf magic only relies on PATH, so update it if tools dir is specified
18861OLD_PATH="$PATH"
18862if test "x$TOOLS_DIR" != x; then
18863  PATH=$TOOLS_DIR:$PATH
18864fi
18865
18866
18867### Locate C compiler (CC)
18868
18869# On windows, only cl.exe is supported.
18870# On Solaris, cc is preferred to gcc.
18871# Elsewhere, gcc is preferred to cc.
18872
18873if test "x$CC" != x; then
18874  COMPILER_CHECK_LIST="$CC"
18875elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18876  COMPILER_CHECK_LIST="cl"
18877elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18878  COMPILER_CHECK_LIST="cc gcc"
18879else
18880  COMPILER_CHECK_LIST="gcc cc"
18881fi
18882
18883
18884  COMPILER_NAME=C
18885
18886  CC=
18887  # If TOOLS_DIR is set, check for all compiler names in there first
18888  # before checking the rest of the PATH.
18889  if test -n "$TOOLS_DIR"; then
18890    PATH_save="$PATH"
18891    PATH="$TOOLS_DIR"
18892    for ac_prog in $COMPILER_CHECK_LIST
18893do
18894  # Extract the first word of "$ac_prog", so it can be a program name with args.
18895set dummy $ac_prog; ac_word=$2
18896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18897$as_echo_n "checking for $ac_word... " >&6; }
18898if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18899  $as_echo_n "(cached) " >&6
18900else
18901  case $TOOLS_DIR_CC in
18902  [\\/]* | ?:[\\/]*)
18903  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18904  ;;
18905  *)
18906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18907for as_dir in $PATH
18908do
18909  IFS=$as_save_IFS
18910  test -z "$as_dir" && as_dir=.
18911    for ac_exec_ext in '' $ac_executable_extensions; do
18912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18913    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18915    break 2
18916  fi
18917done
18918  done
18919IFS=$as_save_IFS
18920
18921  ;;
18922esac
18923fi
18924TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18925if test -n "$TOOLS_DIR_CC"; then
18926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18927$as_echo "$TOOLS_DIR_CC" >&6; }
18928else
18929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18930$as_echo "no" >&6; }
18931fi
18932
18933
18934  test -n "$TOOLS_DIR_CC" && break
18935done
18936
18937    CC=$TOOLS_DIR_CC
18938    PATH="$PATH_save"
18939  fi
18940
18941  # AC_PATH_PROGS can't be run multiple times with the same variable,
18942  # so create a new name for this run.
18943  if test "x$CC" = x; then
18944    for ac_prog in $COMPILER_CHECK_LIST
18945do
18946  # Extract the first word of "$ac_prog", so it can be a program name with args.
18947set dummy $ac_prog; ac_word=$2
18948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18949$as_echo_n "checking for $ac_word... " >&6; }
18950if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18951  $as_echo_n "(cached) " >&6
18952else
18953  case $POTENTIAL_CC in
18954  [\\/]* | ?:[\\/]*)
18955  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18956  ;;
18957  *)
18958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18959for as_dir in $PATH
18960do
18961  IFS=$as_save_IFS
18962  test -z "$as_dir" && as_dir=.
18963    for ac_exec_ext in '' $ac_executable_extensions; do
18964  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18965    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18967    break 2
18968  fi
18969done
18970  done
18971IFS=$as_save_IFS
18972
18973  ;;
18974esac
18975fi
18976POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18977if test -n "$POTENTIAL_CC"; then
18978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18979$as_echo "$POTENTIAL_CC" >&6; }
18980else
18981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18982$as_echo "no" >&6; }
18983fi
18984
18985
18986  test -n "$POTENTIAL_CC" && break
18987done
18988
18989    CC=$POTENTIAL_CC
18990  fi
18991
18992  if test "x$CC" = x; then
18993
18994    # Print a helpful message on how to acquire the necessary build dependency.
18995    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18996    MISSING_DEPENDENCY=devkit
18997    PKGHANDLER_COMMAND=
18998
18999    case $PKGHANDLER in
19000	apt-get)
19001                apt_help     $MISSING_DEPENDENCY ;;
19002    yum)
19003                yum_help     $MISSING_DEPENDENCY ;;
19004	port)
19005                port_help    $MISSING_DEPENDENCY ;;
19006	pkgutil)
19007                pkgutil_help $MISSING_DEPENDENCY ;;
19008	pkgadd)
19009                pkgadd_help  $MISSING_DEPENDENCY ;;
19010    * )
19011      break ;;
19012    esac
19013
19014    if test "x$PKGHANDLER_COMMAND" != x; then
19015        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19016    fi
19017
19018      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19019  fi
19020
19021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19022
19023  # First separate the path from the arguments. This will split at the first
19024  # space.
19025  complete="$CC"
19026  path="${complete%% *}"
19027  tmp="$complete EOL"
19028  arguments="${tmp#* }"
19029
19030  # Input might be given as Windows format, start by converting to
19031  # unix format.
19032  new_path=`$CYGPATH -u "$path"`
19033
19034  # Now try to locate executable using which
19035  new_path=`$WHICH "$new_path" 2> /dev/null`
19036  # bat and cmd files are not always considered executable in cygwin causing which
19037  # to not find them
19038  if test "x$new_path" = x \
19039           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19040           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19041    new_path=`$CYGPATH -u "$path"`
19042  fi
19043  if test "x$new_path" = x; then
19044    # Oops. Which didn't find the executable.
19045    # The splitting of arguments from the executable at a space might have been incorrect,
19046    # since paths with space are more likely in Windows. Give it another try with the whole
19047    # argument.
19048    path="$complete"
19049    arguments="EOL"
19050    new_path=`$CYGPATH -u "$path"`
19051    new_path=`$WHICH "$new_path" 2> /dev/null`
19052    # bat and cmd files are not always considered executable in cygwin causing which
19053    # to not find them
19054    if test "x$new_path" = x \
19055             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19056             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19057      new_path=`$CYGPATH -u "$path"`
19058    fi
19059    if test "x$new_path" = x; then
19060      # It's still not found. Now this is an unrecoverable error.
19061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19062$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19063      has_space=`$ECHO "$complete" | $GREP " "`
19064      if test "x$has_space" != x; then
19065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19067      fi
19068      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19069    fi
19070  fi
19071
19072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19075  # "foo.exe" is OK but "foo" is an error.
19076  #
19077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19078  # It is also a way to make sure we got the proper file name for the real test later on.
19079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19080  if test "x$test_shortpath" = x; then
19081    # Short path failed, file does not exist as specified.
19082    # Try adding .exe or .cmd
19083    if test -f "${new_path}.exe"; then
19084       input_to_shortpath="${new_path}.exe"
19085    elif test -f "${new_path}.cmd"; then
19086       input_to_shortpath="${new_path}.cmd"
19087    else
19088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19089$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19090      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19091$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19092      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19093    fi
19094  else
19095    input_to_shortpath="$new_path"
19096  fi
19097
19098  # Call helper function which possibly converts this using DOS-style short mode.
19099  # If so, the updated path is stored in $new_path.
19100  new_path="$input_to_shortpath"
19101
19102  input_path="$input_to_shortpath"
19103  # Check if we need to convert this using DOS-style short mode. If the path
19104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19105  # take no chances and rewrite it.
19106  # Note: m4 eats our [], so we need to use [ and ] instead.
19107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19108  if test "x$has_forbidden_chars" != x; then
19109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19113      # Going to short mode and back again did indeed matter. Since short mode is
19114      # case insensitive, let's make it lowercase to improve readability.
19115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19116      # Now convert it back to Unix-stile (cygpath)
19117      input_path=`$CYGPATH -u "$shortmode_path"`
19118      new_path="$input_path"
19119    fi
19120  fi
19121
19122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19123  if test "x$test_cygdrive_prefix" = x; then
19124    # As a simple fix, exclude /usr/bin since it's not a real path.
19125    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19127      # a path prefixed by /cygdrive for fixpath to work.
19128      new_path="$CYGWIN_ROOT_PATH$input_path"
19129    fi
19130  fi
19131
19132  # remove trailing .exe if any
19133  new_path="${new_path/%.exe/}"
19134
19135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19136
19137  # First separate the path from the arguments. This will split at the first
19138  # space.
19139  complete="$CC"
19140  path="${complete%% *}"
19141  tmp="$complete EOL"
19142  arguments="${tmp#* }"
19143
19144  # Input might be given as Windows format, start by converting to
19145  # unix format.
19146  new_path="$path"
19147
19148  windows_path="$new_path"
19149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19150    unix_path=`$CYGPATH -u "$windows_path"`
19151    new_path="$unix_path"
19152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19154    new_path="$unix_path"
19155  fi
19156
19157
19158  # Now try to locate executable using which
19159  new_path=`$WHICH "$new_path" 2> /dev/null`
19160
19161  if test "x$new_path" = x; then
19162    # Oops. Which didn't find the executable.
19163    # The splitting of arguments from the executable at a space might have been incorrect,
19164    # since paths with space are more likely in Windows. Give it another try with the whole
19165    # argument.
19166    path="$complete"
19167    arguments="EOL"
19168    new_path="$path"
19169
19170  windows_path="$new_path"
19171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19172    unix_path=`$CYGPATH -u "$windows_path"`
19173    new_path="$unix_path"
19174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19176    new_path="$unix_path"
19177  fi
19178
19179
19180    new_path=`$WHICH "$new_path" 2> /dev/null`
19181
19182    if test "x$new_path" = x; then
19183      # It's still not found. Now this is an unrecoverable error.
19184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19185$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19186      has_space=`$ECHO "$complete" | $GREP " "`
19187      if test "x$has_space" != x; then
19188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19190      fi
19191      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19192    fi
19193  fi
19194
19195  # Now new_path has a complete unix path to the binary
19196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19197    # Keep paths in /bin as-is, but remove trailing .exe if any
19198    new_path="${new_path/%.exe/}"
19199    # Do not save /bin paths to all_fixpath_prefixes!
19200  else
19201    # Not in mixed or Windows style, start by that.
19202    new_path=`cmd //c echo $new_path`
19203
19204  input_path="$new_path"
19205  # Check if we need to convert this using DOS-style short mode. If the path
19206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19207  # take no chances and rewrite it.
19208  # Note: m4 eats our [], so we need to use [ and ] instead.
19209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19210  if test "x$has_forbidden_chars" != x; then
19211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19213  fi
19214
19215    # Output is in $new_path
19216
19217  windows_path="$new_path"
19218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19219    unix_path=`$CYGPATH -u "$windows_path"`
19220    new_path="$unix_path"
19221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19223    new_path="$unix_path"
19224  fi
19225
19226    # remove trailing .exe if any
19227    new_path="${new_path/%.exe/}"
19228
19229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19231  fi
19232
19233  else
19234    # We're on a posix platform. Hooray! :)
19235    # First separate the path from the arguments. This will split at the first
19236    # space.
19237    complete="$CC"
19238    path="${complete%% *}"
19239    tmp="$complete EOL"
19240    arguments="${tmp#* }"
19241
19242    # Cannot rely on the command "which" here since it doesn't always work.
19243    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19244    if test -z "$is_absolute_path"; then
19245      # Path to executable is not absolute. Find it.
19246      IFS_save="$IFS"
19247      IFS=:
19248      for p in $PATH; do
19249        if test -f "$p/$path" && test -x "$p/$path"; then
19250          new_path="$p/$path"
19251          break
19252        fi
19253      done
19254      IFS="$IFS_save"
19255    else
19256      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19257$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19258      new_path="$path"
19259    fi
19260
19261    if test "x$new_path" = x; then
19262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19263$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19264        has_space=`$ECHO "$complete" | $GREP " "`
19265        if test "x$has_space" != x; then
19266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19268        fi
19269        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19270      fi
19271  fi
19272
19273      # Now join together the path and the arguments once again
19274      if test "x$arguments" != xEOL; then
19275        new_complete="$new_path ${arguments% *}"
19276      else
19277        new_complete="$new_path"
19278      fi
19279
19280  if test "x$complete" != "x$new_complete"; then
19281      CC="$new_complete"
19282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19283$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19284    fi
19285
19286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19287$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19288  TEST_COMPILER="$CC"
19289
19290    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19291        # Follow a chain of symbolic links. Use readlink
19292        # where it exists, else fall back to horribly
19293        # complicated shell code.
19294        if test "x$READLINK_TESTED" != yes; then
19295            # On MacOSX there is a readlink tool with a different
19296            # purpose than the GNU readlink tool. Check the found readlink.
19297            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19298            if test "x$ISGNU" = x; then
19299                 # A readlink that we do not know how to use.
19300                 # Are there other non-GNU readlinks out there?
19301                 READLINK_TESTED=yes
19302                 READLINK=
19303            fi
19304        fi
19305
19306        if test "x$READLINK" != x; then
19307            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19308        else
19309            # Save the current directory for restoring afterwards
19310            STARTDIR=$PWD
19311            COUNTER=0
19312            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19313            sym_link_file=`$BASENAME $TEST_COMPILER`
19314            cd $sym_link_dir
19315            # Use -P flag to resolve symlinks in directories.
19316            cd `$THEPWDCMD -P`
19317            sym_link_dir=`$THEPWDCMD -P`
19318            # Resolve file symlinks
19319            while test $COUNTER -lt 20; do
19320                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19321                if test "x$ISLINK" == x; then
19322                    # This is not a symbolic link! We are done!
19323                    break
19324                fi
19325                # Again resolve directory symlinks since the target of the just found
19326                # link could be in a different directory
19327                cd `$DIRNAME $ISLINK`
19328                sym_link_dir=`$THEPWDCMD -P`
19329                sym_link_file=`$BASENAME $ISLINK`
19330                let COUNTER=COUNTER+1
19331            done
19332            cd $STARTDIR
19333            TEST_COMPILER=$sym_link_dir/$sym_link_file
19334        fi
19335    fi
19336
19337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19338$as_echo "$TEST_COMPILER" >&6; }
19339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19340$as_echo_n "checking if CC is disguised ccache... " >&6; }
19341
19342  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19343  if test "x$COMPILER_BASENAME" = "xccache"; then
19344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19345$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19346    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19347    # We want to control ccache invocation ourselves, so ignore this cc and try
19348    # searching again.
19349
19350    # Remove the path to the fake ccache cc from the PATH
19351    RETRY_COMPILER_SAVED_PATH="$PATH"
19352    COMPILER_DIRNAME=`$DIRNAME $CC`
19353    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19354
19355    # Try again looking for our compiler
19356    if test -n "$ac_tool_prefix"; then
19357  for ac_prog in $COMPILER_CHECK_LIST
19358  do
19359    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19360set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19362$as_echo_n "checking for $ac_word... " >&6; }
19363if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19364  $as_echo_n "(cached) " >&6
19365else
19366  if test -n "$PROPER_COMPILER_CC"; then
19367  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19368else
19369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19370for as_dir in $PATH
19371do
19372  IFS=$as_save_IFS
19373  test -z "$as_dir" && as_dir=.
19374    for ac_exec_ext in '' $ac_executable_extensions; do
19375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19376    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19378    break 2
19379  fi
19380done
19381  done
19382IFS=$as_save_IFS
19383
19384fi
19385fi
19386PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19387if test -n "$PROPER_COMPILER_CC"; then
19388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19389$as_echo "$PROPER_COMPILER_CC" >&6; }
19390else
19391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19392$as_echo "no" >&6; }
19393fi
19394
19395
19396    test -n "$PROPER_COMPILER_CC" && break
19397  done
19398fi
19399if test -z "$PROPER_COMPILER_CC"; then
19400  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19401  for ac_prog in $COMPILER_CHECK_LIST
19402do
19403  # Extract the first word of "$ac_prog", so it can be a program name with args.
19404set dummy $ac_prog; ac_word=$2
19405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19406$as_echo_n "checking for $ac_word... " >&6; }
19407if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19408  $as_echo_n "(cached) " >&6
19409else
19410  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19411  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19412else
19413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19414for as_dir in $PATH
19415do
19416  IFS=$as_save_IFS
19417  test -z "$as_dir" && as_dir=.
19418    for ac_exec_ext in '' $ac_executable_extensions; do
19419  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19420    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19422    break 2
19423  fi
19424done
19425  done
19426IFS=$as_save_IFS
19427
19428fi
19429fi
19430ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19431if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19433$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19434else
19435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19436$as_echo "no" >&6; }
19437fi
19438
19439
19440  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19441done
19442
19443  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19444    PROPER_COMPILER_CC=""
19445  else
19446    case $cross_compiling:$ac_tool_warned in
19447yes:)
19448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19450ac_tool_warned=yes ;;
19451esac
19452    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19453  fi
19454fi
19455
19456
19457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19458
19459  # First separate the path from the arguments. This will split at the first
19460  # space.
19461  complete="$PROPER_COMPILER_CC"
19462  path="${complete%% *}"
19463  tmp="$complete EOL"
19464  arguments="${tmp#* }"
19465
19466  # Input might be given as Windows format, start by converting to
19467  # unix format.
19468  new_path=`$CYGPATH -u "$path"`
19469
19470  # Now try to locate executable using which
19471  new_path=`$WHICH "$new_path" 2> /dev/null`
19472  # bat and cmd files are not always considered executable in cygwin causing which
19473  # to not find them
19474  if test "x$new_path" = x \
19475           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19476           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19477    new_path=`$CYGPATH -u "$path"`
19478  fi
19479  if test "x$new_path" = x; then
19480    # Oops. Which didn't find the executable.
19481    # The splitting of arguments from the executable at a space might have been incorrect,
19482    # since paths with space are more likely in Windows. Give it another try with the whole
19483    # argument.
19484    path="$complete"
19485    arguments="EOL"
19486    new_path=`$CYGPATH -u "$path"`
19487    new_path=`$WHICH "$new_path" 2> /dev/null`
19488    # bat and cmd files are not always considered executable in cygwin causing which
19489    # to not find them
19490    if test "x$new_path" = x \
19491             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19492             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19493      new_path=`$CYGPATH -u "$path"`
19494    fi
19495    if test "x$new_path" = x; then
19496      # It's still not found. Now this is an unrecoverable error.
19497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19498$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19499      has_space=`$ECHO "$complete" | $GREP " "`
19500      if test "x$has_space" != x; then
19501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19503      fi
19504      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19505    fi
19506  fi
19507
19508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19511  # "foo.exe" is OK but "foo" is an error.
19512  #
19513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19514  # It is also a way to make sure we got the proper file name for the real test later on.
19515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19516  if test "x$test_shortpath" = x; then
19517    # Short path failed, file does not exist as specified.
19518    # Try adding .exe or .cmd
19519    if test -f "${new_path}.exe"; then
19520       input_to_shortpath="${new_path}.exe"
19521    elif test -f "${new_path}.cmd"; then
19522       input_to_shortpath="${new_path}.cmd"
19523    else
19524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19525$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19528      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19529    fi
19530  else
19531    input_to_shortpath="$new_path"
19532  fi
19533
19534  # Call helper function which possibly converts this using DOS-style short mode.
19535  # If so, the updated path is stored in $new_path.
19536  new_path="$input_to_shortpath"
19537
19538  input_path="$input_to_shortpath"
19539  # Check if we need to convert this using DOS-style short mode. If the path
19540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19541  # take no chances and rewrite it.
19542  # Note: m4 eats our [], so we need to use [ and ] instead.
19543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19544  if test "x$has_forbidden_chars" != x; then
19545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19549      # Going to short mode and back again did indeed matter. Since short mode is
19550      # case insensitive, let's make it lowercase to improve readability.
19551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19552      # Now convert it back to Unix-stile (cygpath)
19553      input_path=`$CYGPATH -u "$shortmode_path"`
19554      new_path="$input_path"
19555    fi
19556  fi
19557
19558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19559  if test "x$test_cygdrive_prefix" = x; then
19560    # As a simple fix, exclude /usr/bin since it's not a real path.
19561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19563      # a path prefixed by /cygdrive for fixpath to work.
19564      new_path="$CYGWIN_ROOT_PATH$input_path"
19565    fi
19566  fi
19567
19568  # remove trailing .exe if any
19569  new_path="${new_path/%.exe/}"
19570
19571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19572
19573  # First separate the path from the arguments. This will split at the first
19574  # space.
19575  complete="$PROPER_COMPILER_CC"
19576  path="${complete%% *}"
19577  tmp="$complete EOL"
19578  arguments="${tmp#* }"
19579
19580  # Input might be given as Windows format, start by converting to
19581  # unix format.
19582  new_path="$path"
19583
19584  windows_path="$new_path"
19585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19586    unix_path=`$CYGPATH -u "$windows_path"`
19587    new_path="$unix_path"
19588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19590    new_path="$unix_path"
19591  fi
19592
19593
19594  # Now try to locate executable using which
19595  new_path=`$WHICH "$new_path" 2> /dev/null`
19596
19597  if test "x$new_path" = x; then
19598    # Oops. Which didn't find the executable.
19599    # The splitting of arguments from the executable at a space might have been incorrect,
19600    # since paths with space are more likely in Windows. Give it another try with the whole
19601    # argument.
19602    path="$complete"
19603    arguments="EOL"
19604    new_path="$path"
19605
19606  windows_path="$new_path"
19607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19608    unix_path=`$CYGPATH -u "$windows_path"`
19609    new_path="$unix_path"
19610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19612    new_path="$unix_path"
19613  fi
19614
19615
19616    new_path=`$WHICH "$new_path" 2> /dev/null`
19617
19618    if test "x$new_path" = x; then
19619      # It's still not found. Now this is an unrecoverable error.
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19621$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19622      has_space=`$ECHO "$complete" | $GREP " "`
19623      if test "x$has_space" != x; then
19624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19626      fi
19627      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19628    fi
19629  fi
19630
19631  # Now new_path has a complete unix path to the binary
19632  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19633    # Keep paths in /bin as-is, but remove trailing .exe if any
19634    new_path="${new_path/%.exe/}"
19635    # Do not save /bin paths to all_fixpath_prefixes!
19636  else
19637    # Not in mixed or Windows style, start by that.
19638    new_path=`cmd //c echo $new_path`
19639
19640  input_path="$new_path"
19641  # Check if we need to convert this using DOS-style short mode. If the path
19642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19643  # take no chances and rewrite it.
19644  # Note: m4 eats our [], so we need to use [ and ] instead.
19645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19646  if test "x$has_forbidden_chars" != x; then
19647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19649  fi
19650
19651    # Output is in $new_path
19652
19653  windows_path="$new_path"
19654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19655    unix_path=`$CYGPATH -u "$windows_path"`
19656    new_path="$unix_path"
19657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19659    new_path="$unix_path"
19660  fi
19661
19662    # remove trailing .exe if any
19663    new_path="${new_path/%.exe/}"
19664
19665    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19666    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19667  fi
19668
19669  else
19670    # We're on a posix platform. Hooray! :)
19671    # First separate the path from the arguments. This will split at the first
19672    # space.
19673    complete="$PROPER_COMPILER_CC"
19674    path="${complete%% *}"
19675    tmp="$complete EOL"
19676    arguments="${tmp#* }"
19677
19678    # Cannot rely on the command "which" here since it doesn't always work.
19679    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19680    if test -z "$is_absolute_path"; then
19681      # Path to executable is not absolute. Find it.
19682      IFS_save="$IFS"
19683      IFS=:
19684      for p in $PATH; do
19685        if test -f "$p/$path" && test -x "$p/$path"; then
19686          new_path="$p/$path"
19687          break
19688        fi
19689      done
19690      IFS="$IFS_save"
19691    else
19692      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19693$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19694      new_path="$path"
19695    fi
19696
19697    if test "x$new_path" = x; then
19698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19699$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19700        has_space=`$ECHO "$complete" | $GREP " "`
19701        if test "x$has_space" != x; then
19702          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19703$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19704        fi
19705        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19706      fi
19707  fi
19708
19709      # Now join together the path and the arguments once again
19710      if test "x$arguments" != xEOL; then
19711        new_complete="$new_path ${arguments% *}"
19712      else
19713        new_complete="$new_path"
19714      fi
19715
19716  if test "x$complete" != "x$new_complete"; then
19717      PROPER_COMPILER_CC="$new_complete"
19718      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19719$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19720    fi
19721
19722    PATH="$RETRY_COMPILER_SAVED_PATH"
19723
19724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19725$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19726
19727    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19728        # Follow a chain of symbolic links. Use readlink
19729        # where it exists, else fall back to horribly
19730        # complicated shell code.
19731        if test "x$READLINK_TESTED" != yes; then
19732            # On MacOSX there is a readlink tool with a different
19733            # purpose than the GNU readlink tool. Check the found readlink.
19734            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19735            if test "x$ISGNU" = x; then
19736                 # A readlink that we do not know how to use.
19737                 # Are there other non-GNU readlinks out there?
19738                 READLINK_TESTED=yes
19739                 READLINK=
19740            fi
19741        fi
19742
19743        if test "x$READLINK" != x; then
19744            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19745        else
19746            # Save the current directory for restoring afterwards
19747            STARTDIR=$PWD
19748            COUNTER=0
19749            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19750            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19751            cd $sym_link_dir
19752            # Use -P flag to resolve symlinks in directories.
19753            cd `$THEPWDCMD -P`
19754            sym_link_dir=`$THEPWDCMD -P`
19755            # Resolve file symlinks
19756            while test $COUNTER -lt 20; do
19757                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19758                if test "x$ISLINK" == x; then
19759                    # This is not a symbolic link! We are done!
19760                    break
19761                fi
19762                # Again resolve directory symlinks since the target of the just found
19763                # link could be in a different directory
19764                cd `$DIRNAME $ISLINK`
19765                sym_link_dir=`$THEPWDCMD -P`
19766                sym_link_file=`$BASENAME $ISLINK`
19767                let COUNTER=COUNTER+1
19768            done
19769            cd $STARTDIR
19770            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19771        fi
19772    fi
19773
19774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19775$as_echo "$PROPER_COMPILER_CC" >&6; }
19776    CC="$PROPER_COMPILER_CC"
19777  else
19778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19779$as_echo "no, keeping CC" >&6; }
19780    CC="$TEST_COMPILER"
19781  fi
19782
19783  COMPILER=$CC
19784  COMPILER_NAME=$COMPILER_NAME
19785
19786  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19787    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19788    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19789    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19790    if test $? -ne 0; then
19791      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19792
19793      { $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
19794$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19795      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19796$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19797      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19798    else
19799      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19800      COMPILER_VENDOR="Sun Studio"
19801    fi
19802  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19803    # First line typically looks something like:
19804    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19805    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19806    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19807    COMPILER_VENDOR="Microsoft CL.EXE"
19808    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19809    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19810      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19811        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19812      fi
19813    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19814      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19815        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19816      fi
19817    fi
19818  else
19819    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19820    # Check that this is likely to be GCC.
19821    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19822    if test $? -ne 0; then
19823      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19824$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19825      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19826$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19827      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19828    fi
19829
19830    # First line typically looks something like:
19831    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19832    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19833    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19834  fi
19835  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19836  CC_VERSION="$COMPILER_VERSION"
19837  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19838  CC_VENDOR="$COMPILER_VENDOR"
19839
19840  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19841$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19842
19843
19844# Now that we have resolved CC ourself, let autoconf have its go at it
19845ac_ext=c
19846ac_cpp='$CPP $CPPFLAGS'
19847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19849ac_compiler_gnu=$ac_cv_c_compiler_gnu
19850if test -n "$ac_tool_prefix"; then
19851  for ac_prog in $CC
19852  do
19853    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19854set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19856$as_echo_n "checking for $ac_word... " >&6; }
19857if test "${ac_cv_prog_CC+set}" = set; then :
19858  $as_echo_n "(cached) " >&6
19859else
19860  if test -n "$CC"; then
19861  ac_cv_prog_CC="$CC" # Let the user override the test.
19862else
19863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19864for as_dir in $PATH
19865do
19866  IFS=$as_save_IFS
19867  test -z "$as_dir" && as_dir=.
19868    for ac_exec_ext in '' $ac_executable_extensions; do
19869  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19870    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19872    break 2
19873  fi
19874done
19875  done
19876IFS=$as_save_IFS
19877
19878fi
19879fi
19880CC=$ac_cv_prog_CC
19881if test -n "$CC"; then
19882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19883$as_echo "$CC" >&6; }
19884else
19885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19886$as_echo "no" >&6; }
19887fi
19888
19889
19890    test -n "$CC" && break
19891  done
19892fi
19893if test -z "$CC"; then
19894  ac_ct_CC=$CC
19895  for ac_prog in $CC
19896do
19897  # Extract the first word of "$ac_prog", so it can be a program name with args.
19898set dummy $ac_prog; ac_word=$2
19899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19900$as_echo_n "checking for $ac_word... " >&6; }
19901if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19902  $as_echo_n "(cached) " >&6
19903else
19904  if test -n "$ac_ct_CC"; then
19905  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19906else
19907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19908for as_dir in $PATH
19909do
19910  IFS=$as_save_IFS
19911  test -z "$as_dir" && as_dir=.
19912    for ac_exec_ext in '' $ac_executable_extensions; do
19913  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19914    ac_cv_prog_ac_ct_CC="$ac_prog"
19915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19916    break 2
19917  fi
19918done
19919  done
19920IFS=$as_save_IFS
19921
19922fi
19923fi
19924ac_ct_CC=$ac_cv_prog_ac_ct_CC
19925if test -n "$ac_ct_CC"; then
19926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19927$as_echo "$ac_ct_CC" >&6; }
19928else
19929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19930$as_echo "no" >&6; }
19931fi
19932
19933
19934  test -n "$ac_ct_CC" && break
19935done
19936
19937  if test "x$ac_ct_CC" = x; then
19938    CC=""
19939  else
19940    case $cross_compiling:$ac_tool_warned in
19941yes:)
19942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19944ac_tool_warned=yes ;;
19945esac
19946    CC=$ac_ct_CC
19947  fi
19948fi
19949
19950
19951test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19953as_fn_error $? "no acceptable C compiler found in \$PATH
19954See \`config.log' for more details" "$LINENO" 5 ; }
19955
19956# Provide some information about the compiler.
19957$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19958set X $ac_compile
19959ac_compiler=$2
19960for ac_option in --version -v -V -qversion; do
19961  { { ac_try="$ac_compiler $ac_option >&5"
19962case "(($ac_try" in
19963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19964  *) ac_try_echo=$ac_try;;
19965esac
19966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19967$as_echo "$ac_try_echo"; } >&5
19968  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19969  ac_status=$?
19970  if test -s conftest.err; then
19971    sed '10a\
19972... rest of stderr output deleted ...
19973         10q' conftest.err >conftest.er1
19974    cat conftest.er1 >&5
19975  fi
19976  rm -f conftest.er1 conftest.err
19977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19978  test $ac_status = 0; }
19979done
19980
19981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19982/* end confdefs.h.  */
19983
19984int
19985main ()
19986{
19987
19988  ;
19989  return 0;
19990}
19991_ACEOF
19992ac_clean_files_save=$ac_clean_files
19993ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19994# Try to create an executable without -o first, disregard a.out.
19995# It will help us diagnose broken compilers, and finding out an intuition
19996# of exeext.
19997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19998$as_echo_n "checking whether the C compiler works... " >&6; }
19999ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20000
20001# The possible output files:
20002ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20003
20004ac_rmfiles=
20005for ac_file in $ac_files
20006do
20007  case $ac_file in
20008    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20009    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20010  esac
20011done
20012rm -f $ac_rmfiles
20013
20014if { { ac_try="$ac_link_default"
20015case "(($ac_try" in
20016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20017  *) ac_try_echo=$ac_try;;
20018esac
20019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20020$as_echo "$ac_try_echo"; } >&5
20021  (eval "$ac_link_default") 2>&5
20022  ac_status=$?
20023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20024  test $ac_status = 0; }; then :
20025  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20026# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20027# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20028# so that the user can short-circuit this test for compilers unknown to
20029# Autoconf.
20030for ac_file in $ac_files ''
20031do
20032  test -f "$ac_file" || continue
20033  case $ac_file in
20034    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20035	;;
20036    [ab].out )
20037	# We found the default executable, but exeext='' is most
20038	# certainly right.
20039	break;;
20040    *.* )
20041	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20042	then :; else
20043	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20044	fi
20045	# We set ac_cv_exeext here because the later test for it is not
20046	# safe: cross compilers may not add the suffix if given an `-o'
20047	# argument, so we may need to know it at that point already.
20048	# Even if this section looks crufty: it has the advantage of
20049	# actually working.
20050	break;;
20051    * )
20052	break;;
20053  esac
20054done
20055test "$ac_cv_exeext" = no && ac_cv_exeext=
20056
20057else
20058  ac_file=''
20059fi
20060if test -z "$ac_file"; then :
20061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20062$as_echo "no" >&6; }
20063$as_echo "$as_me: failed program was:" >&5
20064sed 's/^/| /' conftest.$ac_ext >&5
20065
20066{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20068as_fn_error 77 "C compiler cannot create executables
20069See \`config.log' for more details" "$LINENO" 5 ; }
20070else
20071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20072$as_echo "yes" >&6; }
20073fi
20074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20075$as_echo_n "checking for C compiler default output file name... " >&6; }
20076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20077$as_echo "$ac_file" >&6; }
20078ac_exeext=$ac_cv_exeext
20079
20080rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20081ac_clean_files=$ac_clean_files_save
20082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20083$as_echo_n "checking for suffix of executables... " >&6; }
20084if { { ac_try="$ac_link"
20085case "(($ac_try" in
20086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087  *) ac_try_echo=$ac_try;;
20088esac
20089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20090$as_echo "$ac_try_echo"; } >&5
20091  (eval "$ac_link") 2>&5
20092  ac_status=$?
20093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20094  test $ac_status = 0; }; then :
20095  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20096# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20097# work properly (i.e., refer to `conftest.exe'), while it won't with
20098# `rm'.
20099for ac_file in conftest.exe conftest conftest.*; do
20100  test -f "$ac_file" || continue
20101  case $ac_file in
20102    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20103    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20104	  break;;
20105    * ) break;;
20106  esac
20107done
20108else
20109  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20111as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20112See \`config.log' for more details" "$LINENO" 5 ; }
20113fi
20114rm -f conftest conftest$ac_cv_exeext
20115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20116$as_echo "$ac_cv_exeext" >&6; }
20117
20118rm -f conftest.$ac_ext
20119EXEEXT=$ac_cv_exeext
20120ac_exeext=$EXEEXT
20121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20122/* end confdefs.h.  */
20123#include <stdio.h>
20124int
20125main ()
20126{
20127FILE *f = fopen ("conftest.out", "w");
20128 return ferror (f) || fclose (f) != 0;
20129
20130  ;
20131  return 0;
20132}
20133_ACEOF
20134ac_clean_files="$ac_clean_files conftest.out"
20135# Check that the compiler produces executables we can run.  If not, either
20136# the compiler is broken, or we cross compile.
20137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20138$as_echo_n "checking whether we are cross compiling... " >&6; }
20139if test "$cross_compiling" != yes; then
20140  { { ac_try="$ac_link"
20141case "(($ac_try" in
20142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20143  *) ac_try_echo=$ac_try;;
20144esac
20145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20146$as_echo "$ac_try_echo"; } >&5
20147  (eval "$ac_link") 2>&5
20148  ac_status=$?
20149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20150  test $ac_status = 0; }
20151  if { ac_try='./conftest$ac_cv_exeext'
20152  { { case "(($ac_try" in
20153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20154  *) ac_try_echo=$ac_try;;
20155esac
20156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20157$as_echo "$ac_try_echo"; } >&5
20158  (eval "$ac_try") 2>&5
20159  ac_status=$?
20160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20161  test $ac_status = 0; }; }; then
20162    cross_compiling=no
20163  else
20164    if test "$cross_compiling" = maybe; then
20165	cross_compiling=yes
20166    else
20167	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20169as_fn_error $? "cannot run C compiled programs.
20170If you meant to cross compile, use \`--host'.
20171See \`config.log' for more details" "$LINENO" 5 ; }
20172    fi
20173  fi
20174fi
20175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20176$as_echo "$cross_compiling" >&6; }
20177
20178rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20179ac_clean_files=$ac_clean_files_save
20180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20181$as_echo_n "checking for suffix of object files... " >&6; }
20182if test "${ac_cv_objext+set}" = set; then :
20183  $as_echo_n "(cached) " >&6
20184else
20185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20186/* end confdefs.h.  */
20187
20188int
20189main ()
20190{
20191
20192  ;
20193  return 0;
20194}
20195_ACEOF
20196rm -f conftest.o conftest.obj
20197if { { ac_try="$ac_compile"
20198case "(($ac_try" in
20199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20200  *) ac_try_echo=$ac_try;;
20201esac
20202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20203$as_echo "$ac_try_echo"; } >&5
20204  (eval "$ac_compile") 2>&5
20205  ac_status=$?
20206  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20207  test $ac_status = 0; }; then :
20208  for ac_file in conftest.o conftest.obj conftest.*; do
20209  test -f "$ac_file" || continue;
20210  case $ac_file in
20211    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20212    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20213       break;;
20214  esac
20215done
20216else
20217  $as_echo "$as_me: failed program was:" >&5
20218sed 's/^/| /' conftest.$ac_ext >&5
20219
20220{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20222as_fn_error $? "cannot compute suffix of object files: cannot compile
20223See \`config.log' for more details" "$LINENO" 5 ; }
20224fi
20225rm -f conftest.$ac_cv_objext conftest.$ac_ext
20226fi
20227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20228$as_echo "$ac_cv_objext" >&6; }
20229OBJEXT=$ac_cv_objext
20230ac_objext=$OBJEXT
20231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20232$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20233if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20234  $as_echo_n "(cached) " >&6
20235else
20236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20237/* end confdefs.h.  */
20238
20239int
20240main ()
20241{
20242#ifndef __GNUC__
20243       choke me
20244#endif
20245
20246  ;
20247  return 0;
20248}
20249_ACEOF
20250if ac_fn_c_try_compile "$LINENO"; then :
20251  ac_compiler_gnu=yes
20252else
20253  ac_compiler_gnu=no
20254fi
20255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20256ac_cv_c_compiler_gnu=$ac_compiler_gnu
20257
20258fi
20259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20260$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20261if test $ac_compiler_gnu = yes; then
20262  GCC=yes
20263else
20264  GCC=
20265fi
20266ac_test_CFLAGS=${CFLAGS+set}
20267ac_save_CFLAGS=$CFLAGS
20268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20269$as_echo_n "checking whether $CC accepts -g... " >&6; }
20270if test "${ac_cv_prog_cc_g+set}" = set; then :
20271  $as_echo_n "(cached) " >&6
20272else
20273  ac_save_c_werror_flag=$ac_c_werror_flag
20274   ac_c_werror_flag=yes
20275   ac_cv_prog_cc_g=no
20276   CFLAGS="-g"
20277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20278/* end confdefs.h.  */
20279
20280int
20281main ()
20282{
20283
20284  ;
20285  return 0;
20286}
20287_ACEOF
20288if ac_fn_c_try_compile "$LINENO"; then :
20289  ac_cv_prog_cc_g=yes
20290else
20291  CFLAGS=""
20292      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20293/* end confdefs.h.  */
20294
20295int
20296main ()
20297{
20298
20299  ;
20300  return 0;
20301}
20302_ACEOF
20303if ac_fn_c_try_compile "$LINENO"; then :
20304
20305else
20306  ac_c_werror_flag=$ac_save_c_werror_flag
20307	 CFLAGS="-g"
20308	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20309/* end confdefs.h.  */
20310
20311int
20312main ()
20313{
20314
20315  ;
20316  return 0;
20317}
20318_ACEOF
20319if ac_fn_c_try_compile "$LINENO"; then :
20320  ac_cv_prog_cc_g=yes
20321fi
20322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20323fi
20324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20325fi
20326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20327   ac_c_werror_flag=$ac_save_c_werror_flag
20328fi
20329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20330$as_echo "$ac_cv_prog_cc_g" >&6; }
20331if test "$ac_test_CFLAGS" = set; then
20332  CFLAGS=$ac_save_CFLAGS
20333elif test $ac_cv_prog_cc_g = yes; then
20334  if test "$GCC" = yes; then
20335    CFLAGS="-g -O2"
20336  else
20337    CFLAGS="-g"
20338  fi
20339else
20340  if test "$GCC" = yes; then
20341    CFLAGS="-O2"
20342  else
20343    CFLAGS=
20344  fi
20345fi
20346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20347$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20348if test "${ac_cv_prog_cc_c89+set}" = set; then :
20349  $as_echo_n "(cached) " >&6
20350else
20351  ac_cv_prog_cc_c89=no
20352ac_save_CC=$CC
20353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354/* end confdefs.h.  */
20355#include <stdarg.h>
20356#include <stdio.h>
20357#include <sys/types.h>
20358#include <sys/stat.h>
20359/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20360struct buf { int x; };
20361FILE * (*rcsopen) (struct buf *, struct stat *, int);
20362static char *e (p, i)
20363     char **p;
20364     int i;
20365{
20366  return p[i];
20367}
20368static char *f (char * (*g) (char **, int), char **p, ...)
20369{
20370  char *s;
20371  va_list v;
20372  va_start (v,p);
20373  s = g (p, va_arg (v,int));
20374  va_end (v);
20375  return s;
20376}
20377
20378/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20379   function prototypes and stuff, but not '\xHH' hex character constants.
20380   These don't provoke an error unfortunately, instead are silently treated
20381   as 'x'.  The following induces an error, until -std is added to get
20382   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20383   array size at least.  It's necessary to write '\x00'==0 to get something
20384   that's true only with -std.  */
20385int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20386
20387/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20388   inside strings and character constants.  */
20389#define FOO(x) 'x'
20390int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20391
20392int test (int i, double x);
20393struct s1 {int (*f) (int a);};
20394struct s2 {int (*f) (double a);};
20395int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20396int argc;
20397char **argv;
20398int
20399main ()
20400{
20401return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20402  ;
20403  return 0;
20404}
20405_ACEOF
20406for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20407	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20408do
20409  CC="$ac_save_CC $ac_arg"
20410  if ac_fn_c_try_compile "$LINENO"; then :
20411  ac_cv_prog_cc_c89=$ac_arg
20412fi
20413rm -f core conftest.err conftest.$ac_objext
20414  test "x$ac_cv_prog_cc_c89" != "xno" && break
20415done
20416rm -f conftest.$ac_ext
20417CC=$ac_save_CC
20418
20419fi
20420# AC_CACHE_VAL
20421case "x$ac_cv_prog_cc_c89" in
20422  x)
20423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20424$as_echo "none needed" >&6; } ;;
20425  xno)
20426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20427$as_echo "unsupported" >&6; } ;;
20428  *)
20429    CC="$CC $ac_cv_prog_cc_c89"
20430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20431$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20432esac
20433if test "x$ac_cv_prog_cc_c89" != xno; then :
20434
20435fi
20436
20437ac_ext=cpp
20438ac_cpp='$CXXCPP $CPPFLAGS'
20439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20442
20443
20444### Locate C++ compiler (CXX)
20445
20446if test "x$CXX" != x; then
20447  COMPILER_CHECK_LIST="$CXX"
20448elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20449  COMPILER_CHECK_LIST="cl"
20450elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20451  COMPILER_CHECK_LIST="CC g++"
20452else
20453  COMPILER_CHECK_LIST="g++ CC"
20454fi
20455
20456
20457  COMPILER_NAME=C++
20458
20459  CXX=
20460  # If TOOLS_DIR is set, check for all compiler names in there first
20461  # before checking the rest of the PATH.
20462  if test -n "$TOOLS_DIR"; then
20463    PATH_save="$PATH"
20464    PATH="$TOOLS_DIR"
20465    for ac_prog in $COMPILER_CHECK_LIST
20466do
20467  # Extract the first word of "$ac_prog", so it can be a program name with args.
20468set dummy $ac_prog; ac_word=$2
20469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20470$as_echo_n "checking for $ac_word... " >&6; }
20471if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20472  $as_echo_n "(cached) " >&6
20473else
20474  case $TOOLS_DIR_CXX in
20475  [\\/]* | ?:[\\/]*)
20476  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20477  ;;
20478  *)
20479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20480for as_dir in $PATH
20481do
20482  IFS=$as_save_IFS
20483  test -z "$as_dir" && as_dir=.
20484    for ac_exec_ext in '' $ac_executable_extensions; do
20485  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20486    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20488    break 2
20489  fi
20490done
20491  done
20492IFS=$as_save_IFS
20493
20494  ;;
20495esac
20496fi
20497TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20498if test -n "$TOOLS_DIR_CXX"; then
20499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20500$as_echo "$TOOLS_DIR_CXX" >&6; }
20501else
20502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20503$as_echo "no" >&6; }
20504fi
20505
20506
20507  test -n "$TOOLS_DIR_CXX" && break
20508done
20509
20510    CXX=$TOOLS_DIR_CXX
20511    PATH="$PATH_save"
20512  fi
20513
20514  # AC_PATH_PROGS can't be run multiple times with the same variable,
20515  # so create a new name for this run.
20516  if test "x$CXX" = x; then
20517    for ac_prog in $COMPILER_CHECK_LIST
20518do
20519  # Extract the first word of "$ac_prog", so it can be a program name with args.
20520set dummy $ac_prog; ac_word=$2
20521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20522$as_echo_n "checking for $ac_word... " >&6; }
20523if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20524  $as_echo_n "(cached) " >&6
20525else
20526  case $POTENTIAL_CXX in
20527  [\\/]* | ?:[\\/]*)
20528  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20529  ;;
20530  *)
20531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20532for as_dir in $PATH
20533do
20534  IFS=$as_save_IFS
20535  test -z "$as_dir" && as_dir=.
20536    for ac_exec_ext in '' $ac_executable_extensions; do
20537  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20538    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20540    break 2
20541  fi
20542done
20543  done
20544IFS=$as_save_IFS
20545
20546  ;;
20547esac
20548fi
20549POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20550if test -n "$POTENTIAL_CXX"; then
20551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20552$as_echo "$POTENTIAL_CXX" >&6; }
20553else
20554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20555$as_echo "no" >&6; }
20556fi
20557
20558
20559  test -n "$POTENTIAL_CXX" && break
20560done
20561
20562    CXX=$POTENTIAL_CXX
20563  fi
20564
20565  if test "x$CXX" = x; then
20566
20567    # Print a helpful message on how to acquire the necessary build dependency.
20568    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20569    MISSING_DEPENDENCY=devkit
20570    PKGHANDLER_COMMAND=
20571
20572    case $PKGHANDLER in
20573	apt-get)
20574                apt_help     $MISSING_DEPENDENCY ;;
20575    yum)
20576                yum_help     $MISSING_DEPENDENCY ;;
20577	port)
20578                port_help    $MISSING_DEPENDENCY ;;
20579	pkgutil)
20580                pkgutil_help $MISSING_DEPENDENCY ;;
20581	pkgadd)
20582                pkgadd_help  $MISSING_DEPENDENCY ;;
20583    * )
20584      break ;;
20585    esac
20586
20587    if test "x$PKGHANDLER_COMMAND" != x; then
20588        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20589    fi
20590
20591      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20592  fi
20593
20594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20595
20596  # First separate the path from the arguments. This will split at the first
20597  # space.
20598  complete="$CXX"
20599  path="${complete%% *}"
20600  tmp="$complete EOL"
20601  arguments="${tmp#* }"
20602
20603  # Input might be given as Windows format, start by converting to
20604  # unix format.
20605  new_path=`$CYGPATH -u "$path"`
20606
20607  # Now try to locate executable using which
20608  new_path=`$WHICH "$new_path" 2> /dev/null`
20609  # bat and cmd files are not always considered executable in cygwin causing which
20610  # to not find them
20611  if test "x$new_path" = x \
20612           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20613           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20614    new_path=`$CYGPATH -u "$path"`
20615  fi
20616  if test "x$new_path" = x; then
20617    # Oops. Which didn't find the executable.
20618    # The splitting of arguments from the executable at a space might have been incorrect,
20619    # since paths with space are more likely in Windows. Give it another try with the whole
20620    # argument.
20621    path="$complete"
20622    arguments="EOL"
20623    new_path=`$CYGPATH -u "$path"`
20624    new_path=`$WHICH "$new_path" 2> /dev/null`
20625    # bat and cmd files are not always considered executable in cygwin causing which
20626    # to not find them
20627    if test "x$new_path" = x \
20628             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20629             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20630      new_path=`$CYGPATH -u "$path"`
20631    fi
20632    if test "x$new_path" = x; then
20633      # It's still not found. Now this is an unrecoverable error.
20634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20635$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20636      has_space=`$ECHO "$complete" | $GREP " "`
20637      if test "x$has_space" != x; then
20638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20640      fi
20641      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20642    fi
20643  fi
20644
20645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20648  # "foo.exe" is OK but "foo" is an error.
20649  #
20650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20651  # It is also a way to make sure we got the proper file name for the real test later on.
20652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20653  if test "x$test_shortpath" = x; then
20654    # Short path failed, file does not exist as specified.
20655    # Try adding .exe or .cmd
20656    if test -f "${new_path}.exe"; then
20657       input_to_shortpath="${new_path}.exe"
20658    elif test -f "${new_path}.cmd"; then
20659       input_to_shortpath="${new_path}.cmd"
20660    else
20661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20662$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20663      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20664$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20665      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20666    fi
20667  else
20668    input_to_shortpath="$new_path"
20669  fi
20670
20671  # Call helper function which possibly converts this using DOS-style short mode.
20672  # If so, the updated path is stored in $new_path.
20673  new_path="$input_to_shortpath"
20674
20675  input_path="$input_to_shortpath"
20676  # Check if we need to convert this using DOS-style short mode. If the path
20677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20678  # take no chances and rewrite it.
20679  # Note: m4 eats our [], so we need to use [ and ] instead.
20680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20681  if test "x$has_forbidden_chars" != x; then
20682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20686      # Going to short mode and back again did indeed matter. Since short mode is
20687      # case insensitive, let's make it lowercase to improve readability.
20688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20689      # Now convert it back to Unix-stile (cygpath)
20690      input_path=`$CYGPATH -u "$shortmode_path"`
20691      new_path="$input_path"
20692    fi
20693  fi
20694
20695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20696  if test "x$test_cygdrive_prefix" = x; then
20697    # As a simple fix, exclude /usr/bin since it's not a real path.
20698    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20700      # a path prefixed by /cygdrive for fixpath to work.
20701      new_path="$CYGWIN_ROOT_PATH$input_path"
20702    fi
20703  fi
20704
20705  # remove trailing .exe if any
20706  new_path="${new_path/%.exe/}"
20707
20708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20709
20710  # First separate the path from the arguments. This will split at the first
20711  # space.
20712  complete="$CXX"
20713  path="${complete%% *}"
20714  tmp="$complete EOL"
20715  arguments="${tmp#* }"
20716
20717  # Input might be given as Windows format, start by converting to
20718  # unix format.
20719  new_path="$path"
20720
20721  windows_path="$new_path"
20722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20723    unix_path=`$CYGPATH -u "$windows_path"`
20724    new_path="$unix_path"
20725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20727    new_path="$unix_path"
20728  fi
20729
20730
20731  # Now try to locate executable using which
20732  new_path=`$WHICH "$new_path" 2> /dev/null`
20733
20734  if test "x$new_path" = x; then
20735    # Oops. Which didn't find the executable.
20736    # The splitting of arguments from the executable at a space might have been incorrect,
20737    # since paths with space are more likely in Windows. Give it another try with the whole
20738    # argument.
20739    path="$complete"
20740    arguments="EOL"
20741    new_path="$path"
20742
20743  windows_path="$new_path"
20744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20745    unix_path=`$CYGPATH -u "$windows_path"`
20746    new_path="$unix_path"
20747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20749    new_path="$unix_path"
20750  fi
20751
20752
20753    new_path=`$WHICH "$new_path" 2> /dev/null`
20754
20755    if test "x$new_path" = x; then
20756      # It's still not found. Now this is an unrecoverable error.
20757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20758$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20759      has_space=`$ECHO "$complete" | $GREP " "`
20760      if test "x$has_space" != x; then
20761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20763      fi
20764      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20765    fi
20766  fi
20767
20768  # Now new_path has a complete unix path to the binary
20769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20770    # Keep paths in /bin as-is, but remove trailing .exe if any
20771    new_path="${new_path/%.exe/}"
20772    # Do not save /bin paths to all_fixpath_prefixes!
20773  else
20774    # Not in mixed or Windows style, start by that.
20775    new_path=`cmd //c echo $new_path`
20776
20777  input_path="$new_path"
20778  # Check if we need to convert this using DOS-style short mode. If the path
20779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20780  # take no chances and rewrite it.
20781  # Note: m4 eats our [], so we need to use [ and ] instead.
20782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20783  if test "x$has_forbidden_chars" != x; then
20784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20786  fi
20787
20788    # Output is in $new_path
20789
20790  windows_path="$new_path"
20791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20792    unix_path=`$CYGPATH -u "$windows_path"`
20793    new_path="$unix_path"
20794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20796    new_path="$unix_path"
20797  fi
20798
20799    # remove trailing .exe if any
20800    new_path="${new_path/%.exe/}"
20801
20802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20804  fi
20805
20806  else
20807    # We're on a posix platform. Hooray! :)
20808    # First separate the path from the arguments. This will split at the first
20809    # space.
20810    complete="$CXX"
20811    path="${complete%% *}"
20812    tmp="$complete EOL"
20813    arguments="${tmp#* }"
20814
20815    # Cannot rely on the command "which" here since it doesn't always work.
20816    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20817    if test -z "$is_absolute_path"; then
20818      # Path to executable is not absolute. Find it.
20819      IFS_save="$IFS"
20820      IFS=:
20821      for p in $PATH; do
20822        if test -f "$p/$path" && test -x "$p/$path"; then
20823          new_path="$p/$path"
20824          break
20825        fi
20826      done
20827      IFS="$IFS_save"
20828    else
20829      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20830$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20831      new_path="$path"
20832    fi
20833
20834    if test "x$new_path" = x; then
20835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20836$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20837        has_space=`$ECHO "$complete" | $GREP " "`
20838        if test "x$has_space" != x; then
20839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20841        fi
20842        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20843      fi
20844  fi
20845
20846      # Now join together the path and the arguments once again
20847      if test "x$arguments" != xEOL; then
20848        new_complete="$new_path ${arguments% *}"
20849      else
20850        new_complete="$new_path"
20851      fi
20852
20853  if test "x$complete" != "x$new_complete"; then
20854      CXX="$new_complete"
20855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20856$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20857    fi
20858
20859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20860$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20861  TEST_COMPILER="$CXX"
20862
20863    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20864        # Follow a chain of symbolic links. Use readlink
20865        # where it exists, else fall back to horribly
20866        # complicated shell code.
20867        if test "x$READLINK_TESTED" != yes; then
20868            # On MacOSX there is a readlink tool with a different
20869            # purpose than the GNU readlink tool. Check the found readlink.
20870            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20871            if test "x$ISGNU" = x; then
20872                 # A readlink that we do not know how to use.
20873                 # Are there other non-GNU readlinks out there?
20874                 READLINK_TESTED=yes
20875                 READLINK=
20876            fi
20877        fi
20878
20879        if test "x$READLINK" != x; then
20880            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20881        else
20882            # Save the current directory for restoring afterwards
20883            STARTDIR=$PWD
20884            COUNTER=0
20885            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20886            sym_link_file=`$BASENAME $TEST_COMPILER`
20887            cd $sym_link_dir
20888            # Use -P flag to resolve symlinks in directories.
20889            cd `$THEPWDCMD -P`
20890            sym_link_dir=`$THEPWDCMD -P`
20891            # Resolve file symlinks
20892            while test $COUNTER -lt 20; do
20893                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20894                if test "x$ISLINK" == x; then
20895                    # This is not a symbolic link! We are done!
20896                    break
20897                fi
20898                # Again resolve directory symlinks since the target of the just found
20899                # link could be in a different directory
20900                cd `$DIRNAME $ISLINK`
20901                sym_link_dir=`$THEPWDCMD -P`
20902                sym_link_file=`$BASENAME $ISLINK`
20903                let COUNTER=COUNTER+1
20904            done
20905            cd $STARTDIR
20906            TEST_COMPILER=$sym_link_dir/$sym_link_file
20907        fi
20908    fi
20909
20910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20911$as_echo "$TEST_COMPILER" >&6; }
20912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20913$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20914
20915  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20916  if test "x$COMPILER_BASENAME" = "xccache"; then
20917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20918$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20919    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20920    # We want to control ccache invocation ourselves, so ignore this cc and try
20921    # searching again.
20922
20923    # Remove the path to the fake ccache cc from the PATH
20924    RETRY_COMPILER_SAVED_PATH="$PATH"
20925    COMPILER_DIRNAME=`$DIRNAME $CXX`
20926    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20927
20928    # Try again looking for our compiler
20929    if test -n "$ac_tool_prefix"; then
20930  for ac_prog in $COMPILER_CHECK_LIST
20931  do
20932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20935$as_echo_n "checking for $ac_word... " >&6; }
20936if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20937  $as_echo_n "(cached) " >&6
20938else
20939  if test -n "$PROPER_COMPILER_CXX"; then
20940  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20941else
20942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20943for as_dir in $PATH
20944do
20945  IFS=$as_save_IFS
20946  test -z "$as_dir" && as_dir=.
20947    for ac_exec_ext in '' $ac_executable_extensions; do
20948  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20949    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20951    break 2
20952  fi
20953done
20954  done
20955IFS=$as_save_IFS
20956
20957fi
20958fi
20959PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20960if test -n "$PROPER_COMPILER_CXX"; then
20961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20962$as_echo "$PROPER_COMPILER_CXX" >&6; }
20963else
20964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20965$as_echo "no" >&6; }
20966fi
20967
20968
20969    test -n "$PROPER_COMPILER_CXX" && break
20970  done
20971fi
20972if test -z "$PROPER_COMPILER_CXX"; then
20973  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20974  for ac_prog in $COMPILER_CHECK_LIST
20975do
20976  # Extract the first word of "$ac_prog", so it can be a program name with args.
20977set dummy $ac_prog; ac_word=$2
20978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20979$as_echo_n "checking for $ac_word... " >&6; }
20980if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20981  $as_echo_n "(cached) " >&6
20982else
20983  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20984  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20985else
20986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20987for as_dir in $PATH
20988do
20989  IFS=$as_save_IFS
20990  test -z "$as_dir" && as_dir=.
20991    for ac_exec_ext in '' $ac_executable_extensions; do
20992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20993    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20995    break 2
20996  fi
20997done
20998  done
20999IFS=$as_save_IFS
21000
21001fi
21002fi
21003ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21004if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21006$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21007else
21008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21009$as_echo "no" >&6; }
21010fi
21011
21012
21013  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21014done
21015
21016  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21017    PROPER_COMPILER_CXX=""
21018  else
21019    case $cross_compiling:$ac_tool_warned in
21020yes:)
21021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21023ac_tool_warned=yes ;;
21024esac
21025    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21026  fi
21027fi
21028
21029
21030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21031
21032  # First separate the path from the arguments. This will split at the first
21033  # space.
21034  complete="$PROPER_COMPILER_CXX"
21035  path="${complete%% *}"
21036  tmp="$complete EOL"
21037  arguments="${tmp#* }"
21038
21039  # Input might be given as Windows format, start by converting to
21040  # unix format.
21041  new_path=`$CYGPATH -u "$path"`
21042
21043  # Now try to locate executable using which
21044  new_path=`$WHICH "$new_path" 2> /dev/null`
21045  # bat and cmd files are not always considered executable in cygwin causing which
21046  # to not find them
21047  if test "x$new_path" = x \
21048           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21049           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21050    new_path=`$CYGPATH -u "$path"`
21051  fi
21052  if test "x$new_path" = x; then
21053    # Oops. Which didn't find the executable.
21054    # The splitting of arguments from the executable at a space might have been incorrect,
21055    # since paths with space are more likely in Windows. Give it another try with the whole
21056    # argument.
21057    path="$complete"
21058    arguments="EOL"
21059    new_path=`$CYGPATH -u "$path"`
21060    new_path=`$WHICH "$new_path" 2> /dev/null`
21061    # bat and cmd files are not always considered executable in cygwin causing which
21062    # to not find them
21063    if test "x$new_path" = x \
21064             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21065             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21066      new_path=`$CYGPATH -u "$path"`
21067    fi
21068    if test "x$new_path" = x; then
21069      # It's still not found. Now this is an unrecoverable error.
21070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21071$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21072      has_space=`$ECHO "$complete" | $GREP " "`
21073      if test "x$has_space" != x; then
21074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21076      fi
21077      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21078    fi
21079  fi
21080
21081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21084  # "foo.exe" is OK but "foo" is an error.
21085  #
21086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21087  # It is also a way to make sure we got the proper file name for the real test later on.
21088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21089  if test "x$test_shortpath" = x; then
21090    # Short path failed, file does not exist as specified.
21091    # Try adding .exe or .cmd
21092    if test -f "${new_path}.exe"; then
21093       input_to_shortpath="${new_path}.exe"
21094    elif test -f "${new_path}.cmd"; then
21095       input_to_shortpath="${new_path}.cmd"
21096    else
21097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21098$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21101      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21102    fi
21103  else
21104    input_to_shortpath="$new_path"
21105  fi
21106
21107  # Call helper function which possibly converts this using DOS-style short mode.
21108  # If so, the updated path is stored in $new_path.
21109  new_path="$input_to_shortpath"
21110
21111  input_path="$input_to_shortpath"
21112  # Check if we need to convert this using DOS-style short mode. If the path
21113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21114  # take no chances and rewrite it.
21115  # Note: m4 eats our [], so we need to use [ and ] instead.
21116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21117  if test "x$has_forbidden_chars" != x; then
21118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21122      # Going to short mode and back again did indeed matter. Since short mode is
21123      # case insensitive, let's make it lowercase to improve readability.
21124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21125      # Now convert it back to Unix-stile (cygpath)
21126      input_path=`$CYGPATH -u "$shortmode_path"`
21127      new_path="$input_path"
21128    fi
21129  fi
21130
21131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21132  if test "x$test_cygdrive_prefix" = x; then
21133    # As a simple fix, exclude /usr/bin since it's not a real path.
21134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21136      # a path prefixed by /cygdrive for fixpath to work.
21137      new_path="$CYGWIN_ROOT_PATH$input_path"
21138    fi
21139  fi
21140
21141  # remove trailing .exe if any
21142  new_path="${new_path/%.exe/}"
21143
21144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21145
21146  # First separate the path from the arguments. This will split at the first
21147  # space.
21148  complete="$PROPER_COMPILER_CXX"
21149  path="${complete%% *}"
21150  tmp="$complete EOL"
21151  arguments="${tmp#* }"
21152
21153  # Input might be given as Windows format, start by converting to
21154  # unix format.
21155  new_path="$path"
21156
21157  windows_path="$new_path"
21158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21159    unix_path=`$CYGPATH -u "$windows_path"`
21160    new_path="$unix_path"
21161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21163    new_path="$unix_path"
21164  fi
21165
21166
21167  # Now try to locate executable using which
21168  new_path=`$WHICH "$new_path" 2> /dev/null`
21169
21170  if test "x$new_path" = x; then
21171    # Oops. Which didn't find the executable.
21172    # The splitting of arguments from the executable at a space might have been incorrect,
21173    # since paths with space are more likely in Windows. Give it another try with the whole
21174    # argument.
21175    path="$complete"
21176    arguments="EOL"
21177    new_path="$path"
21178
21179  windows_path="$new_path"
21180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21181    unix_path=`$CYGPATH -u "$windows_path"`
21182    new_path="$unix_path"
21183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21185    new_path="$unix_path"
21186  fi
21187
21188
21189    new_path=`$WHICH "$new_path" 2> /dev/null`
21190
21191    if test "x$new_path" = x; then
21192      # It's still not found. Now this is an unrecoverable error.
21193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21194$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21195      has_space=`$ECHO "$complete" | $GREP " "`
21196      if test "x$has_space" != x; then
21197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21199      fi
21200      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21201    fi
21202  fi
21203
21204  # Now new_path has a complete unix path to the binary
21205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21206    # Keep paths in /bin as-is, but remove trailing .exe if any
21207    new_path="${new_path/%.exe/}"
21208    # Do not save /bin paths to all_fixpath_prefixes!
21209  else
21210    # Not in mixed or Windows style, start by that.
21211    new_path=`cmd //c echo $new_path`
21212
21213  input_path="$new_path"
21214  # Check if we need to convert this using DOS-style short mode. If the path
21215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21216  # take no chances and rewrite it.
21217  # Note: m4 eats our [], so we need to use [ and ] instead.
21218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21219  if test "x$has_forbidden_chars" != x; then
21220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21222  fi
21223
21224    # Output is in $new_path
21225
21226  windows_path="$new_path"
21227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21228    unix_path=`$CYGPATH -u "$windows_path"`
21229    new_path="$unix_path"
21230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21232    new_path="$unix_path"
21233  fi
21234
21235    # remove trailing .exe if any
21236    new_path="${new_path/%.exe/}"
21237
21238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21240  fi
21241
21242  else
21243    # We're on a posix platform. Hooray! :)
21244    # First separate the path from the arguments. This will split at the first
21245    # space.
21246    complete="$PROPER_COMPILER_CXX"
21247    path="${complete%% *}"
21248    tmp="$complete EOL"
21249    arguments="${tmp#* }"
21250
21251    # Cannot rely on the command "which" here since it doesn't always work.
21252    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21253    if test -z "$is_absolute_path"; then
21254      # Path to executable is not absolute. Find it.
21255      IFS_save="$IFS"
21256      IFS=:
21257      for p in $PATH; do
21258        if test -f "$p/$path" && test -x "$p/$path"; then
21259          new_path="$p/$path"
21260          break
21261        fi
21262      done
21263      IFS="$IFS_save"
21264    else
21265      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21266$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21267      new_path="$path"
21268    fi
21269
21270    if test "x$new_path" = x; then
21271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21272$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21273        has_space=`$ECHO "$complete" | $GREP " "`
21274        if test "x$has_space" != x; then
21275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21277        fi
21278        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21279      fi
21280  fi
21281
21282      # Now join together the path and the arguments once again
21283      if test "x$arguments" != xEOL; then
21284        new_complete="$new_path ${arguments% *}"
21285      else
21286        new_complete="$new_path"
21287      fi
21288
21289  if test "x$complete" != "x$new_complete"; then
21290      PROPER_COMPILER_CXX="$new_complete"
21291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21292$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21293    fi
21294
21295    PATH="$RETRY_COMPILER_SAVED_PATH"
21296
21297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21298$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21299
21300    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21301        # Follow a chain of symbolic links. Use readlink
21302        # where it exists, else fall back to horribly
21303        # complicated shell code.
21304        if test "x$READLINK_TESTED" != yes; then
21305            # On MacOSX there is a readlink tool with a different
21306            # purpose than the GNU readlink tool. Check the found readlink.
21307            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21308            if test "x$ISGNU" = x; then
21309                 # A readlink that we do not know how to use.
21310                 # Are there other non-GNU readlinks out there?
21311                 READLINK_TESTED=yes
21312                 READLINK=
21313            fi
21314        fi
21315
21316        if test "x$READLINK" != x; then
21317            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21318        else
21319            # Save the current directory for restoring afterwards
21320            STARTDIR=$PWD
21321            COUNTER=0
21322            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21323            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21324            cd $sym_link_dir
21325            # Use -P flag to resolve symlinks in directories.
21326            cd `$THEPWDCMD -P`
21327            sym_link_dir=`$THEPWDCMD -P`
21328            # Resolve file symlinks
21329            while test $COUNTER -lt 20; do
21330                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21331                if test "x$ISLINK" == x; then
21332                    # This is not a symbolic link! We are done!
21333                    break
21334                fi
21335                # Again resolve directory symlinks since the target of the just found
21336                # link could be in a different directory
21337                cd `$DIRNAME $ISLINK`
21338                sym_link_dir=`$THEPWDCMD -P`
21339                sym_link_file=`$BASENAME $ISLINK`
21340                let COUNTER=COUNTER+1
21341            done
21342            cd $STARTDIR
21343            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21344        fi
21345    fi
21346
21347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21348$as_echo "$PROPER_COMPILER_CXX" >&6; }
21349    CXX="$PROPER_COMPILER_CXX"
21350  else
21351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21352$as_echo "no, keeping CXX" >&6; }
21353    CXX="$TEST_COMPILER"
21354  fi
21355
21356  COMPILER=$CXX
21357  COMPILER_NAME=$COMPILER_NAME
21358
21359  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21360    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21361    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21362    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21363    if test $? -ne 0; then
21364      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21365
21366      { $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
21367$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21368      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21369$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21370      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21371    else
21372      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21373      COMPILER_VENDOR="Sun Studio"
21374    fi
21375  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21376    # First line typically looks something like:
21377    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21378    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21379    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21380    COMPILER_VENDOR="Microsoft CL.EXE"
21381    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21382    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21383      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21384        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21385      fi
21386    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21387      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21388        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21389      fi
21390    fi
21391  else
21392    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21393    # Check that this is likely to be GCC.
21394    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21395    if test $? -ne 0; then
21396      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21397$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21398      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21399$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21400      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21401    fi
21402
21403    # First line typically looks something like:
21404    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21405    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21406    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21407  fi
21408  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21409  CXX_VERSION="$COMPILER_VERSION"
21410  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21411  CXX_VENDOR="$COMPILER_VENDOR"
21412
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21414$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21415
21416
21417# Now that we have resolved CXX ourself, let autoconf have its go at it
21418ac_ext=cpp
21419ac_cpp='$CXXCPP $CPPFLAGS'
21420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21423if test -z "$CXX"; then
21424  if test -n "$CCC"; then
21425    CXX=$CCC
21426  else
21427    if test -n "$ac_tool_prefix"; then
21428  for ac_prog in $CXX
21429  do
21430    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21431set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21433$as_echo_n "checking for $ac_word... " >&6; }
21434if test "${ac_cv_prog_CXX+set}" = set; then :
21435  $as_echo_n "(cached) " >&6
21436else
21437  if test -n "$CXX"; then
21438  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21439else
21440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21441for as_dir in $PATH
21442do
21443  IFS=$as_save_IFS
21444  test -z "$as_dir" && as_dir=.
21445    for ac_exec_ext in '' $ac_executable_extensions; do
21446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21447    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21449    break 2
21450  fi
21451done
21452  done
21453IFS=$as_save_IFS
21454
21455fi
21456fi
21457CXX=$ac_cv_prog_CXX
21458if test -n "$CXX"; then
21459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21460$as_echo "$CXX" >&6; }
21461else
21462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21463$as_echo "no" >&6; }
21464fi
21465
21466
21467    test -n "$CXX" && break
21468  done
21469fi
21470if test -z "$CXX"; then
21471  ac_ct_CXX=$CXX
21472  for ac_prog in $CXX
21473do
21474  # Extract the first word of "$ac_prog", so it can be a program name with args.
21475set dummy $ac_prog; ac_word=$2
21476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21477$as_echo_n "checking for $ac_word... " >&6; }
21478if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21479  $as_echo_n "(cached) " >&6
21480else
21481  if test -n "$ac_ct_CXX"; then
21482  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21483else
21484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21485for as_dir in $PATH
21486do
21487  IFS=$as_save_IFS
21488  test -z "$as_dir" && as_dir=.
21489    for ac_exec_ext in '' $ac_executable_extensions; do
21490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21491    ac_cv_prog_ac_ct_CXX="$ac_prog"
21492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21493    break 2
21494  fi
21495done
21496  done
21497IFS=$as_save_IFS
21498
21499fi
21500fi
21501ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21502if test -n "$ac_ct_CXX"; then
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21504$as_echo "$ac_ct_CXX" >&6; }
21505else
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21507$as_echo "no" >&6; }
21508fi
21509
21510
21511  test -n "$ac_ct_CXX" && break
21512done
21513
21514  if test "x$ac_ct_CXX" = x; then
21515    CXX="g++"
21516  else
21517    case $cross_compiling:$ac_tool_warned in
21518yes:)
21519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21521ac_tool_warned=yes ;;
21522esac
21523    CXX=$ac_ct_CXX
21524  fi
21525fi
21526
21527  fi
21528fi
21529# Provide some information about the compiler.
21530$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21531set X $ac_compile
21532ac_compiler=$2
21533for ac_option in --version -v -V -qversion; do
21534  { { ac_try="$ac_compiler $ac_option >&5"
21535case "(($ac_try" in
21536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21537  *) ac_try_echo=$ac_try;;
21538esac
21539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21540$as_echo "$ac_try_echo"; } >&5
21541  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21542  ac_status=$?
21543  if test -s conftest.err; then
21544    sed '10a\
21545... rest of stderr output deleted ...
21546         10q' conftest.err >conftest.er1
21547    cat conftest.er1 >&5
21548  fi
21549  rm -f conftest.er1 conftest.err
21550  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21551  test $ac_status = 0; }
21552done
21553
21554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21555$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21556if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21557  $as_echo_n "(cached) " >&6
21558else
21559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21560/* end confdefs.h.  */
21561
21562int
21563main ()
21564{
21565#ifndef __GNUC__
21566       choke me
21567#endif
21568
21569  ;
21570  return 0;
21571}
21572_ACEOF
21573if ac_fn_cxx_try_compile "$LINENO"; then :
21574  ac_compiler_gnu=yes
21575else
21576  ac_compiler_gnu=no
21577fi
21578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21579ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21580
21581fi
21582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21583$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21584if test $ac_compiler_gnu = yes; then
21585  GXX=yes
21586else
21587  GXX=
21588fi
21589ac_test_CXXFLAGS=${CXXFLAGS+set}
21590ac_save_CXXFLAGS=$CXXFLAGS
21591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21592$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21593if test "${ac_cv_prog_cxx_g+set}" = set; then :
21594  $as_echo_n "(cached) " >&6
21595else
21596  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21597   ac_cxx_werror_flag=yes
21598   ac_cv_prog_cxx_g=no
21599   CXXFLAGS="-g"
21600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21601/* end confdefs.h.  */
21602
21603int
21604main ()
21605{
21606
21607  ;
21608  return 0;
21609}
21610_ACEOF
21611if ac_fn_cxx_try_compile "$LINENO"; then :
21612  ac_cv_prog_cxx_g=yes
21613else
21614  CXXFLAGS=""
21615      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21616/* end confdefs.h.  */
21617
21618int
21619main ()
21620{
21621
21622  ;
21623  return 0;
21624}
21625_ACEOF
21626if ac_fn_cxx_try_compile "$LINENO"; then :
21627
21628else
21629  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21630	 CXXFLAGS="-g"
21631	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21632/* end confdefs.h.  */
21633
21634int
21635main ()
21636{
21637
21638  ;
21639  return 0;
21640}
21641_ACEOF
21642if ac_fn_cxx_try_compile "$LINENO"; then :
21643  ac_cv_prog_cxx_g=yes
21644fi
21645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21646fi
21647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21648fi
21649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21650   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21651fi
21652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21653$as_echo "$ac_cv_prog_cxx_g" >&6; }
21654if test "$ac_test_CXXFLAGS" = set; then
21655  CXXFLAGS=$ac_save_CXXFLAGS
21656elif test $ac_cv_prog_cxx_g = yes; then
21657  if test "$GXX" = yes; then
21658    CXXFLAGS="-g -O2"
21659  else
21660    CXXFLAGS="-g"
21661  fi
21662else
21663  if test "$GXX" = yes; then
21664    CXXFLAGS="-O2"
21665  else
21666    CXXFLAGS=
21667  fi
21668fi
21669ac_ext=cpp
21670ac_cpp='$CXXCPP $CPPFLAGS'
21671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21674
21675
21676### Locate other tools
21677
21678if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21679    ac_ext=m
21680ac_cpp='$OBJCPP $CPPFLAGS'
21681ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21682ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21683ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21684if test -n "$ac_tool_prefix"; then
21685  for ac_prog in gcc objcc objc cc CC
21686  do
21687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21690$as_echo_n "checking for $ac_word... " >&6; }
21691if test "${ac_cv_prog_OBJC+set}" = set; then :
21692  $as_echo_n "(cached) " >&6
21693else
21694  if test -n "$OBJC"; then
21695  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21696else
21697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21698for as_dir in $PATH
21699do
21700  IFS=$as_save_IFS
21701  test -z "$as_dir" && as_dir=.
21702    for ac_exec_ext in '' $ac_executable_extensions; do
21703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21704    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21706    break 2
21707  fi
21708done
21709  done
21710IFS=$as_save_IFS
21711
21712fi
21713fi
21714OBJC=$ac_cv_prog_OBJC
21715if test -n "$OBJC"; then
21716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21717$as_echo "$OBJC" >&6; }
21718else
21719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21720$as_echo "no" >&6; }
21721fi
21722
21723
21724    test -n "$OBJC" && break
21725  done
21726fi
21727if test -z "$OBJC"; then
21728  ac_ct_OBJC=$OBJC
21729  for ac_prog in gcc objcc objc cc CC
21730do
21731  # Extract the first word of "$ac_prog", so it can be a program name with args.
21732set dummy $ac_prog; ac_word=$2
21733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21734$as_echo_n "checking for $ac_word... " >&6; }
21735if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21736  $as_echo_n "(cached) " >&6
21737else
21738  if test -n "$ac_ct_OBJC"; then
21739  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21740else
21741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21742for as_dir in $PATH
21743do
21744  IFS=$as_save_IFS
21745  test -z "$as_dir" && as_dir=.
21746    for ac_exec_ext in '' $ac_executable_extensions; do
21747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21748    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21750    break 2
21751  fi
21752done
21753  done
21754IFS=$as_save_IFS
21755
21756fi
21757fi
21758ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21759if test -n "$ac_ct_OBJC"; then
21760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21761$as_echo "$ac_ct_OBJC" >&6; }
21762else
21763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21764$as_echo "no" >&6; }
21765fi
21766
21767
21768  test -n "$ac_ct_OBJC" && break
21769done
21770
21771  if test "x$ac_ct_OBJC" = x; then
21772    OBJC="gcc"
21773  else
21774    case $cross_compiling:$ac_tool_warned in
21775yes:)
21776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21778ac_tool_warned=yes ;;
21779esac
21780    OBJC=$ac_ct_OBJC
21781  fi
21782fi
21783
21784# Provide some information about the compiler.
21785$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21786set X $ac_compile
21787ac_compiler=$2
21788for ac_option in --version -v -V -qversion; do
21789  { { ac_try="$ac_compiler $ac_option >&5"
21790case "(($ac_try" in
21791  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21792  *) ac_try_echo=$ac_try;;
21793esac
21794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21795$as_echo "$ac_try_echo"; } >&5
21796  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21797  ac_status=$?
21798  if test -s conftest.err; then
21799    sed '10a\
21800... rest of stderr output deleted ...
21801         10q' conftest.err >conftest.er1
21802    cat conftest.er1 >&5
21803  fi
21804  rm -f conftest.er1 conftest.err
21805  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21806  test $ac_status = 0; }
21807done
21808
21809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21810$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21811if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21812  $as_echo_n "(cached) " >&6
21813else
21814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21815/* end confdefs.h.  */
21816
21817int
21818main ()
21819{
21820#ifndef __GNUC__
21821       choke me
21822#endif
21823
21824  ;
21825  return 0;
21826}
21827_ACEOF
21828if ac_fn_objc_try_compile "$LINENO"; then :
21829  ac_compiler_gnu=yes
21830else
21831  ac_compiler_gnu=no
21832fi
21833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21834ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21835
21836fi
21837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21838$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21839if test $ac_compiler_gnu = yes; then
21840  GOBJC=yes
21841else
21842  GOBJC=
21843fi
21844ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21845ac_save_OBJCFLAGS=$OBJCFLAGS
21846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21847$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21848if test "${ac_cv_prog_objc_g+set}" = set; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  ac_save_objc_werror_flag=$ac_objc_werror_flag
21852   ac_objc_werror_flag=yes
21853   ac_cv_prog_objc_g=no
21854   OBJCFLAGS="-g"
21855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21856/* end confdefs.h.  */
21857
21858int
21859main ()
21860{
21861
21862  ;
21863  return 0;
21864}
21865_ACEOF
21866if ac_fn_objc_try_compile "$LINENO"; then :
21867  ac_cv_prog_objc_g=yes
21868else
21869  OBJCFLAGS=""
21870      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21871/* end confdefs.h.  */
21872
21873int
21874main ()
21875{
21876
21877  ;
21878  return 0;
21879}
21880_ACEOF
21881if ac_fn_objc_try_compile "$LINENO"; then :
21882
21883else
21884  ac_objc_werror_flag=$ac_save_objc_werror_flag
21885	 OBJCFLAGS="-g"
21886	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21887/* end confdefs.h.  */
21888
21889int
21890main ()
21891{
21892
21893  ;
21894  return 0;
21895}
21896_ACEOF
21897if ac_fn_objc_try_compile "$LINENO"; then :
21898  ac_cv_prog_objc_g=yes
21899fi
21900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21901fi
21902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21903fi
21904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21905   ac_objc_werror_flag=$ac_save_objc_werror_flag
21906fi
21907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21908$as_echo "$ac_cv_prog_objc_g" >&6; }
21909if test "$ac_test_OBJCFLAGS" = set; then
21910  OBJCFLAGS=$ac_save_OBJCFLAGS
21911elif test $ac_cv_prog_objc_g = yes; then
21912  if test "$GOBJC" = yes; then
21913    OBJCFLAGS="-g -O2"
21914  else
21915    OBJCFLAGS="-g"
21916  fi
21917else
21918  if test "$GOBJC" = yes; then
21919    OBJCFLAGS="-O2"
21920  else
21921    OBJCFLAGS=
21922  fi
21923fi
21924ac_ext=cpp
21925ac_cpp='$CXXCPP $CPPFLAGS'
21926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21929
21930
21931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21932
21933  # First separate the path from the arguments. This will split at the first
21934  # space.
21935  complete="$OBJC"
21936  path="${complete%% *}"
21937  tmp="$complete EOL"
21938  arguments="${tmp#* }"
21939
21940  # Input might be given as Windows format, start by converting to
21941  # unix format.
21942  new_path=`$CYGPATH -u "$path"`
21943
21944  # Now try to locate executable using which
21945  new_path=`$WHICH "$new_path" 2> /dev/null`
21946  # bat and cmd files are not always considered executable in cygwin causing which
21947  # to not find them
21948  if test "x$new_path" = x \
21949           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21950           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21951    new_path=`$CYGPATH -u "$path"`
21952  fi
21953  if test "x$new_path" = x; then
21954    # Oops. Which didn't find the executable.
21955    # The splitting of arguments from the executable at a space might have been incorrect,
21956    # since paths with space are more likely in Windows. Give it another try with the whole
21957    # argument.
21958    path="$complete"
21959    arguments="EOL"
21960    new_path=`$CYGPATH -u "$path"`
21961    new_path=`$WHICH "$new_path" 2> /dev/null`
21962    # bat and cmd files are not always considered executable in cygwin causing which
21963    # to not find them
21964    if test "x$new_path" = x \
21965             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21966             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21967      new_path=`$CYGPATH -u "$path"`
21968    fi
21969    if test "x$new_path" = x; then
21970      # It's still not found. Now this is an unrecoverable error.
21971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21972$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21973      has_space=`$ECHO "$complete" | $GREP " "`
21974      if test "x$has_space" != x; then
21975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21977      fi
21978      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21979    fi
21980  fi
21981
21982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21985  # "foo.exe" is OK but "foo" is an error.
21986  #
21987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21988  # It is also a way to make sure we got the proper file name for the real test later on.
21989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21990  if test "x$test_shortpath" = x; then
21991    # Short path failed, file does not exist as specified.
21992    # Try adding .exe or .cmd
21993    if test -f "${new_path}.exe"; then
21994       input_to_shortpath="${new_path}.exe"
21995    elif test -f "${new_path}.cmd"; then
21996       input_to_shortpath="${new_path}.cmd"
21997    else
21998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21999$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22002      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22003    fi
22004  else
22005    input_to_shortpath="$new_path"
22006  fi
22007
22008  # Call helper function which possibly converts this using DOS-style short mode.
22009  # If so, the updated path is stored in $new_path.
22010  new_path="$input_to_shortpath"
22011
22012  input_path="$input_to_shortpath"
22013  # Check if we need to convert this using DOS-style short mode. If the path
22014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22015  # take no chances and rewrite it.
22016  # Note: m4 eats our [], so we need to use [ and ] instead.
22017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22018  if test "x$has_forbidden_chars" != x; then
22019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22023      # Going to short mode and back again did indeed matter. Since short mode is
22024      # case insensitive, let's make it lowercase to improve readability.
22025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22026      # Now convert it back to Unix-stile (cygpath)
22027      input_path=`$CYGPATH -u "$shortmode_path"`
22028      new_path="$input_path"
22029    fi
22030  fi
22031
22032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22033  if test "x$test_cygdrive_prefix" = x; then
22034    # As a simple fix, exclude /usr/bin since it's not a real path.
22035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22037      # a path prefixed by /cygdrive for fixpath to work.
22038      new_path="$CYGWIN_ROOT_PATH$input_path"
22039    fi
22040  fi
22041
22042  # remove trailing .exe if any
22043  new_path="${new_path/%.exe/}"
22044
22045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22046
22047  # First separate the path from the arguments. This will split at the first
22048  # space.
22049  complete="$OBJC"
22050  path="${complete%% *}"
22051  tmp="$complete EOL"
22052  arguments="${tmp#* }"
22053
22054  # Input might be given as Windows format, start by converting to
22055  # unix format.
22056  new_path="$path"
22057
22058  windows_path="$new_path"
22059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22060    unix_path=`$CYGPATH -u "$windows_path"`
22061    new_path="$unix_path"
22062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22064    new_path="$unix_path"
22065  fi
22066
22067
22068  # Now try to locate executable using which
22069  new_path=`$WHICH "$new_path" 2> /dev/null`
22070
22071  if test "x$new_path" = x; then
22072    # Oops. Which didn't find the executable.
22073    # The splitting of arguments from the executable at a space might have been incorrect,
22074    # since paths with space are more likely in Windows. Give it another try with the whole
22075    # argument.
22076    path="$complete"
22077    arguments="EOL"
22078    new_path="$path"
22079
22080  windows_path="$new_path"
22081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22082    unix_path=`$CYGPATH -u "$windows_path"`
22083    new_path="$unix_path"
22084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22086    new_path="$unix_path"
22087  fi
22088
22089
22090    new_path=`$WHICH "$new_path" 2> /dev/null`
22091
22092    if test "x$new_path" = x; then
22093      # It's still not found. Now this is an unrecoverable error.
22094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22095$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22096      has_space=`$ECHO "$complete" | $GREP " "`
22097      if test "x$has_space" != x; then
22098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22100      fi
22101      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22102    fi
22103  fi
22104
22105  # Now new_path has a complete unix path to the binary
22106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22107    # Keep paths in /bin as-is, but remove trailing .exe if any
22108    new_path="${new_path/%.exe/}"
22109    # Do not save /bin paths to all_fixpath_prefixes!
22110  else
22111    # Not in mixed or Windows style, start by that.
22112    new_path=`cmd //c echo $new_path`
22113
22114  input_path="$new_path"
22115  # Check if we need to convert this using DOS-style short mode. If the path
22116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22117  # take no chances and rewrite it.
22118  # Note: m4 eats our [], so we need to use [ and ] instead.
22119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22120  if test "x$has_forbidden_chars" != x; then
22121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22123  fi
22124
22125    # Output is in $new_path
22126
22127  windows_path="$new_path"
22128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22129    unix_path=`$CYGPATH -u "$windows_path"`
22130    new_path="$unix_path"
22131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22133    new_path="$unix_path"
22134  fi
22135
22136    # remove trailing .exe if any
22137    new_path="${new_path/%.exe/}"
22138
22139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22141  fi
22142
22143  else
22144    # We're on a posix platform. Hooray! :)
22145    # First separate the path from the arguments. This will split at the first
22146    # space.
22147    complete="$OBJC"
22148    path="${complete%% *}"
22149    tmp="$complete EOL"
22150    arguments="${tmp#* }"
22151
22152    # Cannot rely on the command "which" here since it doesn't always work.
22153    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22154    if test -z "$is_absolute_path"; then
22155      # Path to executable is not absolute. Find it.
22156      IFS_save="$IFS"
22157      IFS=:
22158      for p in $PATH; do
22159        if test -f "$p/$path" && test -x "$p/$path"; then
22160          new_path="$p/$path"
22161          break
22162        fi
22163      done
22164      IFS="$IFS_save"
22165    else
22166      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22167$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22168      new_path="$path"
22169    fi
22170
22171    if test "x$new_path" = x; then
22172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22173$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22174        has_space=`$ECHO "$complete" | $GREP " "`
22175        if test "x$has_space" != x; then
22176          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22178        fi
22179        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22180      fi
22181  fi
22182
22183      # Now join together the path and the arguments once again
22184      if test "x$arguments" != xEOL; then
22185        new_complete="$new_path ${arguments% *}"
22186      else
22187        new_complete="$new_path"
22188      fi
22189
22190  if test "x$complete" != "x$new_complete"; then
22191      OBJC="$new_complete"
22192      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22193$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22194    fi
22195
22196else
22197    OBJC=
22198fi
22199
22200# Restore the flags to the user specified values.
22201# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22202CFLAGS="$ORG_CFLAGS"
22203CXXFLAGS="$ORG_CXXFLAGS"
22204OBJCFLAGS="$ORG_OBJCFLAGS"
22205
22206LD="$CC"
22207LDEXE="$CC"
22208LDCXX="$CXX"
22209LDEXECXX="$CXX"
22210
22211# LDEXE is the linker to use, when creating executables.
22212
22213# Linking C++ libraries.
22214
22215# Linking C++ executables.
22216
22217
22218if test "x$OPENJDK_TARGET_OS" != xwindows; then
22219    if test -n "$ac_tool_prefix"; then
22220  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22221set dummy ${ac_tool_prefix}ar; ac_word=$2
22222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22223$as_echo_n "checking for $ac_word... " >&6; }
22224if test "${ac_cv_prog_AR+set}" = set; then :
22225  $as_echo_n "(cached) " >&6
22226else
22227  if test -n "$AR"; then
22228  ac_cv_prog_AR="$AR" # Let the user override the test.
22229else
22230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22231for as_dir in $PATH
22232do
22233  IFS=$as_save_IFS
22234  test -z "$as_dir" && as_dir=.
22235    for ac_exec_ext in '' $ac_executable_extensions; do
22236  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22237    ac_cv_prog_AR="${ac_tool_prefix}ar"
22238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22239    break 2
22240  fi
22241done
22242  done
22243IFS=$as_save_IFS
22244
22245fi
22246fi
22247AR=$ac_cv_prog_AR
22248if test -n "$AR"; then
22249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22250$as_echo "$AR" >&6; }
22251else
22252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22253$as_echo "no" >&6; }
22254fi
22255
22256
22257fi
22258if test -z "$ac_cv_prog_AR"; then
22259  ac_ct_AR=$AR
22260  # Extract the first word of "ar", so it can be a program name with args.
22261set dummy ar; ac_word=$2
22262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22263$as_echo_n "checking for $ac_word... " >&6; }
22264if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22265  $as_echo_n "(cached) " >&6
22266else
22267  if test -n "$ac_ct_AR"; then
22268  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22269else
22270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22271for as_dir in $PATH
22272do
22273  IFS=$as_save_IFS
22274  test -z "$as_dir" && as_dir=.
22275    for ac_exec_ext in '' $ac_executable_extensions; do
22276  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22277    ac_cv_prog_ac_ct_AR="ar"
22278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22279    break 2
22280  fi
22281done
22282  done
22283IFS=$as_save_IFS
22284
22285fi
22286fi
22287ac_ct_AR=$ac_cv_prog_ac_ct_AR
22288if test -n "$ac_ct_AR"; then
22289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22290$as_echo "$ac_ct_AR" >&6; }
22291else
22292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22293$as_echo "no" >&6; }
22294fi
22295
22296  if test "x$ac_ct_AR" = x; then
22297    AR=""
22298  else
22299    case $cross_compiling:$ac_tool_warned in
22300yes:)
22301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22303ac_tool_warned=yes ;;
22304esac
22305    AR=$ac_ct_AR
22306  fi
22307else
22308  AR="$ac_cv_prog_AR"
22309fi
22310
22311
22312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22313
22314  # First separate the path from the arguments. This will split at the first
22315  # space.
22316  complete="$AR"
22317  path="${complete%% *}"
22318  tmp="$complete EOL"
22319  arguments="${tmp#* }"
22320
22321  # Input might be given as Windows format, start by converting to
22322  # unix format.
22323  new_path=`$CYGPATH -u "$path"`
22324
22325  # Now try to locate executable using which
22326  new_path=`$WHICH "$new_path" 2> /dev/null`
22327  # bat and cmd files are not always considered executable in cygwin causing which
22328  # to not find them
22329  if test "x$new_path" = x \
22330           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22331           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22332    new_path=`$CYGPATH -u "$path"`
22333  fi
22334  if test "x$new_path" = x; then
22335    # Oops. Which didn't find the executable.
22336    # The splitting of arguments from the executable at a space might have been incorrect,
22337    # since paths with space are more likely in Windows. Give it another try with the whole
22338    # argument.
22339    path="$complete"
22340    arguments="EOL"
22341    new_path=`$CYGPATH -u "$path"`
22342    new_path=`$WHICH "$new_path" 2> /dev/null`
22343    # bat and cmd files are not always considered executable in cygwin causing which
22344    # to not find them
22345    if test "x$new_path" = x \
22346             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22347             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22348      new_path=`$CYGPATH -u "$path"`
22349    fi
22350    if test "x$new_path" = x; then
22351      # It's still not found. Now this is an unrecoverable error.
22352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22353$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22354      has_space=`$ECHO "$complete" | $GREP " "`
22355      if test "x$has_space" != x; then
22356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22358      fi
22359      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22360    fi
22361  fi
22362
22363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22366  # "foo.exe" is OK but "foo" is an error.
22367  #
22368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22369  # It is also a way to make sure we got the proper file name for the real test later on.
22370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22371  if test "x$test_shortpath" = x; then
22372    # Short path failed, file does not exist as specified.
22373    # Try adding .exe or .cmd
22374    if test -f "${new_path}.exe"; then
22375       input_to_shortpath="${new_path}.exe"
22376    elif test -f "${new_path}.cmd"; then
22377       input_to_shortpath="${new_path}.cmd"
22378    else
22379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22380$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22381      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22382$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22383      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22384    fi
22385  else
22386    input_to_shortpath="$new_path"
22387  fi
22388
22389  # Call helper function which possibly converts this using DOS-style short mode.
22390  # If so, the updated path is stored in $new_path.
22391  new_path="$input_to_shortpath"
22392
22393  input_path="$input_to_shortpath"
22394  # Check if we need to convert this using DOS-style short mode. If the path
22395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22396  # take no chances and rewrite it.
22397  # Note: m4 eats our [], so we need to use [ and ] instead.
22398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22399  if test "x$has_forbidden_chars" != x; then
22400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22404      # Going to short mode and back again did indeed matter. Since short mode is
22405      # case insensitive, let's make it lowercase to improve readability.
22406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22407      # Now convert it back to Unix-stile (cygpath)
22408      input_path=`$CYGPATH -u "$shortmode_path"`
22409      new_path="$input_path"
22410    fi
22411  fi
22412
22413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22414  if test "x$test_cygdrive_prefix" = x; then
22415    # As a simple fix, exclude /usr/bin since it's not a real path.
22416    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22418      # a path prefixed by /cygdrive for fixpath to work.
22419      new_path="$CYGWIN_ROOT_PATH$input_path"
22420    fi
22421  fi
22422
22423  # remove trailing .exe if any
22424  new_path="${new_path/%.exe/}"
22425
22426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22427
22428  # First separate the path from the arguments. This will split at the first
22429  # space.
22430  complete="$AR"
22431  path="${complete%% *}"
22432  tmp="$complete EOL"
22433  arguments="${tmp#* }"
22434
22435  # Input might be given as Windows format, start by converting to
22436  # unix format.
22437  new_path="$path"
22438
22439  windows_path="$new_path"
22440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22441    unix_path=`$CYGPATH -u "$windows_path"`
22442    new_path="$unix_path"
22443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22445    new_path="$unix_path"
22446  fi
22447
22448
22449  # Now try to locate executable using which
22450  new_path=`$WHICH "$new_path" 2> /dev/null`
22451
22452  if test "x$new_path" = x; then
22453    # Oops. Which didn't find the executable.
22454    # The splitting of arguments from the executable at a space might have been incorrect,
22455    # since paths with space are more likely in Windows. Give it another try with the whole
22456    # argument.
22457    path="$complete"
22458    arguments="EOL"
22459    new_path="$path"
22460
22461  windows_path="$new_path"
22462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22463    unix_path=`$CYGPATH -u "$windows_path"`
22464    new_path="$unix_path"
22465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22467    new_path="$unix_path"
22468  fi
22469
22470
22471    new_path=`$WHICH "$new_path" 2> /dev/null`
22472
22473    if test "x$new_path" = x; then
22474      # It's still not found. Now this is an unrecoverable error.
22475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22476$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22477      has_space=`$ECHO "$complete" | $GREP " "`
22478      if test "x$has_space" != x; then
22479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22481      fi
22482      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22483    fi
22484  fi
22485
22486  # Now new_path has a complete unix path to the binary
22487  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22488    # Keep paths in /bin as-is, but remove trailing .exe if any
22489    new_path="${new_path/%.exe/}"
22490    # Do not save /bin paths to all_fixpath_prefixes!
22491  else
22492    # Not in mixed or Windows style, start by that.
22493    new_path=`cmd //c echo $new_path`
22494
22495  input_path="$new_path"
22496  # Check if we need to convert this using DOS-style short mode. If the path
22497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22498  # take no chances and rewrite it.
22499  # Note: m4 eats our [], so we need to use [ and ] instead.
22500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22501  if test "x$has_forbidden_chars" != x; then
22502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22504  fi
22505
22506    # Output is in $new_path
22507
22508  windows_path="$new_path"
22509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22510    unix_path=`$CYGPATH -u "$windows_path"`
22511    new_path="$unix_path"
22512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22514    new_path="$unix_path"
22515  fi
22516
22517    # remove trailing .exe if any
22518    new_path="${new_path/%.exe/}"
22519
22520    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22521    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22522  fi
22523
22524  else
22525    # We're on a posix platform. Hooray! :)
22526    # First separate the path from the arguments. This will split at the first
22527    # space.
22528    complete="$AR"
22529    path="${complete%% *}"
22530    tmp="$complete EOL"
22531    arguments="${tmp#* }"
22532
22533    # Cannot rely on the command "which" here since it doesn't always work.
22534    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22535    if test -z "$is_absolute_path"; then
22536      # Path to executable is not absolute. Find it.
22537      IFS_save="$IFS"
22538      IFS=:
22539      for p in $PATH; do
22540        if test -f "$p/$path" && test -x "$p/$path"; then
22541          new_path="$p/$path"
22542          break
22543        fi
22544      done
22545      IFS="$IFS_save"
22546    else
22547      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22548$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22549      new_path="$path"
22550    fi
22551
22552    if test "x$new_path" = x; then
22553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22554$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22555        has_space=`$ECHO "$complete" | $GREP " "`
22556        if test "x$has_space" != x; then
22557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22559        fi
22560        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22561      fi
22562  fi
22563
22564      # Now join together the path and the arguments once again
22565      if test "x$arguments" != xEOL; then
22566        new_complete="$new_path ${arguments% *}"
22567      else
22568        new_complete="$new_path"
22569      fi
22570
22571  if test "x$complete" != "x$new_complete"; then
22572      AR="$new_complete"
22573      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22574$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22575    fi
22576
22577fi
22578if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22579    ARFLAGS="-r"
22580else
22581    ARFLAGS=""
22582fi
22583
22584
22585# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22586HOTSPOT_CXX="$CXX"
22587HOTSPOT_LD="$LD"
22588
22589
22590
22591COMPILER_NAME=gcc
22592COMPILER_TYPE=CC
22593if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22594
22595    # For now, assume that we are always compiling using cl.exe.
22596    CC_OUT_OPTION=-Fo
22597    EXE_OUT_OPTION=-out:
22598    LD_OUT_OPTION=-out:
22599    AR_OUT_OPTION=-out:
22600    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22601    # program for something completely different.
22602    # Extract the first word of "link", so it can be a program name with args.
22603set dummy link; ac_word=$2
22604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22605$as_echo_n "checking for $ac_word... " >&6; }
22606if test "${ac_cv_prog_WINLD+set}" = set; then :
22607  $as_echo_n "(cached) " >&6
22608else
22609  if test -n "$WINLD"; then
22610  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22611else
22612  ac_prog_rejected=no
22613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22614for as_dir in $PATH
22615do
22616  IFS=$as_save_IFS
22617  test -z "$as_dir" && as_dir=.
22618    for ac_exec_ext in '' $ac_executable_extensions; do
22619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22620    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22621       ac_prog_rejected=yes
22622       continue
22623     fi
22624    ac_cv_prog_WINLD="link"
22625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22626    break 2
22627  fi
22628done
22629  done
22630IFS=$as_save_IFS
22631
22632if test $ac_prog_rejected = yes; then
22633  # We found a bogon in the path, so make sure we never use it.
22634  set dummy $ac_cv_prog_WINLD
22635  shift
22636  if test $# != 0; then
22637    # We chose a different compiler from the bogus one.
22638    # However, it has the same basename, so the bogon will be chosen
22639    # first if we set WINLD to just the basename; use the full file name.
22640    shift
22641    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22642  fi
22643fi
22644fi
22645fi
22646WINLD=$ac_cv_prog_WINLD
22647if test -n "$WINLD"; then
22648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22649$as_echo "$WINLD" >&6; }
22650else
22651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22652$as_echo "no" >&6; }
22653fi
22654
22655
22656    # Since we must ignore the first found link, WINLD will contain
22657    # the full path to the link.exe program.
22658
22659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22660
22661  # First separate the path from the arguments. This will split at the first
22662  # space.
22663  complete="$WINLD"
22664  path="${complete%% *}"
22665  tmp="$complete EOL"
22666  arguments="${tmp#* }"
22667
22668  # Input might be given as Windows format, start by converting to
22669  # unix format.
22670  new_path=`$CYGPATH -u "$path"`
22671
22672  # Now try to locate executable using which
22673  new_path=`$WHICH "$new_path" 2> /dev/null`
22674  # bat and cmd files are not always considered executable in cygwin causing which
22675  # to not find them
22676  if test "x$new_path" = x \
22677           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22678           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22679    new_path=`$CYGPATH -u "$path"`
22680  fi
22681  if test "x$new_path" = x; then
22682    # Oops. Which didn't find the executable.
22683    # The splitting of arguments from the executable at a space might have been incorrect,
22684    # since paths with space are more likely in Windows. Give it another try with the whole
22685    # argument.
22686    path="$complete"
22687    arguments="EOL"
22688    new_path=`$CYGPATH -u "$path"`
22689    new_path=`$WHICH "$new_path" 2> /dev/null`
22690    # bat and cmd files are not always considered executable in cygwin causing which
22691    # to not find them
22692    if test "x$new_path" = x \
22693             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22694             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22695      new_path=`$CYGPATH -u "$path"`
22696    fi
22697    if test "x$new_path" = x; then
22698      # It's still not found. Now this is an unrecoverable error.
22699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22700$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22701      has_space=`$ECHO "$complete" | $GREP " "`
22702      if test "x$has_space" != x; then
22703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22705      fi
22706      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22707    fi
22708  fi
22709
22710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22713  # "foo.exe" is OK but "foo" is an error.
22714  #
22715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22716  # It is also a way to make sure we got the proper file name for the real test later on.
22717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22718  if test "x$test_shortpath" = x; then
22719    # Short path failed, file does not exist as specified.
22720    # Try adding .exe or .cmd
22721    if test -f "${new_path}.exe"; then
22722       input_to_shortpath="${new_path}.exe"
22723    elif test -f "${new_path}.cmd"; then
22724       input_to_shortpath="${new_path}.cmd"
22725    else
22726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22727$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22730      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22731    fi
22732  else
22733    input_to_shortpath="$new_path"
22734  fi
22735
22736  # Call helper function which possibly converts this using DOS-style short mode.
22737  # If so, the updated path is stored in $new_path.
22738  new_path="$input_to_shortpath"
22739
22740  input_path="$input_to_shortpath"
22741  # Check if we need to convert this using DOS-style short mode. If the path
22742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22743  # take no chances and rewrite it.
22744  # Note: m4 eats our [], so we need to use [ and ] instead.
22745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22746  if test "x$has_forbidden_chars" != x; then
22747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22751      # Going to short mode and back again did indeed matter. Since short mode is
22752      # case insensitive, let's make it lowercase to improve readability.
22753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22754      # Now convert it back to Unix-stile (cygpath)
22755      input_path=`$CYGPATH -u "$shortmode_path"`
22756      new_path="$input_path"
22757    fi
22758  fi
22759
22760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22761  if test "x$test_cygdrive_prefix" = x; then
22762    # As a simple fix, exclude /usr/bin since it's not a real path.
22763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22765      # a path prefixed by /cygdrive for fixpath to work.
22766      new_path="$CYGWIN_ROOT_PATH$input_path"
22767    fi
22768  fi
22769
22770  # remove trailing .exe if any
22771  new_path="${new_path/%.exe/}"
22772
22773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22774
22775  # First separate the path from the arguments. This will split at the first
22776  # space.
22777  complete="$WINLD"
22778  path="${complete%% *}"
22779  tmp="$complete EOL"
22780  arguments="${tmp#* }"
22781
22782  # Input might be given as Windows format, start by converting to
22783  # unix format.
22784  new_path="$path"
22785
22786  windows_path="$new_path"
22787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22788    unix_path=`$CYGPATH -u "$windows_path"`
22789    new_path="$unix_path"
22790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22792    new_path="$unix_path"
22793  fi
22794
22795
22796  # Now try to locate executable using which
22797  new_path=`$WHICH "$new_path" 2> /dev/null`
22798
22799  if test "x$new_path" = x; then
22800    # Oops. Which didn't find the executable.
22801    # The splitting of arguments from the executable at a space might have been incorrect,
22802    # since paths with space are more likely in Windows. Give it another try with the whole
22803    # argument.
22804    path="$complete"
22805    arguments="EOL"
22806    new_path="$path"
22807
22808  windows_path="$new_path"
22809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22810    unix_path=`$CYGPATH -u "$windows_path"`
22811    new_path="$unix_path"
22812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22814    new_path="$unix_path"
22815  fi
22816
22817
22818    new_path=`$WHICH "$new_path" 2> /dev/null`
22819
22820    if test "x$new_path" = x; then
22821      # It's still not found. Now this is an unrecoverable error.
22822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22823$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22824      has_space=`$ECHO "$complete" | $GREP " "`
22825      if test "x$has_space" != x; then
22826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22828      fi
22829      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22830    fi
22831  fi
22832
22833  # Now new_path has a complete unix path to the binary
22834  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22835    # Keep paths in /bin as-is, but remove trailing .exe if any
22836    new_path="${new_path/%.exe/}"
22837    # Do not save /bin paths to all_fixpath_prefixes!
22838  else
22839    # Not in mixed or Windows style, start by that.
22840    new_path=`cmd //c echo $new_path`
22841
22842  input_path="$new_path"
22843  # Check if we need to convert this using DOS-style short mode. If the path
22844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22845  # take no chances and rewrite it.
22846  # Note: m4 eats our [], so we need to use [ and ] instead.
22847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22848  if test "x$has_forbidden_chars" != x; then
22849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22851  fi
22852
22853    # Output is in $new_path
22854
22855  windows_path="$new_path"
22856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22857    unix_path=`$CYGPATH -u "$windows_path"`
22858    new_path="$unix_path"
22859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22861    new_path="$unix_path"
22862  fi
22863
22864    # remove trailing .exe if any
22865    new_path="${new_path/%.exe/}"
22866
22867    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22868    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22869  fi
22870
22871  else
22872    # We're on a posix platform. Hooray! :)
22873    # First separate the path from the arguments. This will split at the first
22874    # space.
22875    complete="$WINLD"
22876    path="${complete%% *}"
22877    tmp="$complete EOL"
22878    arguments="${tmp#* }"
22879
22880    # Cannot rely on the command "which" here since it doesn't always work.
22881    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22882    if test -z "$is_absolute_path"; then
22883      # Path to executable is not absolute. Find it.
22884      IFS_save="$IFS"
22885      IFS=:
22886      for p in $PATH; do
22887        if test -f "$p/$path" && test -x "$p/$path"; then
22888          new_path="$p/$path"
22889          break
22890        fi
22891      done
22892      IFS="$IFS_save"
22893    else
22894      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22895$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22896      new_path="$path"
22897    fi
22898
22899    if test "x$new_path" = x; then
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22901$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22902        has_space=`$ECHO "$complete" | $GREP " "`
22903        if test "x$has_space" != x; then
22904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22906        fi
22907        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22908      fi
22909  fi
22910
22911      # Now join together the path and the arguments once again
22912      if test "x$arguments" != xEOL; then
22913        new_complete="$new_path ${arguments% *}"
22914      else
22915        new_complete="$new_path"
22916      fi
22917
22918  if test "x$complete" != "x$new_complete"; then
22919      WINLD="$new_complete"
22920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22921$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22922    fi
22923
22924    printf "Windows linker was found at $WINLD\n"
22925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22926$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22927    "$WINLD" --version > /dev/null
22928    if test $? -eq 0 ; then
22929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22930$as_echo "no" >&6; }
22931      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22932    else
22933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22934$as_echo "yes" >&6; }
22935    fi
22936    LD="$WINLD"
22937    LDEXE="$WINLD"
22938    LDCXX="$WINLD"
22939    LDEXECXX="$WINLD"
22940
22941    # Extract the first word of "mt", so it can be a program name with args.
22942set dummy mt; ac_word=$2
22943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22944$as_echo_n "checking for $ac_word... " >&6; }
22945if test "${ac_cv_prog_MT+set}" = set; then :
22946  $as_echo_n "(cached) " >&6
22947else
22948  if test -n "$MT"; then
22949  ac_cv_prog_MT="$MT" # Let the user override the test.
22950else
22951  ac_prog_rejected=no
22952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22953for as_dir in $PATH
22954do
22955  IFS=$as_save_IFS
22956  test -z "$as_dir" && as_dir=.
22957    for ac_exec_ext in '' $ac_executable_extensions; do
22958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22959    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22960       ac_prog_rejected=yes
22961       continue
22962     fi
22963    ac_cv_prog_MT="mt"
22964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22965    break 2
22966  fi
22967done
22968  done
22969IFS=$as_save_IFS
22970
22971if test $ac_prog_rejected = yes; then
22972  # We found a bogon in the path, so make sure we never use it.
22973  set dummy $ac_cv_prog_MT
22974  shift
22975  if test $# != 0; then
22976    # We chose a different compiler from the bogus one.
22977    # However, it has the same basename, so the bogon will be chosen
22978    # first if we set MT to just the basename; use the full file name.
22979    shift
22980    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22981  fi
22982fi
22983fi
22984fi
22985MT=$ac_cv_prog_MT
22986if test -n "$MT"; then
22987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22988$as_echo "$MT" >&6; }
22989else
22990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22991$as_echo "no" >&6; }
22992fi
22993
22994
22995
22996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22997
22998  # First separate the path from the arguments. This will split at the first
22999  # space.
23000  complete="$MT"
23001  path="${complete%% *}"
23002  tmp="$complete EOL"
23003  arguments="${tmp#* }"
23004
23005  # Input might be given as Windows format, start by converting to
23006  # unix format.
23007  new_path=`$CYGPATH -u "$path"`
23008
23009  # Now try to locate executable using which
23010  new_path=`$WHICH "$new_path" 2> /dev/null`
23011  # bat and cmd files are not always considered executable in cygwin causing which
23012  # to not find them
23013  if test "x$new_path" = x \
23014           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23015           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23016    new_path=`$CYGPATH -u "$path"`
23017  fi
23018  if test "x$new_path" = x; then
23019    # Oops. Which didn't find the executable.
23020    # The splitting of arguments from the executable at a space might have been incorrect,
23021    # since paths with space are more likely in Windows. Give it another try with the whole
23022    # argument.
23023    path="$complete"
23024    arguments="EOL"
23025    new_path=`$CYGPATH -u "$path"`
23026    new_path=`$WHICH "$new_path" 2> /dev/null`
23027    # bat and cmd files are not always considered executable in cygwin causing which
23028    # to not find them
23029    if test "x$new_path" = x \
23030             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23031             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23032      new_path=`$CYGPATH -u "$path"`
23033    fi
23034    if test "x$new_path" = x; then
23035      # It's still not found. Now this is an unrecoverable error.
23036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23037$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23038      has_space=`$ECHO "$complete" | $GREP " "`
23039      if test "x$has_space" != x; then
23040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23042      fi
23043      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23044    fi
23045  fi
23046
23047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23050  # "foo.exe" is OK but "foo" is an error.
23051  #
23052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23053  # It is also a way to make sure we got the proper file name for the real test later on.
23054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23055  if test "x$test_shortpath" = x; then
23056    # Short path failed, file does not exist as specified.
23057    # Try adding .exe or .cmd
23058    if test -f "${new_path}.exe"; then
23059       input_to_shortpath="${new_path}.exe"
23060    elif test -f "${new_path}.cmd"; then
23061       input_to_shortpath="${new_path}.cmd"
23062    else
23063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23064$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23067      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23068    fi
23069  else
23070    input_to_shortpath="$new_path"
23071  fi
23072
23073  # Call helper function which possibly converts this using DOS-style short mode.
23074  # If so, the updated path is stored in $new_path.
23075  new_path="$input_to_shortpath"
23076
23077  input_path="$input_to_shortpath"
23078  # Check if we need to convert this using DOS-style short mode. If the path
23079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23080  # take no chances and rewrite it.
23081  # Note: m4 eats our [], so we need to use [ and ] instead.
23082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23083  if test "x$has_forbidden_chars" != x; then
23084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23088      # Going to short mode and back again did indeed matter. Since short mode is
23089      # case insensitive, let's make it lowercase to improve readability.
23090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23091      # Now convert it back to Unix-stile (cygpath)
23092      input_path=`$CYGPATH -u "$shortmode_path"`
23093      new_path="$input_path"
23094    fi
23095  fi
23096
23097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23098  if test "x$test_cygdrive_prefix" = x; then
23099    # As a simple fix, exclude /usr/bin since it's not a real path.
23100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23102      # a path prefixed by /cygdrive for fixpath to work.
23103      new_path="$CYGWIN_ROOT_PATH$input_path"
23104    fi
23105  fi
23106
23107  # remove trailing .exe if any
23108  new_path="${new_path/%.exe/}"
23109
23110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23111
23112  # First separate the path from the arguments. This will split at the first
23113  # space.
23114  complete="$MT"
23115  path="${complete%% *}"
23116  tmp="$complete EOL"
23117  arguments="${tmp#* }"
23118
23119  # Input might be given as Windows format, start by converting to
23120  # unix format.
23121  new_path="$path"
23122
23123  windows_path="$new_path"
23124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23125    unix_path=`$CYGPATH -u "$windows_path"`
23126    new_path="$unix_path"
23127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23129    new_path="$unix_path"
23130  fi
23131
23132
23133  # Now try to locate executable using which
23134  new_path=`$WHICH "$new_path" 2> /dev/null`
23135
23136  if test "x$new_path" = x; then
23137    # Oops. Which didn't find the executable.
23138    # The splitting of arguments from the executable at a space might have been incorrect,
23139    # since paths with space are more likely in Windows. Give it another try with the whole
23140    # argument.
23141    path="$complete"
23142    arguments="EOL"
23143    new_path="$path"
23144
23145  windows_path="$new_path"
23146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23147    unix_path=`$CYGPATH -u "$windows_path"`
23148    new_path="$unix_path"
23149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23151    new_path="$unix_path"
23152  fi
23153
23154
23155    new_path=`$WHICH "$new_path" 2> /dev/null`
23156
23157    if test "x$new_path" = x; then
23158      # It's still not found. Now this is an unrecoverable error.
23159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23160$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23161      has_space=`$ECHO "$complete" | $GREP " "`
23162      if test "x$has_space" != x; then
23163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23165      fi
23166      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23167    fi
23168  fi
23169
23170  # Now new_path has a complete unix path to the binary
23171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23172    # Keep paths in /bin as-is, but remove trailing .exe if any
23173    new_path="${new_path/%.exe/}"
23174    # Do not save /bin paths to all_fixpath_prefixes!
23175  else
23176    # Not in mixed or Windows style, start by that.
23177    new_path=`cmd //c echo $new_path`
23178
23179  input_path="$new_path"
23180  # Check if we need to convert this using DOS-style short mode. If the path
23181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23182  # take no chances and rewrite it.
23183  # Note: m4 eats our [], so we need to use [ and ] instead.
23184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23185  if test "x$has_forbidden_chars" != x; then
23186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23188  fi
23189
23190    # Output is in $new_path
23191
23192  windows_path="$new_path"
23193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23194    unix_path=`$CYGPATH -u "$windows_path"`
23195    new_path="$unix_path"
23196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23198    new_path="$unix_path"
23199  fi
23200
23201    # remove trailing .exe if any
23202    new_path="${new_path/%.exe/}"
23203
23204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23206  fi
23207
23208  else
23209    # We're on a posix platform. Hooray! :)
23210    # First separate the path from the arguments. This will split at the first
23211    # space.
23212    complete="$MT"
23213    path="${complete%% *}"
23214    tmp="$complete EOL"
23215    arguments="${tmp#* }"
23216
23217    # Cannot rely on the command "which" here since it doesn't always work.
23218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23219    if test -z "$is_absolute_path"; then
23220      # Path to executable is not absolute. Find it.
23221      IFS_save="$IFS"
23222      IFS=:
23223      for p in $PATH; do
23224        if test -f "$p/$path" && test -x "$p/$path"; then
23225          new_path="$p/$path"
23226          break
23227        fi
23228      done
23229      IFS="$IFS_save"
23230    else
23231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23232$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23233      new_path="$path"
23234    fi
23235
23236    if test "x$new_path" = x; then
23237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23238$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23239        has_space=`$ECHO "$complete" | $GREP " "`
23240        if test "x$has_space" != x; then
23241          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23243        fi
23244        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23245      fi
23246  fi
23247
23248      # Now join together the path and the arguments once again
23249      if test "x$arguments" != xEOL; then
23250        new_complete="$new_path ${arguments% *}"
23251      else
23252        new_complete="$new_path"
23253      fi
23254
23255  if test "x$complete" != "x$new_complete"; then
23256      MT="$new_complete"
23257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23258$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23259    fi
23260
23261    # The resource compiler
23262    # Extract the first word of "rc", so it can be a program name with args.
23263set dummy rc; ac_word=$2
23264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23265$as_echo_n "checking for $ac_word... " >&6; }
23266if test "${ac_cv_prog_RC+set}" = set; then :
23267  $as_echo_n "(cached) " >&6
23268else
23269  if test -n "$RC"; then
23270  ac_cv_prog_RC="$RC" # Let the user override the test.
23271else
23272  ac_prog_rejected=no
23273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23274for as_dir in $PATH
23275do
23276  IFS=$as_save_IFS
23277  test -z "$as_dir" && as_dir=.
23278    for ac_exec_ext in '' $ac_executable_extensions; do
23279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23280    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23281       ac_prog_rejected=yes
23282       continue
23283     fi
23284    ac_cv_prog_RC="rc"
23285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23286    break 2
23287  fi
23288done
23289  done
23290IFS=$as_save_IFS
23291
23292if test $ac_prog_rejected = yes; then
23293  # We found a bogon in the path, so make sure we never use it.
23294  set dummy $ac_cv_prog_RC
23295  shift
23296  if test $# != 0; then
23297    # We chose a different compiler from the bogus one.
23298    # However, it has the same basename, so the bogon will be chosen
23299    # first if we set RC to just the basename; use the full file name.
23300    shift
23301    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23302  fi
23303fi
23304fi
23305fi
23306RC=$ac_cv_prog_RC
23307if test -n "$RC"; then
23308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23309$as_echo "$RC" >&6; }
23310else
23311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23312$as_echo "no" >&6; }
23313fi
23314
23315
23316
23317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23318
23319  # First separate the path from the arguments. This will split at the first
23320  # space.
23321  complete="$RC"
23322  path="${complete%% *}"
23323  tmp="$complete EOL"
23324  arguments="${tmp#* }"
23325
23326  # Input might be given as Windows format, start by converting to
23327  # unix format.
23328  new_path=`$CYGPATH -u "$path"`
23329
23330  # Now try to locate executable using which
23331  new_path=`$WHICH "$new_path" 2> /dev/null`
23332  # bat and cmd files are not always considered executable in cygwin causing which
23333  # to not find them
23334  if test "x$new_path" = x \
23335           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23336           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23337    new_path=`$CYGPATH -u "$path"`
23338  fi
23339  if test "x$new_path" = x; then
23340    # Oops. Which didn't find the executable.
23341    # The splitting of arguments from the executable at a space might have been incorrect,
23342    # since paths with space are more likely in Windows. Give it another try with the whole
23343    # argument.
23344    path="$complete"
23345    arguments="EOL"
23346    new_path=`$CYGPATH -u "$path"`
23347    new_path=`$WHICH "$new_path" 2> /dev/null`
23348    # bat and cmd files are not always considered executable in cygwin causing which
23349    # to not find them
23350    if test "x$new_path" = x \
23351             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23352             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23353      new_path=`$CYGPATH -u "$path"`
23354    fi
23355    if test "x$new_path" = x; then
23356      # It's still not found. Now this is an unrecoverable error.
23357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23358$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23359      has_space=`$ECHO "$complete" | $GREP " "`
23360      if test "x$has_space" != x; then
23361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23363      fi
23364      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23365    fi
23366  fi
23367
23368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23371  # "foo.exe" is OK but "foo" is an error.
23372  #
23373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23374  # It is also a way to make sure we got the proper file name for the real test later on.
23375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23376  if test "x$test_shortpath" = x; then
23377    # Short path failed, file does not exist as specified.
23378    # Try adding .exe or .cmd
23379    if test -f "${new_path}.exe"; then
23380       input_to_shortpath="${new_path}.exe"
23381    elif test -f "${new_path}.cmd"; then
23382       input_to_shortpath="${new_path}.cmd"
23383    else
23384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23385$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23388      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23389    fi
23390  else
23391    input_to_shortpath="$new_path"
23392  fi
23393
23394  # Call helper function which possibly converts this using DOS-style short mode.
23395  # If so, the updated path is stored in $new_path.
23396  new_path="$input_to_shortpath"
23397
23398  input_path="$input_to_shortpath"
23399  # Check if we need to convert this using DOS-style short mode. If the path
23400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23401  # take no chances and rewrite it.
23402  # Note: m4 eats our [], so we need to use [ and ] instead.
23403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23404  if test "x$has_forbidden_chars" != x; then
23405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23409      # Going to short mode and back again did indeed matter. Since short mode is
23410      # case insensitive, let's make it lowercase to improve readability.
23411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23412      # Now convert it back to Unix-stile (cygpath)
23413      input_path=`$CYGPATH -u "$shortmode_path"`
23414      new_path="$input_path"
23415    fi
23416  fi
23417
23418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23419  if test "x$test_cygdrive_prefix" = x; then
23420    # As a simple fix, exclude /usr/bin since it's not a real path.
23421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23423      # a path prefixed by /cygdrive for fixpath to work.
23424      new_path="$CYGWIN_ROOT_PATH$input_path"
23425    fi
23426  fi
23427
23428  # remove trailing .exe if any
23429  new_path="${new_path/%.exe/}"
23430
23431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23432
23433  # First separate the path from the arguments. This will split at the first
23434  # space.
23435  complete="$RC"
23436  path="${complete%% *}"
23437  tmp="$complete EOL"
23438  arguments="${tmp#* }"
23439
23440  # Input might be given as Windows format, start by converting to
23441  # unix format.
23442  new_path="$path"
23443
23444  windows_path="$new_path"
23445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23446    unix_path=`$CYGPATH -u "$windows_path"`
23447    new_path="$unix_path"
23448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23450    new_path="$unix_path"
23451  fi
23452
23453
23454  # Now try to locate executable using which
23455  new_path=`$WHICH "$new_path" 2> /dev/null`
23456
23457  if test "x$new_path" = x; then
23458    # Oops. Which didn't find the executable.
23459    # The splitting of arguments from the executable at a space might have been incorrect,
23460    # since paths with space are more likely in Windows. Give it another try with the whole
23461    # argument.
23462    path="$complete"
23463    arguments="EOL"
23464    new_path="$path"
23465
23466  windows_path="$new_path"
23467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23468    unix_path=`$CYGPATH -u "$windows_path"`
23469    new_path="$unix_path"
23470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23472    new_path="$unix_path"
23473  fi
23474
23475
23476    new_path=`$WHICH "$new_path" 2> /dev/null`
23477
23478    if test "x$new_path" = x; then
23479      # It's still not found. Now this is an unrecoverable error.
23480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23481$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23482      has_space=`$ECHO "$complete" | $GREP " "`
23483      if test "x$has_space" != x; then
23484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23486      fi
23487      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23488    fi
23489  fi
23490
23491  # Now new_path has a complete unix path to the binary
23492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23493    # Keep paths in /bin as-is, but remove trailing .exe if any
23494    new_path="${new_path/%.exe/}"
23495    # Do not save /bin paths to all_fixpath_prefixes!
23496  else
23497    # Not in mixed or Windows style, start by that.
23498    new_path=`cmd //c echo $new_path`
23499
23500  input_path="$new_path"
23501  # Check if we need to convert this using DOS-style short mode. If the path
23502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23503  # take no chances and rewrite it.
23504  # Note: m4 eats our [], so we need to use [ and ] instead.
23505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23506  if test "x$has_forbidden_chars" != x; then
23507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23509  fi
23510
23511    # Output is in $new_path
23512
23513  windows_path="$new_path"
23514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23515    unix_path=`$CYGPATH -u "$windows_path"`
23516    new_path="$unix_path"
23517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23519    new_path="$unix_path"
23520  fi
23521
23522    # remove trailing .exe if any
23523    new_path="${new_path/%.exe/}"
23524
23525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23527  fi
23528
23529  else
23530    # We're on a posix platform. Hooray! :)
23531    # First separate the path from the arguments. This will split at the first
23532    # space.
23533    complete="$RC"
23534    path="${complete%% *}"
23535    tmp="$complete EOL"
23536    arguments="${tmp#* }"
23537
23538    # Cannot rely on the command "which" here since it doesn't always work.
23539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23540    if test -z "$is_absolute_path"; then
23541      # Path to executable is not absolute. Find it.
23542      IFS_save="$IFS"
23543      IFS=:
23544      for p in $PATH; do
23545        if test -f "$p/$path" && test -x "$p/$path"; then
23546          new_path="$p/$path"
23547          break
23548        fi
23549      done
23550      IFS="$IFS_save"
23551    else
23552      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23553$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23554      new_path="$path"
23555    fi
23556
23557    if test "x$new_path" = x; then
23558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23559$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23560        has_space=`$ECHO "$complete" | $GREP " "`
23561        if test "x$has_space" != x; then
23562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23564        fi
23565        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23566      fi
23567  fi
23568
23569      # Now join together the path and the arguments once again
23570      if test "x$arguments" != xEOL; then
23571        new_complete="$new_path ${arguments% *}"
23572      else
23573        new_complete="$new_path"
23574      fi
23575
23576  if test "x$complete" != "x$new_complete"; then
23577      RC="$new_complete"
23578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23579$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23580    fi
23581
23582
23583    # For hotspot, we need these in Windows mixed path,
23584    # so rewrite them all. Need added .exe suffix.
23585    HOTSPOT_CXX="$CXX.exe"
23586    HOTSPOT_LD="$LD.exe"
23587    HOTSPOT_MT="$MT.exe"
23588    HOTSPOT_RC="$RC.exe"
23589
23590  unix_path="$HOTSPOT_CXX"
23591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23592    windows_path=`$CYGPATH -m "$unix_path"`
23593    HOTSPOT_CXX="$windows_path"
23594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23595    windows_path=`cmd //c echo $unix_path`
23596    HOTSPOT_CXX="$windows_path"
23597  fi
23598
23599
23600  unix_path="$HOTSPOT_LD"
23601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23602    windows_path=`$CYGPATH -m "$unix_path"`
23603    HOTSPOT_LD="$windows_path"
23604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23605    windows_path=`cmd //c echo $unix_path`
23606    HOTSPOT_LD="$windows_path"
23607  fi
23608
23609
23610  unix_path="$HOTSPOT_MT"
23611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23612    windows_path=`$CYGPATH -m "$unix_path"`
23613    HOTSPOT_MT="$windows_path"
23614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23615    windows_path=`cmd //c echo $unix_path`
23616    HOTSPOT_MT="$windows_path"
23617  fi
23618
23619
23620  unix_path="$HOTSPOT_RC"
23621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23622    windows_path=`$CYGPATH -m "$unix_path"`
23623    HOTSPOT_RC="$windows_path"
23624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23625    windows_path=`cmd //c echo $unix_path`
23626    HOTSPOT_RC="$windows_path"
23627  fi
23628
23629
23630
23631
23632    RC_FLAGS="-nologo -l 0x409 -r"
23633    if test "x$VARIANT" = xOPT; then :
23634
23635        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23636
23637fi
23638    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23639    if test "x$JDK_UPDATE_VERSION" = x; then :
23640
23641        JDK_UPDATE_VERSION_NOTNULL=0
23642
23643fi
23644    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23645    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23646    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23647    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23648    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23649    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23650    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23651
23652    # lib.exe is used to create static libraries.
23653    # Extract the first word of "lib", so it can be a program name with args.
23654set dummy lib; ac_word=$2
23655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23656$as_echo_n "checking for $ac_word... " >&6; }
23657if test "${ac_cv_prog_WINAR+set}" = set; then :
23658  $as_echo_n "(cached) " >&6
23659else
23660  if test -n "$WINAR"; then
23661  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23662else
23663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23664for as_dir in $PATH
23665do
23666  IFS=$as_save_IFS
23667  test -z "$as_dir" && as_dir=.
23668    for ac_exec_ext in '' $ac_executable_extensions; do
23669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23670    ac_cv_prog_WINAR="lib"
23671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23672    break 2
23673  fi
23674done
23675  done
23676IFS=$as_save_IFS
23677
23678fi
23679fi
23680WINAR=$ac_cv_prog_WINAR
23681if test -n "$WINAR"; then
23682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23683$as_echo "$WINAR" >&6; }
23684else
23685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23686$as_echo "no" >&6; }
23687fi
23688
23689
23690
23691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23692
23693  # First separate the path from the arguments. This will split at the first
23694  # space.
23695  complete="$WINAR"
23696  path="${complete%% *}"
23697  tmp="$complete EOL"
23698  arguments="${tmp#* }"
23699
23700  # Input might be given as Windows format, start by converting to
23701  # unix format.
23702  new_path=`$CYGPATH -u "$path"`
23703
23704  # Now try to locate executable using which
23705  new_path=`$WHICH "$new_path" 2> /dev/null`
23706  # bat and cmd files are not always considered executable in cygwin causing which
23707  # to not find them
23708  if test "x$new_path" = x \
23709           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23710           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23711    new_path=`$CYGPATH -u "$path"`
23712  fi
23713  if test "x$new_path" = x; then
23714    # Oops. Which didn't find the executable.
23715    # The splitting of arguments from the executable at a space might have been incorrect,
23716    # since paths with space are more likely in Windows. Give it another try with the whole
23717    # argument.
23718    path="$complete"
23719    arguments="EOL"
23720    new_path=`$CYGPATH -u "$path"`
23721    new_path=`$WHICH "$new_path" 2> /dev/null`
23722    # bat and cmd files are not always considered executable in cygwin causing which
23723    # to not find them
23724    if test "x$new_path" = x \
23725             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23726             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23727      new_path=`$CYGPATH -u "$path"`
23728    fi
23729    if test "x$new_path" = x; then
23730      # It's still not found. Now this is an unrecoverable error.
23731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23732$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23733      has_space=`$ECHO "$complete" | $GREP " "`
23734      if test "x$has_space" != x; then
23735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23737      fi
23738      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23739    fi
23740  fi
23741
23742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23745  # "foo.exe" is OK but "foo" is an error.
23746  #
23747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23748  # It is also a way to make sure we got the proper file name for the real test later on.
23749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23750  if test "x$test_shortpath" = x; then
23751    # Short path failed, file does not exist as specified.
23752    # Try adding .exe or .cmd
23753    if test -f "${new_path}.exe"; then
23754       input_to_shortpath="${new_path}.exe"
23755    elif test -f "${new_path}.cmd"; then
23756       input_to_shortpath="${new_path}.cmd"
23757    else
23758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23759$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23762      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23763    fi
23764  else
23765    input_to_shortpath="$new_path"
23766  fi
23767
23768  # Call helper function which possibly converts this using DOS-style short mode.
23769  # If so, the updated path is stored in $new_path.
23770  new_path="$input_to_shortpath"
23771
23772  input_path="$input_to_shortpath"
23773  # Check if we need to convert this using DOS-style short mode. If the path
23774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23775  # take no chances and rewrite it.
23776  # Note: m4 eats our [], so we need to use [ and ] instead.
23777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23778  if test "x$has_forbidden_chars" != x; then
23779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23783      # Going to short mode and back again did indeed matter. Since short mode is
23784      # case insensitive, let's make it lowercase to improve readability.
23785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23786      # Now convert it back to Unix-stile (cygpath)
23787      input_path=`$CYGPATH -u "$shortmode_path"`
23788      new_path="$input_path"
23789    fi
23790  fi
23791
23792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23793  if test "x$test_cygdrive_prefix" = x; then
23794    # As a simple fix, exclude /usr/bin since it's not a real path.
23795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23797      # a path prefixed by /cygdrive for fixpath to work.
23798      new_path="$CYGWIN_ROOT_PATH$input_path"
23799    fi
23800  fi
23801
23802  # remove trailing .exe if any
23803  new_path="${new_path/%.exe/}"
23804
23805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23806
23807  # First separate the path from the arguments. This will split at the first
23808  # space.
23809  complete="$WINAR"
23810  path="${complete%% *}"
23811  tmp="$complete EOL"
23812  arguments="${tmp#* }"
23813
23814  # Input might be given as Windows format, start by converting to
23815  # unix format.
23816  new_path="$path"
23817
23818  windows_path="$new_path"
23819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23820    unix_path=`$CYGPATH -u "$windows_path"`
23821    new_path="$unix_path"
23822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23824    new_path="$unix_path"
23825  fi
23826
23827
23828  # Now try to locate executable using which
23829  new_path=`$WHICH "$new_path" 2> /dev/null`
23830
23831  if test "x$new_path" = x; then
23832    # Oops. Which didn't find the executable.
23833    # The splitting of arguments from the executable at a space might have been incorrect,
23834    # since paths with space are more likely in Windows. Give it another try with the whole
23835    # argument.
23836    path="$complete"
23837    arguments="EOL"
23838    new_path="$path"
23839
23840  windows_path="$new_path"
23841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23842    unix_path=`$CYGPATH -u "$windows_path"`
23843    new_path="$unix_path"
23844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23846    new_path="$unix_path"
23847  fi
23848
23849
23850    new_path=`$WHICH "$new_path" 2> /dev/null`
23851
23852    if test "x$new_path" = x; then
23853      # It's still not found. Now this is an unrecoverable error.
23854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23855$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23856      has_space=`$ECHO "$complete" | $GREP " "`
23857      if test "x$has_space" != x; then
23858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23860      fi
23861      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23862    fi
23863  fi
23864
23865  # Now new_path has a complete unix path to the binary
23866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23867    # Keep paths in /bin as-is, but remove trailing .exe if any
23868    new_path="${new_path/%.exe/}"
23869    # Do not save /bin paths to all_fixpath_prefixes!
23870  else
23871    # Not in mixed or Windows style, start by that.
23872    new_path=`cmd //c echo $new_path`
23873
23874  input_path="$new_path"
23875  # Check if we need to convert this using DOS-style short mode. If the path
23876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23877  # take no chances and rewrite it.
23878  # Note: m4 eats our [], so we need to use [ and ] instead.
23879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23880  if test "x$has_forbidden_chars" != x; then
23881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23883  fi
23884
23885    # Output is in $new_path
23886
23887  windows_path="$new_path"
23888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23889    unix_path=`$CYGPATH -u "$windows_path"`
23890    new_path="$unix_path"
23891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23893    new_path="$unix_path"
23894  fi
23895
23896    # remove trailing .exe if any
23897    new_path="${new_path/%.exe/}"
23898
23899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23901  fi
23902
23903  else
23904    # We're on a posix platform. Hooray! :)
23905    # First separate the path from the arguments. This will split at the first
23906    # space.
23907    complete="$WINAR"
23908    path="${complete%% *}"
23909    tmp="$complete EOL"
23910    arguments="${tmp#* }"
23911
23912    # Cannot rely on the command "which" here since it doesn't always work.
23913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23914    if test -z "$is_absolute_path"; then
23915      # Path to executable is not absolute. Find it.
23916      IFS_save="$IFS"
23917      IFS=:
23918      for p in $PATH; do
23919        if test -f "$p/$path" && test -x "$p/$path"; then
23920          new_path="$p/$path"
23921          break
23922        fi
23923      done
23924      IFS="$IFS_save"
23925    else
23926      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23927$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23928      new_path="$path"
23929    fi
23930
23931    if test "x$new_path" = x; then
23932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23933$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23934        has_space=`$ECHO "$complete" | $GREP " "`
23935        if test "x$has_space" != x; then
23936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23938        fi
23939        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23940      fi
23941  fi
23942
23943      # Now join together the path and the arguments once again
23944      if test "x$arguments" != xEOL; then
23945        new_complete="$new_path ${arguments% *}"
23946      else
23947        new_complete="$new_path"
23948      fi
23949
23950  if test "x$complete" != "x$new_complete"; then
23951      WINAR="$new_complete"
23952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23953$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23954    fi
23955
23956    AR="$WINAR"
23957    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23958
23959    # Extract the first word of "dumpbin", so it can be a program name with args.
23960set dummy dumpbin; ac_word=$2
23961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23962$as_echo_n "checking for $ac_word... " >&6; }
23963if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23964  $as_echo_n "(cached) " >&6
23965else
23966  if test -n "$DUMPBIN"; then
23967  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23968else
23969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23970for as_dir in $PATH
23971do
23972  IFS=$as_save_IFS
23973  test -z "$as_dir" && as_dir=.
23974    for ac_exec_ext in '' $ac_executable_extensions; do
23975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23976    ac_cv_prog_DUMPBIN="dumpbin"
23977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23978    break 2
23979  fi
23980done
23981  done
23982IFS=$as_save_IFS
23983
23984fi
23985fi
23986DUMPBIN=$ac_cv_prog_DUMPBIN
23987if test -n "$DUMPBIN"; then
23988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23989$as_echo "$DUMPBIN" >&6; }
23990else
23991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23992$as_echo "no" >&6; }
23993fi
23994
23995
23996
23997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23998
23999  # First separate the path from the arguments. This will split at the first
24000  # space.
24001  complete="$DUMPBIN"
24002  path="${complete%% *}"
24003  tmp="$complete EOL"
24004  arguments="${tmp#* }"
24005
24006  # Input might be given as Windows format, start by converting to
24007  # unix format.
24008  new_path=`$CYGPATH -u "$path"`
24009
24010  # Now try to locate executable using which
24011  new_path=`$WHICH "$new_path" 2> /dev/null`
24012  # bat and cmd files are not always considered executable in cygwin causing which
24013  # to not find them
24014  if test "x$new_path" = x \
24015           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24016           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24017    new_path=`$CYGPATH -u "$path"`
24018  fi
24019  if test "x$new_path" = x; then
24020    # Oops. Which didn't find the executable.
24021    # The splitting of arguments from the executable at a space might have been incorrect,
24022    # since paths with space are more likely in Windows. Give it another try with the whole
24023    # argument.
24024    path="$complete"
24025    arguments="EOL"
24026    new_path=`$CYGPATH -u "$path"`
24027    new_path=`$WHICH "$new_path" 2> /dev/null`
24028    # bat and cmd files are not always considered executable in cygwin causing which
24029    # to not find them
24030    if test "x$new_path" = x \
24031             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24032             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24033      new_path=`$CYGPATH -u "$path"`
24034    fi
24035    if test "x$new_path" = x; then
24036      # It's still not found. Now this is an unrecoverable error.
24037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24038$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24039      has_space=`$ECHO "$complete" | $GREP " "`
24040      if test "x$has_space" != x; then
24041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24043      fi
24044      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24045    fi
24046  fi
24047
24048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24051  # "foo.exe" is OK but "foo" is an error.
24052  #
24053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24054  # It is also a way to make sure we got the proper file name for the real test later on.
24055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24056  if test "x$test_shortpath" = x; then
24057    # Short path failed, file does not exist as specified.
24058    # Try adding .exe or .cmd
24059    if test -f "${new_path}.exe"; then
24060       input_to_shortpath="${new_path}.exe"
24061    elif test -f "${new_path}.cmd"; then
24062       input_to_shortpath="${new_path}.cmd"
24063    else
24064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24065$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24068      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24069    fi
24070  else
24071    input_to_shortpath="$new_path"
24072  fi
24073
24074  # Call helper function which possibly converts this using DOS-style short mode.
24075  # If so, the updated path is stored in $new_path.
24076  new_path="$input_to_shortpath"
24077
24078  input_path="$input_to_shortpath"
24079  # Check if we need to convert this using DOS-style short mode. If the path
24080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24081  # take no chances and rewrite it.
24082  # Note: m4 eats our [], so we need to use [ and ] instead.
24083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24084  if test "x$has_forbidden_chars" != x; then
24085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24089      # Going to short mode and back again did indeed matter. Since short mode is
24090      # case insensitive, let's make it lowercase to improve readability.
24091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24092      # Now convert it back to Unix-stile (cygpath)
24093      input_path=`$CYGPATH -u "$shortmode_path"`
24094      new_path="$input_path"
24095    fi
24096  fi
24097
24098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24099  if test "x$test_cygdrive_prefix" = x; then
24100    # As a simple fix, exclude /usr/bin since it's not a real path.
24101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24103      # a path prefixed by /cygdrive for fixpath to work.
24104      new_path="$CYGWIN_ROOT_PATH$input_path"
24105    fi
24106  fi
24107
24108  # remove trailing .exe if any
24109  new_path="${new_path/%.exe/}"
24110
24111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24112
24113  # First separate the path from the arguments. This will split at the first
24114  # space.
24115  complete="$DUMPBIN"
24116  path="${complete%% *}"
24117  tmp="$complete EOL"
24118  arguments="${tmp#* }"
24119
24120  # Input might be given as Windows format, start by converting to
24121  # unix format.
24122  new_path="$path"
24123
24124  windows_path="$new_path"
24125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24126    unix_path=`$CYGPATH -u "$windows_path"`
24127    new_path="$unix_path"
24128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24130    new_path="$unix_path"
24131  fi
24132
24133
24134  # Now try to locate executable using which
24135  new_path=`$WHICH "$new_path" 2> /dev/null`
24136
24137  if test "x$new_path" = x; then
24138    # Oops. Which didn't find the executable.
24139    # The splitting of arguments from the executable at a space might have been incorrect,
24140    # since paths with space are more likely in Windows. Give it another try with the whole
24141    # argument.
24142    path="$complete"
24143    arguments="EOL"
24144    new_path="$path"
24145
24146  windows_path="$new_path"
24147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24148    unix_path=`$CYGPATH -u "$windows_path"`
24149    new_path="$unix_path"
24150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24152    new_path="$unix_path"
24153  fi
24154
24155
24156    new_path=`$WHICH "$new_path" 2> /dev/null`
24157
24158    if test "x$new_path" = x; then
24159      # It's still not found. Now this is an unrecoverable error.
24160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24161$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24162      has_space=`$ECHO "$complete" | $GREP " "`
24163      if test "x$has_space" != x; then
24164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24166      fi
24167      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24168    fi
24169  fi
24170
24171  # Now new_path has a complete unix path to the binary
24172  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24173    # Keep paths in /bin as-is, but remove trailing .exe if any
24174    new_path="${new_path/%.exe/}"
24175    # Do not save /bin paths to all_fixpath_prefixes!
24176  else
24177    # Not in mixed or Windows style, start by that.
24178    new_path=`cmd //c echo $new_path`
24179
24180  input_path="$new_path"
24181  # Check if we need to convert this using DOS-style short mode. If the path
24182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24183  # take no chances and rewrite it.
24184  # Note: m4 eats our [], so we need to use [ and ] instead.
24185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24186  if test "x$has_forbidden_chars" != x; then
24187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24189  fi
24190
24191    # Output is in $new_path
24192
24193  windows_path="$new_path"
24194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24195    unix_path=`$CYGPATH -u "$windows_path"`
24196    new_path="$unix_path"
24197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24199    new_path="$unix_path"
24200  fi
24201
24202    # remove trailing .exe if any
24203    new_path="${new_path/%.exe/}"
24204
24205    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24206    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24207  fi
24208
24209  else
24210    # We're on a posix platform. Hooray! :)
24211    # First separate the path from the arguments. This will split at the first
24212    # space.
24213    complete="$DUMPBIN"
24214    path="${complete%% *}"
24215    tmp="$complete EOL"
24216    arguments="${tmp#* }"
24217
24218    # Cannot rely on the command "which" here since it doesn't always work.
24219    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24220    if test -z "$is_absolute_path"; then
24221      # Path to executable is not absolute. Find it.
24222      IFS_save="$IFS"
24223      IFS=:
24224      for p in $PATH; do
24225        if test -f "$p/$path" && test -x "$p/$path"; then
24226          new_path="$p/$path"
24227          break
24228        fi
24229      done
24230      IFS="$IFS_save"
24231    else
24232      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24233$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24234      new_path="$path"
24235    fi
24236
24237    if test "x$new_path" = x; then
24238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24239$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24240        has_space=`$ECHO "$complete" | $GREP " "`
24241        if test "x$has_space" != x; then
24242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24244        fi
24245        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24246      fi
24247  fi
24248
24249      # Now join together the path and the arguments once again
24250      if test "x$arguments" != xEOL; then
24251        new_complete="$new_path ${arguments% *}"
24252      else
24253        new_complete="$new_path"
24254      fi
24255
24256  if test "x$complete" != "x$new_complete"; then
24257      DUMPBIN="$new_complete"
24258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24259$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24260    fi
24261
24262
24263    COMPILER_TYPE=CL
24264    CCXXFLAGS="$CCXXFLAGS -nologo"
24265
24266fi
24267
24268
24269
24270ac_ext=c
24271ac_cpp='$CPP $CPPFLAGS'
24272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24274ac_compiler_gnu=$ac_cv_c_compiler_gnu
24275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24276$as_echo_n "checking how to run the C preprocessor... " >&6; }
24277# On Suns, sometimes $CPP names a directory.
24278if test -n "$CPP" && test -d "$CPP"; then
24279  CPP=
24280fi
24281if test -z "$CPP"; then
24282  if test "${ac_cv_prog_CPP+set}" = set; then :
24283  $as_echo_n "(cached) " >&6
24284else
24285      # Double quotes because CPP needs to be expanded
24286    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24287    do
24288      ac_preproc_ok=false
24289for ac_c_preproc_warn_flag in '' yes
24290do
24291  # Use a header file that comes with gcc, so configuring glibc
24292  # with a fresh cross-compiler works.
24293  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24294  # <limits.h> exists even on freestanding compilers.
24295  # On the NeXT, cc -E runs the code through the compiler's parser,
24296  # not just through cpp. "Syntax error" is here to catch this case.
24297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24298/* end confdefs.h.  */
24299#ifdef __STDC__
24300# include <limits.h>
24301#else
24302# include <assert.h>
24303#endif
24304		     Syntax error
24305_ACEOF
24306if ac_fn_c_try_cpp "$LINENO"; then :
24307
24308else
24309  # Broken: fails on valid input.
24310continue
24311fi
24312rm -f conftest.err conftest.i conftest.$ac_ext
24313
24314  # OK, works on sane cases.  Now check whether nonexistent headers
24315  # can be detected and how.
24316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24317/* end confdefs.h.  */
24318#include <ac_nonexistent.h>
24319_ACEOF
24320if ac_fn_c_try_cpp "$LINENO"; then :
24321  # Broken: success on invalid input.
24322continue
24323else
24324  # Passes both tests.
24325ac_preproc_ok=:
24326break
24327fi
24328rm -f conftest.err conftest.i conftest.$ac_ext
24329
24330done
24331# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24332rm -f conftest.i conftest.err conftest.$ac_ext
24333if $ac_preproc_ok; then :
24334  break
24335fi
24336
24337    done
24338    ac_cv_prog_CPP=$CPP
24339
24340fi
24341  CPP=$ac_cv_prog_CPP
24342else
24343  ac_cv_prog_CPP=$CPP
24344fi
24345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24346$as_echo "$CPP" >&6; }
24347ac_preproc_ok=false
24348for ac_c_preproc_warn_flag in '' yes
24349do
24350  # Use a header file that comes with gcc, so configuring glibc
24351  # with a fresh cross-compiler works.
24352  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24353  # <limits.h> exists even on freestanding compilers.
24354  # On the NeXT, cc -E runs the code through the compiler's parser,
24355  # not just through cpp. "Syntax error" is here to catch this case.
24356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24357/* end confdefs.h.  */
24358#ifdef __STDC__
24359# include <limits.h>
24360#else
24361# include <assert.h>
24362#endif
24363		     Syntax error
24364_ACEOF
24365if ac_fn_c_try_cpp "$LINENO"; then :
24366
24367else
24368  # Broken: fails on valid input.
24369continue
24370fi
24371rm -f conftest.err conftest.i conftest.$ac_ext
24372
24373  # OK, works on sane cases.  Now check whether nonexistent headers
24374  # can be detected and how.
24375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24376/* end confdefs.h.  */
24377#include <ac_nonexistent.h>
24378_ACEOF
24379if ac_fn_c_try_cpp "$LINENO"; then :
24380  # Broken: success on invalid input.
24381continue
24382else
24383  # Passes both tests.
24384ac_preproc_ok=:
24385break
24386fi
24387rm -f conftest.err conftest.i conftest.$ac_ext
24388
24389done
24390# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24391rm -f conftest.i conftest.err conftest.$ac_ext
24392if $ac_preproc_ok; then :
24393
24394else
24395  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24397as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24398See \`config.log' for more details" "$LINENO" 5 ; }
24399fi
24400
24401ac_ext=cpp
24402ac_cpp='$CXXCPP $CPPFLAGS'
24403ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24404ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24405ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24406
24407
24408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24409
24410  # First separate the path from the arguments. This will split at the first
24411  # space.
24412  complete="$CPP"
24413  path="${complete%% *}"
24414  tmp="$complete EOL"
24415  arguments="${tmp#* }"
24416
24417  # Input might be given as Windows format, start by converting to
24418  # unix format.
24419  new_path=`$CYGPATH -u "$path"`
24420
24421  # Now try to locate executable using which
24422  new_path=`$WHICH "$new_path" 2> /dev/null`
24423  # bat and cmd files are not always considered executable in cygwin causing which
24424  # to not find them
24425  if test "x$new_path" = x \
24426           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24427           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24428    new_path=`$CYGPATH -u "$path"`
24429  fi
24430  if test "x$new_path" = x; then
24431    # Oops. Which didn't find the executable.
24432    # The splitting of arguments from the executable at a space might have been incorrect,
24433    # since paths with space are more likely in Windows. Give it another try with the whole
24434    # argument.
24435    path="$complete"
24436    arguments="EOL"
24437    new_path=`$CYGPATH -u "$path"`
24438    new_path=`$WHICH "$new_path" 2> /dev/null`
24439    # bat and cmd files are not always considered executable in cygwin causing which
24440    # to not find them
24441    if test "x$new_path" = x \
24442             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24443             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24444      new_path=`$CYGPATH -u "$path"`
24445    fi
24446    if test "x$new_path" = x; then
24447      # It's still not found. Now this is an unrecoverable error.
24448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24449$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24450      has_space=`$ECHO "$complete" | $GREP " "`
24451      if test "x$has_space" != x; then
24452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24454      fi
24455      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24456    fi
24457  fi
24458
24459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24462  # "foo.exe" is OK but "foo" is an error.
24463  #
24464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24465  # It is also a way to make sure we got the proper file name for the real test later on.
24466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24467  if test "x$test_shortpath" = x; then
24468    # Short path failed, file does not exist as specified.
24469    # Try adding .exe or .cmd
24470    if test -f "${new_path}.exe"; then
24471       input_to_shortpath="${new_path}.exe"
24472    elif test -f "${new_path}.cmd"; then
24473       input_to_shortpath="${new_path}.cmd"
24474    else
24475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24476$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24479      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24480    fi
24481  else
24482    input_to_shortpath="$new_path"
24483  fi
24484
24485  # Call helper function which possibly converts this using DOS-style short mode.
24486  # If so, the updated path is stored in $new_path.
24487  new_path="$input_to_shortpath"
24488
24489  input_path="$input_to_shortpath"
24490  # Check if we need to convert this using DOS-style short mode. If the path
24491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24492  # take no chances and rewrite it.
24493  # Note: m4 eats our [], so we need to use [ and ] instead.
24494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24495  if test "x$has_forbidden_chars" != x; then
24496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24500      # Going to short mode and back again did indeed matter. Since short mode is
24501      # case insensitive, let's make it lowercase to improve readability.
24502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24503      # Now convert it back to Unix-stile (cygpath)
24504      input_path=`$CYGPATH -u "$shortmode_path"`
24505      new_path="$input_path"
24506    fi
24507  fi
24508
24509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24510  if test "x$test_cygdrive_prefix" = x; then
24511    # As a simple fix, exclude /usr/bin since it's not a real path.
24512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24514      # a path prefixed by /cygdrive for fixpath to work.
24515      new_path="$CYGWIN_ROOT_PATH$input_path"
24516    fi
24517  fi
24518
24519  # remove trailing .exe if any
24520  new_path="${new_path/%.exe/}"
24521
24522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24523
24524  # First separate the path from the arguments. This will split at the first
24525  # space.
24526  complete="$CPP"
24527  path="${complete%% *}"
24528  tmp="$complete EOL"
24529  arguments="${tmp#* }"
24530
24531  # Input might be given as Windows format, start by converting to
24532  # unix format.
24533  new_path="$path"
24534
24535  windows_path="$new_path"
24536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24537    unix_path=`$CYGPATH -u "$windows_path"`
24538    new_path="$unix_path"
24539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24541    new_path="$unix_path"
24542  fi
24543
24544
24545  # Now try to locate executable using which
24546  new_path=`$WHICH "$new_path" 2> /dev/null`
24547
24548  if test "x$new_path" = x; then
24549    # Oops. Which didn't find the executable.
24550    # The splitting of arguments from the executable at a space might have been incorrect,
24551    # since paths with space are more likely in Windows. Give it another try with the whole
24552    # argument.
24553    path="$complete"
24554    arguments="EOL"
24555    new_path="$path"
24556
24557  windows_path="$new_path"
24558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24559    unix_path=`$CYGPATH -u "$windows_path"`
24560    new_path="$unix_path"
24561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24563    new_path="$unix_path"
24564  fi
24565
24566
24567    new_path=`$WHICH "$new_path" 2> /dev/null`
24568
24569    if test "x$new_path" = x; then
24570      # It's still not found. Now this is an unrecoverable error.
24571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24572$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24573      has_space=`$ECHO "$complete" | $GREP " "`
24574      if test "x$has_space" != x; then
24575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24577      fi
24578      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24579    fi
24580  fi
24581
24582  # Now new_path has a complete unix path to the binary
24583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24584    # Keep paths in /bin as-is, but remove trailing .exe if any
24585    new_path="${new_path/%.exe/}"
24586    # Do not save /bin paths to all_fixpath_prefixes!
24587  else
24588    # Not in mixed or Windows style, start by that.
24589    new_path=`cmd //c echo $new_path`
24590
24591  input_path="$new_path"
24592  # Check if we need to convert this using DOS-style short mode. If the path
24593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24594  # take no chances and rewrite it.
24595  # Note: m4 eats our [], so we need to use [ and ] instead.
24596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24597  if test "x$has_forbidden_chars" != x; then
24598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24600  fi
24601
24602    # Output is in $new_path
24603
24604  windows_path="$new_path"
24605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24606    unix_path=`$CYGPATH -u "$windows_path"`
24607    new_path="$unix_path"
24608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24610    new_path="$unix_path"
24611  fi
24612
24613    # remove trailing .exe if any
24614    new_path="${new_path/%.exe/}"
24615
24616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24618  fi
24619
24620  else
24621    # We're on a posix platform. Hooray! :)
24622    # First separate the path from the arguments. This will split at the first
24623    # space.
24624    complete="$CPP"
24625    path="${complete%% *}"
24626    tmp="$complete EOL"
24627    arguments="${tmp#* }"
24628
24629    # Cannot rely on the command "which" here since it doesn't always work.
24630    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24631    if test -z "$is_absolute_path"; then
24632      # Path to executable is not absolute. Find it.
24633      IFS_save="$IFS"
24634      IFS=:
24635      for p in $PATH; do
24636        if test -f "$p/$path" && test -x "$p/$path"; then
24637          new_path="$p/$path"
24638          break
24639        fi
24640      done
24641      IFS="$IFS_save"
24642    else
24643      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24644$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24645      new_path="$path"
24646    fi
24647
24648    if test "x$new_path" = x; then
24649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24650$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24651        has_space=`$ECHO "$complete" | $GREP " "`
24652        if test "x$has_space" != x; then
24653          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24654$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24655        fi
24656        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24657      fi
24658  fi
24659
24660      # Now join together the path and the arguments once again
24661      if test "x$arguments" != xEOL; then
24662        new_complete="$new_path ${arguments% *}"
24663      else
24664        new_complete="$new_path"
24665      fi
24666
24667  if test "x$complete" != "x$new_complete"; then
24668      CPP="$new_complete"
24669      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24670$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24671    fi
24672
24673
24674ac_ext=cpp
24675ac_cpp='$CXXCPP $CPPFLAGS'
24676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24680$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24681if test -z "$CXXCPP"; then
24682  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24683  $as_echo_n "(cached) " >&6
24684else
24685      # Double quotes because CXXCPP needs to be expanded
24686    for CXXCPP in "$CXX -E" "/lib/cpp"
24687    do
24688      ac_preproc_ok=false
24689for ac_cxx_preproc_warn_flag in '' yes
24690do
24691  # Use a header file that comes with gcc, so configuring glibc
24692  # with a fresh cross-compiler works.
24693  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24694  # <limits.h> exists even on freestanding compilers.
24695  # On the NeXT, cc -E runs the code through the compiler's parser,
24696  # not just through cpp. "Syntax error" is here to catch this case.
24697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24698/* end confdefs.h.  */
24699#ifdef __STDC__
24700# include <limits.h>
24701#else
24702# include <assert.h>
24703#endif
24704		     Syntax error
24705_ACEOF
24706if ac_fn_cxx_try_cpp "$LINENO"; then :
24707
24708else
24709  # Broken: fails on valid input.
24710continue
24711fi
24712rm -f conftest.err conftest.i conftest.$ac_ext
24713
24714  # OK, works on sane cases.  Now check whether nonexistent headers
24715  # can be detected and how.
24716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24717/* end confdefs.h.  */
24718#include <ac_nonexistent.h>
24719_ACEOF
24720if ac_fn_cxx_try_cpp "$LINENO"; then :
24721  # Broken: success on invalid input.
24722continue
24723else
24724  # Passes both tests.
24725ac_preproc_ok=:
24726break
24727fi
24728rm -f conftest.err conftest.i conftest.$ac_ext
24729
24730done
24731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24732rm -f conftest.i conftest.err conftest.$ac_ext
24733if $ac_preproc_ok; then :
24734  break
24735fi
24736
24737    done
24738    ac_cv_prog_CXXCPP=$CXXCPP
24739
24740fi
24741  CXXCPP=$ac_cv_prog_CXXCPP
24742else
24743  ac_cv_prog_CXXCPP=$CXXCPP
24744fi
24745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24746$as_echo "$CXXCPP" >&6; }
24747ac_preproc_ok=false
24748for ac_cxx_preproc_warn_flag in '' yes
24749do
24750  # Use a header file that comes with gcc, so configuring glibc
24751  # with a fresh cross-compiler works.
24752  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24753  # <limits.h> exists even on freestanding compilers.
24754  # On the NeXT, cc -E runs the code through the compiler's parser,
24755  # not just through cpp. "Syntax error" is here to catch this case.
24756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24757/* end confdefs.h.  */
24758#ifdef __STDC__
24759# include <limits.h>
24760#else
24761# include <assert.h>
24762#endif
24763		     Syntax error
24764_ACEOF
24765if ac_fn_cxx_try_cpp "$LINENO"; then :
24766
24767else
24768  # Broken: fails on valid input.
24769continue
24770fi
24771rm -f conftest.err conftest.i conftest.$ac_ext
24772
24773  # OK, works on sane cases.  Now check whether nonexistent headers
24774  # can be detected and how.
24775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24776/* end confdefs.h.  */
24777#include <ac_nonexistent.h>
24778_ACEOF
24779if ac_fn_cxx_try_cpp "$LINENO"; then :
24780  # Broken: success on invalid input.
24781continue
24782else
24783  # Passes both tests.
24784ac_preproc_ok=:
24785break
24786fi
24787rm -f conftest.err conftest.i conftest.$ac_ext
24788
24789done
24790# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24791rm -f conftest.i conftest.err conftest.$ac_ext
24792if $ac_preproc_ok; then :
24793
24794else
24795  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24797as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24798See \`config.log' for more details" "$LINENO" 5 ; }
24799fi
24800
24801ac_ext=cpp
24802ac_cpp='$CXXCPP $CPPFLAGS'
24803ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24804ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24805ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24806
24807
24808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809
24810  # First separate the path from the arguments. This will split at the first
24811  # space.
24812  complete="$CXXCPP"
24813  path="${complete%% *}"
24814  tmp="$complete EOL"
24815  arguments="${tmp#* }"
24816
24817  # Input might be given as Windows format, start by converting to
24818  # unix format.
24819  new_path=`$CYGPATH -u "$path"`
24820
24821  # Now try to locate executable using which
24822  new_path=`$WHICH "$new_path" 2> /dev/null`
24823  # bat and cmd files are not always considered executable in cygwin causing which
24824  # to not find them
24825  if test "x$new_path" = x \
24826           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24827           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24828    new_path=`$CYGPATH -u "$path"`
24829  fi
24830  if test "x$new_path" = x; then
24831    # Oops. Which didn't find the executable.
24832    # The splitting of arguments from the executable at a space might have been incorrect,
24833    # since paths with space are more likely in Windows. Give it another try with the whole
24834    # argument.
24835    path="$complete"
24836    arguments="EOL"
24837    new_path=`$CYGPATH -u "$path"`
24838    new_path=`$WHICH "$new_path" 2> /dev/null`
24839    # bat and cmd files are not always considered executable in cygwin causing which
24840    # to not find them
24841    if test "x$new_path" = x \
24842             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24843             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24844      new_path=`$CYGPATH -u "$path"`
24845    fi
24846    if test "x$new_path" = x; then
24847      # It's still not found. Now this is an unrecoverable error.
24848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24849$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24850      has_space=`$ECHO "$complete" | $GREP " "`
24851      if test "x$has_space" != x; then
24852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24854      fi
24855      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24856    fi
24857  fi
24858
24859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24862  # "foo.exe" is OK but "foo" is an error.
24863  #
24864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24865  # It is also a way to make sure we got the proper file name for the real test later on.
24866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24867  if test "x$test_shortpath" = x; then
24868    # Short path failed, file does not exist as specified.
24869    # Try adding .exe or .cmd
24870    if test -f "${new_path}.exe"; then
24871       input_to_shortpath="${new_path}.exe"
24872    elif test -f "${new_path}.cmd"; then
24873       input_to_shortpath="${new_path}.cmd"
24874    else
24875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24876$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24879      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24880    fi
24881  else
24882    input_to_shortpath="$new_path"
24883  fi
24884
24885  # Call helper function which possibly converts this using DOS-style short mode.
24886  # If so, the updated path is stored in $new_path.
24887  new_path="$input_to_shortpath"
24888
24889  input_path="$input_to_shortpath"
24890  # Check if we need to convert this using DOS-style short mode. If the path
24891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24892  # take no chances and rewrite it.
24893  # Note: m4 eats our [], so we need to use [ and ] instead.
24894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24895  if test "x$has_forbidden_chars" != x; then
24896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24900      # Going to short mode and back again did indeed matter. Since short mode is
24901      # case insensitive, let's make it lowercase to improve readability.
24902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24903      # Now convert it back to Unix-stile (cygpath)
24904      input_path=`$CYGPATH -u "$shortmode_path"`
24905      new_path="$input_path"
24906    fi
24907  fi
24908
24909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24910  if test "x$test_cygdrive_prefix" = x; then
24911    # As a simple fix, exclude /usr/bin since it's not a real path.
24912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24914      # a path prefixed by /cygdrive for fixpath to work.
24915      new_path="$CYGWIN_ROOT_PATH$input_path"
24916    fi
24917  fi
24918
24919  # remove trailing .exe if any
24920  new_path="${new_path/%.exe/}"
24921
24922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24923
24924  # First separate the path from the arguments. This will split at the first
24925  # space.
24926  complete="$CXXCPP"
24927  path="${complete%% *}"
24928  tmp="$complete EOL"
24929  arguments="${tmp#* }"
24930
24931  # Input might be given as Windows format, start by converting to
24932  # unix format.
24933  new_path="$path"
24934
24935  windows_path="$new_path"
24936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24937    unix_path=`$CYGPATH -u "$windows_path"`
24938    new_path="$unix_path"
24939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24941    new_path="$unix_path"
24942  fi
24943
24944
24945  # Now try to locate executable using which
24946  new_path=`$WHICH "$new_path" 2> /dev/null`
24947
24948  if test "x$new_path" = x; then
24949    # Oops. Which didn't find the executable.
24950    # The splitting of arguments from the executable at a space might have been incorrect,
24951    # since paths with space are more likely in Windows. Give it another try with the whole
24952    # argument.
24953    path="$complete"
24954    arguments="EOL"
24955    new_path="$path"
24956
24957  windows_path="$new_path"
24958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24959    unix_path=`$CYGPATH -u "$windows_path"`
24960    new_path="$unix_path"
24961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24963    new_path="$unix_path"
24964  fi
24965
24966
24967    new_path=`$WHICH "$new_path" 2> /dev/null`
24968
24969    if test "x$new_path" = x; then
24970      # It's still not found. Now this is an unrecoverable error.
24971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24972$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24973      has_space=`$ECHO "$complete" | $GREP " "`
24974      if test "x$has_space" != x; then
24975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24977      fi
24978      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24979    fi
24980  fi
24981
24982  # Now new_path has a complete unix path to the binary
24983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24984    # Keep paths in /bin as-is, but remove trailing .exe if any
24985    new_path="${new_path/%.exe/}"
24986    # Do not save /bin paths to all_fixpath_prefixes!
24987  else
24988    # Not in mixed or Windows style, start by that.
24989    new_path=`cmd //c echo $new_path`
24990
24991  input_path="$new_path"
24992  # Check if we need to convert this using DOS-style short mode. If the path
24993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24994  # take no chances and rewrite it.
24995  # Note: m4 eats our [], so we need to use [ and ] instead.
24996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24997  if test "x$has_forbidden_chars" != x; then
24998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25000  fi
25001
25002    # Output is in $new_path
25003
25004  windows_path="$new_path"
25005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25006    unix_path=`$CYGPATH -u "$windows_path"`
25007    new_path="$unix_path"
25008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25010    new_path="$unix_path"
25011  fi
25012
25013    # remove trailing .exe if any
25014    new_path="${new_path/%.exe/}"
25015
25016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25018  fi
25019
25020  else
25021    # We're on a posix platform. Hooray! :)
25022    # First separate the path from the arguments. This will split at the first
25023    # space.
25024    complete="$CXXCPP"
25025    path="${complete%% *}"
25026    tmp="$complete EOL"
25027    arguments="${tmp#* }"
25028
25029    # Cannot rely on the command "which" here since it doesn't always work.
25030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25031    if test -z "$is_absolute_path"; then
25032      # Path to executable is not absolute. Find it.
25033      IFS_save="$IFS"
25034      IFS=:
25035      for p in $PATH; do
25036        if test -f "$p/$path" && test -x "$p/$path"; then
25037          new_path="$p/$path"
25038          break
25039        fi
25040      done
25041      IFS="$IFS_save"
25042    else
25043      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25044$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25045      new_path="$path"
25046    fi
25047
25048    if test "x$new_path" = x; then
25049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25050$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25051        has_space=`$ECHO "$complete" | $GREP " "`
25052        if test "x$has_space" != x; then
25053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25055        fi
25056        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25057      fi
25058  fi
25059
25060      # Now join together the path and the arguments once again
25061      if test "x$arguments" != xEOL; then
25062        new_complete="$new_path ${arguments% *}"
25063      else
25064        new_complete="$new_path"
25065      fi
25066
25067  if test "x$complete" != "x$new_complete"; then
25068      CXXCPP="$new_complete"
25069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25070$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25071    fi
25072
25073
25074if test "x$COMPILE_TYPE" != "xcross"; then
25075    # If we are not cross compiling, use the same compilers for
25076    # building the build platform executables. The cross-compilation
25077    # case needed to be done earlier, but this can only be done after
25078    # the native tools have been localized.
25079    BUILD_CC="$CC"
25080    BUILD_CXX="$CXX"
25081    BUILD_LD="$LD"
25082fi
25083
25084# for solaris we really need solaris tools, and not gnu equivalent
25085#   these seems to normally reside in /usr/ccs/bin so add that to path before
25086#   starting to probe
25087#
25088#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25089#         so that it can be overriden --with-tools-dir
25090if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25091    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25092fi
25093
25094# Find the right assembler.
25095if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25096    # Extract the first word of "as", so it can be a program name with args.
25097set dummy as; ac_word=$2
25098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25099$as_echo_n "checking for $ac_word... " >&6; }
25100if test "${ac_cv_path_AS+set}" = set; then :
25101  $as_echo_n "(cached) " >&6
25102else
25103  case $AS in
25104  [\\/]* | ?:[\\/]*)
25105  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25106  ;;
25107  *)
25108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25109for as_dir in $PATH
25110do
25111  IFS=$as_save_IFS
25112  test -z "$as_dir" && as_dir=.
25113    for ac_exec_ext in '' $ac_executable_extensions; do
25114  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25115    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25117    break 2
25118  fi
25119done
25120  done
25121IFS=$as_save_IFS
25122
25123  ;;
25124esac
25125fi
25126AS=$ac_cv_path_AS
25127if test -n "$AS"; then
25128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25129$as_echo "$AS" >&6; }
25130else
25131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25132$as_echo "no" >&6; }
25133fi
25134
25135
25136
25137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25138
25139  # First separate the path from the arguments. This will split at the first
25140  # space.
25141  complete="$AS"
25142  path="${complete%% *}"
25143  tmp="$complete EOL"
25144  arguments="${tmp#* }"
25145
25146  # Input might be given as Windows format, start by converting to
25147  # unix format.
25148  new_path=`$CYGPATH -u "$path"`
25149
25150  # Now try to locate executable using which
25151  new_path=`$WHICH "$new_path" 2> /dev/null`
25152  # bat and cmd files are not always considered executable in cygwin causing which
25153  # to not find them
25154  if test "x$new_path" = x \
25155           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25156           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25157    new_path=`$CYGPATH -u "$path"`
25158  fi
25159  if test "x$new_path" = x; then
25160    # Oops. Which didn't find the executable.
25161    # The splitting of arguments from the executable at a space might have been incorrect,
25162    # since paths with space are more likely in Windows. Give it another try with the whole
25163    # argument.
25164    path="$complete"
25165    arguments="EOL"
25166    new_path=`$CYGPATH -u "$path"`
25167    new_path=`$WHICH "$new_path" 2> /dev/null`
25168    # bat and cmd files are not always considered executable in cygwin causing which
25169    # to not find them
25170    if test "x$new_path" = x \
25171             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25172             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25173      new_path=`$CYGPATH -u "$path"`
25174    fi
25175    if test "x$new_path" = x; then
25176      # It's still not found. Now this is an unrecoverable error.
25177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25178$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25179      has_space=`$ECHO "$complete" | $GREP " "`
25180      if test "x$has_space" != x; then
25181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25183      fi
25184      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25185    fi
25186  fi
25187
25188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25191  # "foo.exe" is OK but "foo" is an error.
25192  #
25193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25194  # It is also a way to make sure we got the proper file name for the real test later on.
25195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25196  if test "x$test_shortpath" = x; then
25197    # Short path failed, file does not exist as specified.
25198    # Try adding .exe or .cmd
25199    if test -f "${new_path}.exe"; then
25200       input_to_shortpath="${new_path}.exe"
25201    elif test -f "${new_path}.cmd"; then
25202       input_to_shortpath="${new_path}.cmd"
25203    else
25204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25205$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25208      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25209    fi
25210  else
25211    input_to_shortpath="$new_path"
25212  fi
25213
25214  # Call helper function which possibly converts this using DOS-style short mode.
25215  # If so, the updated path is stored in $new_path.
25216  new_path="$input_to_shortpath"
25217
25218  input_path="$input_to_shortpath"
25219  # Check if we need to convert this using DOS-style short mode. If the path
25220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25221  # take no chances and rewrite it.
25222  # Note: m4 eats our [], so we need to use [ and ] instead.
25223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25224  if test "x$has_forbidden_chars" != x; then
25225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25229      # Going to short mode and back again did indeed matter. Since short mode is
25230      # case insensitive, let's make it lowercase to improve readability.
25231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25232      # Now convert it back to Unix-stile (cygpath)
25233      input_path=`$CYGPATH -u "$shortmode_path"`
25234      new_path="$input_path"
25235    fi
25236  fi
25237
25238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25239  if test "x$test_cygdrive_prefix" = x; then
25240    # As a simple fix, exclude /usr/bin since it's not a real path.
25241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25243      # a path prefixed by /cygdrive for fixpath to work.
25244      new_path="$CYGWIN_ROOT_PATH$input_path"
25245    fi
25246  fi
25247
25248  # remove trailing .exe if any
25249  new_path="${new_path/%.exe/}"
25250
25251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25252
25253  # First separate the path from the arguments. This will split at the first
25254  # space.
25255  complete="$AS"
25256  path="${complete%% *}"
25257  tmp="$complete EOL"
25258  arguments="${tmp#* }"
25259
25260  # Input might be given as Windows format, start by converting to
25261  # unix format.
25262  new_path="$path"
25263
25264  windows_path="$new_path"
25265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25266    unix_path=`$CYGPATH -u "$windows_path"`
25267    new_path="$unix_path"
25268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25270    new_path="$unix_path"
25271  fi
25272
25273
25274  # Now try to locate executable using which
25275  new_path=`$WHICH "$new_path" 2> /dev/null`
25276
25277  if test "x$new_path" = x; then
25278    # Oops. Which didn't find the executable.
25279    # The splitting of arguments from the executable at a space might have been incorrect,
25280    # since paths with space are more likely in Windows. Give it another try with the whole
25281    # argument.
25282    path="$complete"
25283    arguments="EOL"
25284    new_path="$path"
25285
25286  windows_path="$new_path"
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288    unix_path=`$CYGPATH -u "$windows_path"`
25289    new_path="$unix_path"
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25292    new_path="$unix_path"
25293  fi
25294
25295
25296    new_path=`$WHICH "$new_path" 2> /dev/null`
25297
25298    if test "x$new_path" = x; then
25299      # It's still not found. Now this is an unrecoverable error.
25300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25301$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25302      has_space=`$ECHO "$complete" | $GREP " "`
25303      if test "x$has_space" != x; then
25304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25306      fi
25307      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25308    fi
25309  fi
25310
25311  # Now new_path has a complete unix path to the binary
25312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25313    # Keep paths in /bin as-is, but remove trailing .exe if any
25314    new_path="${new_path/%.exe/}"
25315    # Do not save /bin paths to all_fixpath_prefixes!
25316  else
25317    # Not in mixed or Windows style, start by that.
25318    new_path=`cmd //c echo $new_path`
25319
25320  input_path="$new_path"
25321  # Check if we need to convert this using DOS-style short mode. If the path
25322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25323  # take no chances and rewrite it.
25324  # Note: m4 eats our [], so we need to use [ and ] instead.
25325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25326  if test "x$has_forbidden_chars" != x; then
25327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25329  fi
25330
25331    # Output is in $new_path
25332
25333  windows_path="$new_path"
25334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25335    unix_path=`$CYGPATH -u "$windows_path"`
25336    new_path="$unix_path"
25337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25339    new_path="$unix_path"
25340  fi
25341
25342    # remove trailing .exe if any
25343    new_path="${new_path/%.exe/}"
25344
25345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25347  fi
25348
25349  else
25350    # We're on a posix platform. Hooray! :)
25351    # First separate the path from the arguments. This will split at the first
25352    # space.
25353    complete="$AS"
25354    path="${complete%% *}"
25355    tmp="$complete EOL"
25356    arguments="${tmp#* }"
25357
25358    # Cannot rely on the command "which" here since it doesn't always work.
25359    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25360    if test -z "$is_absolute_path"; then
25361      # Path to executable is not absolute. Find it.
25362      IFS_save="$IFS"
25363      IFS=:
25364      for p in $PATH; do
25365        if test -f "$p/$path" && test -x "$p/$path"; then
25366          new_path="$p/$path"
25367          break
25368        fi
25369      done
25370      IFS="$IFS_save"
25371    else
25372      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25373$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25374      new_path="$path"
25375    fi
25376
25377    if test "x$new_path" = x; then
25378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25379$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25380        has_space=`$ECHO "$complete" | $GREP " "`
25381        if test "x$has_space" != x; then
25382          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25383$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25384        fi
25385        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25386      fi
25387  fi
25388
25389      # Now join together the path and the arguments once again
25390      if test "x$arguments" != xEOL; then
25391        new_complete="$new_path ${arguments% *}"
25392      else
25393        new_complete="$new_path"
25394      fi
25395
25396  if test "x$complete" != "x$new_complete"; then
25397      AS="$new_complete"
25398      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25399$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25400    fi
25401
25402else
25403    AS="$CC -c"
25404fi
25405
25406
25407if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25408    # Extract the first word of "nm", so it can be a program name with args.
25409set dummy nm; ac_word=$2
25410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25411$as_echo_n "checking for $ac_word... " >&6; }
25412if test "${ac_cv_path_NM+set}" = set; then :
25413  $as_echo_n "(cached) " >&6
25414else
25415  case $NM in
25416  [\\/]* | ?:[\\/]*)
25417  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25418  ;;
25419  *)
25420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25421for as_dir in $PATH
25422do
25423  IFS=$as_save_IFS
25424  test -z "$as_dir" && as_dir=.
25425    for ac_exec_ext in '' $ac_executable_extensions; do
25426  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25427    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25429    break 2
25430  fi
25431done
25432  done
25433IFS=$as_save_IFS
25434
25435  ;;
25436esac
25437fi
25438NM=$ac_cv_path_NM
25439if test -n "$NM"; then
25440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25441$as_echo "$NM" >&6; }
25442else
25443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25444$as_echo "no" >&6; }
25445fi
25446
25447
25448
25449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25450
25451  # First separate the path from the arguments. This will split at the first
25452  # space.
25453  complete="$NM"
25454  path="${complete%% *}"
25455  tmp="$complete EOL"
25456  arguments="${tmp#* }"
25457
25458  # Input might be given as Windows format, start by converting to
25459  # unix format.
25460  new_path=`$CYGPATH -u "$path"`
25461
25462  # Now try to locate executable using which
25463  new_path=`$WHICH "$new_path" 2> /dev/null`
25464  # bat and cmd files are not always considered executable in cygwin causing which
25465  # to not find them
25466  if test "x$new_path" = x \
25467           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25468           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25469    new_path=`$CYGPATH -u "$path"`
25470  fi
25471  if test "x$new_path" = x; then
25472    # Oops. Which didn't find the executable.
25473    # The splitting of arguments from the executable at a space might have been incorrect,
25474    # since paths with space are more likely in Windows. Give it another try with the whole
25475    # argument.
25476    path="$complete"
25477    arguments="EOL"
25478    new_path=`$CYGPATH -u "$path"`
25479    new_path=`$WHICH "$new_path" 2> /dev/null`
25480    # bat and cmd files are not always considered executable in cygwin causing which
25481    # to not find them
25482    if test "x$new_path" = x \
25483             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25484             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25485      new_path=`$CYGPATH -u "$path"`
25486    fi
25487    if test "x$new_path" = x; then
25488      # It's still not found. Now this is an unrecoverable error.
25489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25490$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25491      has_space=`$ECHO "$complete" | $GREP " "`
25492      if test "x$has_space" != x; then
25493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25495      fi
25496      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25497    fi
25498  fi
25499
25500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25503  # "foo.exe" is OK but "foo" is an error.
25504  #
25505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25506  # It is also a way to make sure we got the proper file name for the real test later on.
25507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25508  if test "x$test_shortpath" = x; then
25509    # Short path failed, file does not exist as specified.
25510    # Try adding .exe or .cmd
25511    if test -f "${new_path}.exe"; then
25512       input_to_shortpath="${new_path}.exe"
25513    elif test -f "${new_path}.cmd"; then
25514       input_to_shortpath="${new_path}.cmd"
25515    else
25516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25517$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25520      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25521    fi
25522  else
25523    input_to_shortpath="$new_path"
25524  fi
25525
25526  # Call helper function which possibly converts this using DOS-style short mode.
25527  # If so, the updated path is stored in $new_path.
25528  new_path="$input_to_shortpath"
25529
25530  input_path="$input_to_shortpath"
25531  # Check if we need to convert this using DOS-style short mode. If the path
25532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25533  # take no chances and rewrite it.
25534  # Note: m4 eats our [], so we need to use [ and ] instead.
25535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25536  if test "x$has_forbidden_chars" != x; then
25537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25541      # Going to short mode and back again did indeed matter. Since short mode is
25542      # case insensitive, let's make it lowercase to improve readability.
25543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25544      # Now convert it back to Unix-stile (cygpath)
25545      input_path=`$CYGPATH -u "$shortmode_path"`
25546      new_path="$input_path"
25547    fi
25548  fi
25549
25550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25551  if test "x$test_cygdrive_prefix" = x; then
25552    # As a simple fix, exclude /usr/bin since it's not a real path.
25553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25555      # a path prefixed by /cygdrive for fixpath to work.
25556      new_path="$CYGWIN_ROOT_PATH$input_path"
25557    fi
25558  fi
25559
25560  # remove trailing .exe if any
25561  new_path="${new_path/%.exe/}"
25562
25563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25564
25565  # First separate the path from the arguments. This will split at the first
25566  # space.
25567  complete="$NM"
25568  path="${complete%% *}"
25569  tmp="$complete EOL"
25570  arguments="${tmp#* }"
25571
25572  # Input might be given as Windows format, start by converting to
25573  # unix format.
25574  new_path="$path"
25575
25576  windows_path="$new_path"
25577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25578    unix_path=`$CYGPATH -u "$windows_path"`
25579    new_path="$unix_path"
25580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25582    new_path="$unix_path"
25583  fi
25584
25585
25586  # Now try to locate executable using which
25587  new_path=`$WHICH "$new_path" 2> /dev/null`
25588
25589  if test "x$new_path" = x; then
25590    # Oops. Which didn't find the executable.
25591    # The splitting of arguments from the executable at a space might have been incorrect,
25592    # since paths with space are more likely in Windows. Give it another try with the whole
25593    # argument.
25594    path="$complete"
25595    arguments="EOL"
25596    new_path="$path"
25597
25598  windows_path="$new_path"
25599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25600    unix_path=`$CYGPATH -u "$windows_path"`
25601    new_path="$unix_path"
25602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25604    new_path="$unix_path"
25605  fi
25606
25607
25608    new_path=`$WHICH "$new_path" 2> /dev/null`
25609
25610    if test "x$new_path" = x; then
25611      # It's still not found. Now this is an unrecoverable error.
25612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25613$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25614      has_space=`$ECHO "$complete" | $GREP " "`
25615      if test "x$has_space" != x; then
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25618      fi
25619      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25620    fi
25621  fi
25622
25623  # Now new_path has a complete unix path to the binary
25624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25625    # Keep paths in /bin as-is, but remove trailing .exe if any
25626    new_path="${new_path/%.exe/}"
25627    # Do not save /bin paths to all_fixpath_prefixes!
25628  else
25629    # Not in mixed or Windows style, start by that.
25630    new_path=`cmd //c echo $new_path`
25631
25632  input_path="$new_path"
25633  # Check if we need to convert this using DOS-style short mode. If the path
25634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25635  # take no chances and rewrite it.
25636  # Note: m4 eats our [], so we need to use [ and ] instead.
25637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25638  if test "x$has_forbidden_chars" != x; then
25639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25641  fi
25642
25643    # Output is in $new_path
25644
25645  windows_path="$new_path"
25646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25647    unix_path=`$CYGPATH -u "$windows_path"`
25648    new_path="$unix_path"
25649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25651    new_path="$unix_path"
25652  fi
25653
25654    # remove trailing .exe if any
25655    new_path="${new_path/%.exe/}"
25656
25657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25659  fi
25660
25661  else
25662    # We're on a posix platform. Hooray! :)
25663    # First separate the path from the arguments. This will split at the first
25664    # space.
25665    complete="$NM"
25666    path="${complete%% *}"
25667    tmp="$complete EOL"
25668    arguments="${tmp#* }"
25669
25670    # Cannot rely on the command "which" here since it doesn't always work.
25671    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25672    if test -z "$is_absolute_path"; then
25673      # Path to executable is not absolute. Find it.
25674      IFS_save="$IFS"
25675      IFS=:
25676      for p in $PATH; do
25677        if test -f "$p/$path" && test -x "$p/$path"; then
25678          new_path="$p/$path"
25679          break
25680        fi
25681      done
25682      IFS="$IFS_save"
25683    else
25684      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25685$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25686      new_path="$path"
25687    fi
25688
25689    if test "x$new_path" = x; then
25690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25691$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25692        has_space=`$ECHO "$complete" | $GREP " "`
25693        if test "x$has_space" != x; then
25694          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25695$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25696        fi
25697        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25698      fi
25699  fi
25700
25701      # Now join together the path and the arguments once again
25702      if test "x$arguments" != xEOL; then
25703        new_complete="$new_path ${arguments% *}"
25704      else
25705        new_complete="$new_path"
25706      fi
25707
25708  if test "x$complete" != "x$new_complete"; then
25709      NM="$new_complete"
25710      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25711$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25712    fi
25713
25714    # Extract the first word of "gnm", so it can be a program name with args.
25715set dummy gnm; ac_word=$2
25716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25717$as_echo_n "checking for $ac_word... " >&6; }
25718if test "${ac_cv_path_GNM+set}" = set; then :
25719  $as_echo_n "(cached) " >&6
25720else
25721  case $GNM in
25722  [\\/]* | ?:[\\/]*)
25723  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25724  ;;
25725  *)
25726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25727for as_dir in $PATH
25728do
25729  IFS=$as_save_IFS
25730  test -z "$as_dir" && as_dir=.
25731    for ac_exec_ext in '' $ac_executable_extensions; do
25732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25733    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25735    break 2
25736  fi
25737done
25738  done
25739IFS=$as_save_IFS
25740
25741  ;;
25742esac
25743fi
25744GNM=$ac_cv_path_GNM
25745if test -n "$GNM"; then
25746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25747$as_echo "$GNM" >&6; }
25748else
25749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25750$as_echo "no" >&6; }
25751fi
25752
25753
25754
25755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25756
25757  # First separate the path from the arguments. This will split at the first
25758  # space.
25759  complete="$GNM"
25760  path="${complete%% *}"
25761  tmp="$complete EOL"
25762  arguments="${tmp#* }"
25763
25764  # Input might be given as Windows format, start by converting to
25765  # unix format.
25766  new_path=`$CYGPATH -u "$path"`
25767
25768  # Now try to locate executable using which
25769  new_path=`$WHICH "$new_path" 2> /dev/null`
25770  # bat and cmd files are not always considered executable in cygwin causing which
25771  # to not find them
25772  if test "x$new_path" = x \
25773           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25774           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25775    new_path=`$CYGPATH -u "$path"`
25776  fi
25777  if test "x$new_path" = x; then
25778    # Oops. Which didn't find the executable.
25779    # The splitting of arguments from the executable at a space might have been incorrect,
25780    # since paths with space are more likely in Windows. Give it another try with the whole
25781    # argument.
25782    path="$complete"
25783    arguments="EOL"
25784    new_path=`$CYGPATH -u "$path"`
25785    new_path=`$WHICH "$new_path" 2> /dev/null`
25786    # bat and cmd files are not always considered executable in cygwin causing which
25787    # to not find them
25788    if test "x$new_path" = x \
25789             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25790             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25791      new_path=`$CYGPATH -u "$path"`
25792    fi
25793    if test "x$new_path" = x; then
25794      # It's still not found. Now this is an unrecoverable error.
25795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25796$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25797      has_space=`$ECHO "$complete" | $GREP " "`
25798      if test "x$has_space" != x; then
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25801      fi
25802      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25803    fi
25804  fi
25805
25806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25809  # "foo.exe" is OK but "foo" is an error.
25810  #
25811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25812  # It is also a way to make sure we got the proper file name for the real test later on.
25813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25814  if test "x$test_shortpath" = x; then
25815    # Short path failed, file does not exist as specified.
25816    # Try adding .exe or .cmd
25817    if test -f "${new_path}.exe"; then
25818       input_to_shortpath="${new_path}.exe"
25819    elif test -f "${new_path}.cmd"; then
25820       input_to_shortpath="${new_path}.cmd"
25821    else
25822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25823$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25826      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25827    fi
25828  else
25829    input_to_shortpath="$new_path"
25830  fi
25831
25832  # Call helper function which possibly converts this using DOS-style short mode.
25833  # If so, the updated path is stored in $new_path.
25834  new_path="$input_to_shortpath"
25835
25836  input_path="$input_to_shortpath"
25837  # Check if we need to convert this using DOS-style short mode. If the path
25838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25839  # take no chances and rewrite it.
25840  # Note: m4 eats our [], so we need to use [ and ] instead.
25841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25842  if test "x$has_forbidden_chars" != x; then
25843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25847      # Going to short mode and back again did indeed matter. Since short mode is
25848      # case insensitive, let's make it lowercase to improve readability.
25849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25850      # Now convert it back to Unix-stile (cygpath)
25851      input_path=`$CYGPATH -u "$shortmode_path"`
25852      new_path="$input_path"
25853    fi
25854  fi
25855
25856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25857  if test "x$test_cygdrive_prefix" = x; then
25858    # As a simple fix, exclude /usr/bin since it's not a real path.
25859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25861      # a path prefixed by /cygdrive for fixpath to work.
25862      new_path="$CYGWIN_ROOT_PATH$input_path"
25863    fi
25864  fi
25865
25866  # remove trailing .exe if any
25867  new_path="${new_path/%.exe/}"
25868
25869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25870
25871  # First separate the path from the arguments. This will split at the first
25872  # space.
25873  complete="$GNM"
25874  path="${complete%% *}"
25875  tmp="$complete EOL"
25876  arguments="${tmp#* }"
25877
25878  # Input might be given as Windows format, start by converting to
25879  # unix format.
25880  new_path="$path"
25881
25882  windows_path="$new_path"
25883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25884    unix_path=`$CYGPATH -u "$windows_path"`
25885    new_path="$unix_path"
25886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25888    new_path="$unix_path"
25889  fi
25890
25891
25892  # Now try to locate executable using which
25893  new_path=`$WHICH "$new_path" 2> /dev/null`
25894
25895  if test "x$new_path" = x; then
25896    # Oops. Which didn't find the executable.
25897    # The splitting of arguments from the executable at a space might have been incorrect,
25898    # since paths with space are more likely in Windows. Give it another try with the whole
25899    # argument.
25900    path="$complete"
25901    arguments="EOL"
25902    new_path="$path"
25903
25904  windows_path="$new_path"
25905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25906    unix_path=`$CYGPATH -u "$windows_path"`
25907    new_path="$unix_path"
25908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25910    new_path="$unix_path"
25911  fi
25912
25913
25914    new_path=`$WHICH "$new_path" 2> /dev/null`
25915
25916    if test "x$new_path" = x; then
25917      # It's still not found. Now this is an unrecoverable error.
25918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25919$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25920      has_space=`$ECHO "$complete" | $GREP " "`
25921      if test "x$has_space" != x; then
25922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25924      fi
25925      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25926    fi
25927  fi
25928
25929  # Now new_path has a complete unix path to the binary
25930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25931    # Keep paths in /bin as-is, but remove trailing .exe if any
25932    new_path="${new_path/%.exe/}"
25933    # Do not save /bin paths to all_fixpath_prefixes!
25934  else
25935    # Not in mixed or Windows style, start by that.
25936    new_path=`cmd //c echo $new_path`
25937
25938  input_path="$new_path"
25939  # Check if we need to convert this using DOS-style short mode. If the path
25940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25941  # take no chances and rewrite it.
25942  # Note: m4 eats our [], so we need to use [ and ] instead.
25943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25944  if test "x$has_forbidden_chars" != x; then
25945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25947  fi
25948
25949    # Output is in $new_path
25950
25951  windows_path="$new_path"
25952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25953    unix_path=`$CYGPATH -u "$windows_path"`
25954    new_path="$unix_path"
25955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25957    new_path="$unix_path"
25958  fi
25959
25960    # remove trailing .exe if any
25961    new_path="${new_path/%.exe/}"
25962
25963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25965  fi
25966
25967  else
25968    # We're on a posix platform. Hooray! :)
25969    # First separate the path from the arguments. This will split at the first
25970    # space.
25971    complete="$GNM"
25972    path="${complete%% *}"
25973    tmp="$complete EOL"
25974    arguments="${tmp#* }"
25975
25976    # Cannot rely on the command "which" here since it doesn't always work.
25977    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25978    if test -z "$is_absolute_path"; then
25979      # Path to executable is not absolute. Find it.
25980      IFS_save="$IFS"
25981      IFS=:
25982      for p in $PATH; do
25983        if test -f "$p/$path" && test -x "$p/$path"; then
25984          new_path="$p/$path"
25985          break
25986        fi
25987      done
25988      IFS="$IFS_save"
25989    else
25990      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25991$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25992      new_path="$path"
25993    fi
25994
25995    if test "x$new_path" = x; then
25996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25997$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25998        has_space=`$ECHO "$complete" | $GREP " "`
25999        if test "x$has_space" != x; then
26000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26002        fi
26003        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26004      fi
26005  fi
26006
26007      # Now join together the path and the arguments once again
26008      if test "x$arguments" != xEOL; then
26009        new_complete="$new_path ${arguments% *}"
26010      else
26011        new_complete="$new_path"
26012      fi
26013
26014  if test "x$complete" != "x$new_complete"; then
26015      GNM="$new_complete"
26016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26017$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26018    fi
26019
26020    # Extract the first word of "strip", so it can be a program name with args.
26021set dummy strip; ac_word=$2
26022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26023$as_echo_n "checking for $ac_word... " >&6; }
26024if test "${ac_cv_path_STRIP+set}" = set; then :
26025  $as_echo_n "(cached) " >&6
26026else
26027  case $STRIP in
26028  [\\/]* | ?:[\\/]*)
26029  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26030  ;;
26031  *)
26032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26033for as_dir in $PATH
26034do
26035  IFS=$as_save_IFS
26036  test -z "$as_dir" && as_dir=.
26037    for ac_exec_ext in '' $ac_executable_extensions; do
26038  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26039    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26041    break 2
26042  fi
26043done
26044  done
26045IFS=$as_save_IFS
26046
26047  ;;
26048esac
26049fi
26050STRIP=$ac_cv_path_STRIP
26051if test -n "$STRIP"; then
26052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26053$as_echo "$STRIP" >&6; }
26054else
26055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26056$as_echo "no" >&6; }
26057fi
26058
26059
26060
26061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26062
26063  # First separate the path from the arguments. This will split at the first
26064  # space.
26065  complete="$STRIP"
26066  path="${complete%% *}"
26067  tmp="$complete EOL"
26068  arguments="${tmp#* }"
26069
26070  # Input might be given as Windows format, start by converting to
26071  # unix format.
26072  new_path=`$CYGPATH -u "$path"`
26073
26074  # Now try to locate executable using which
26075  new_path=`$WHICH "$new_path" 2> /dev/null`
26076  # bat and cmd files are not always considered executable in cygwin causing which
26077  # to not find them
26078  if test "x$new_path" = x \
26079           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26080           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26081    new_path=`$CYGPATH -u "$path"`
26082  fi
26083  if test "x$new_path" = x; then
26084    # Oops. Which didn't find the executable.
26085    # The splitting of arguments from the executable at a space might have been incorrect,
26086    # since paths with space are more likely in Windows. Give it another try with the whole
26087    # argument.
26088    path="$complete"
26089    arguments="EOL"
26090    new_path=`$CYGPATH -u "$path"`
26091    new_path=`$WHICH "$new_path" 2> /dev/null`
26092    # bat and cmd files are not always considered executable in cygwin causing which
26093    # to not find them
26094    if test "x$new_path" = x \
26095             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26096             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26097      new_path=`$CYGPATH -u "$path"`
26098    fi
26099    if test "x$new_path" = x; then
26100      # It's still not found. Now this is an unrecoverable error.
26101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26102$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26103      has_space=`$ECHO "$complete" | $GREP " "`
26104      if test "x$has_space" != x; then
26105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26107      fi
26108      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26109    fi
26110  fi
26111
26112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26115  # "foo.exe" is OK but "foo" is an error.
26116  #
26117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26118  # It is also a way to make sure we got the proper file name for the real test later on.
26119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26120  if test "x$test_shortpath" = x; then
26121    # Short path failed, file does not exist as specified.
26122    # Try adding .exe or .cmd
26123    if test -f "${new_path}.exe"; then
26124       input_to_shortpath="${new_path}.exe"
26125    elif test -f "${new_path}.cmd"; then
26126       input_to_shortpath="${new_path}.cmd"
26127    else
26128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26129$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26132      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26133    fi
26134  else
26135    input_to_shortpath="$new_path"
26136  fi
26137
26138  # Call helper function which possibly converts this using DOS-style short mode.
26139  # If so, the updated path is stored in $new_path.
26140  new_path="$input_to_shortpath"
26141
26142  input_path="$input_to_shortpath"
26143  # Check if we need to convert this using DOS-style short mode. If the path
26144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26145  # take no chances and rewrite it.
26146  # Note: m4 eats our [], so we need to use [ and ] instead.
26147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26148  if test "x$has_forbidden_chars" != x; then
26149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26153      # Going to short mode and back again did indeed matter. Since short mode is
26154      # case insensitive, let's make it lowercase to improve readability.
26155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26156      # Now convert it back to Unix-stile (cygpath)
26157      input_path=`$CYGPATH -u "$shortmode_path"`
26158      new_path="$input_path"
26159    fi
26160  fi
26161
26162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26163  if test "x$test_cygdrive_prefix" = x; then
26164    # As a simple fix, exclude /usr/bin since it's not a real path.
26165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26167      # a path prefixed by /cygdrive for fixpath to work.
26168      new_path="$CYGWIN_ROOT_PATH$input_path"
26169    fi
26170  fi
26171
26172  # remove trailing .exe if any
26173  new_path="${new_path/%.exe/}"
26174
26175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26176
26177  # First separate the path from the arguments. This will split at the first
26178  # space.
26179  complete="$STRIP"
26180  path="${complete%% *}"
26181  tmp="$complete EOL"
26182  arguments="${tmp#* }"
26183
26184  # Input might be given as Windows format, start by converting to
26185  # unix format.
26186  new_path="$path"
26187
26188  windows_path="$new_path"
26189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26190    unix_path=`$CYGPATH -u "$windows_path"`
26191    new_path="$unix_path"
26192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26194    new_path="$unix_path"
26195  fi
26196
26197
26198  # Now try to locate executable using which
26199  new_path=`$WHICH "$new_path" 2> /dev/null`
26200
26201  if test "x$new_path" = x; then
26202    # Oops. Which didn't find the executable.
26203    # The splitting of arguments from the executable at a space might have been incorrect,
26204    # since paths with space are more likely in Windows. Give it another try with the whole
26205    # argument.
26206    path="$complete"
26207    arguments="EOL"
26208    new_path="$path"
26209
26210  windows_path="$new_path"
26211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26212    unix_path=`$CYGPATH -u "$windows_path"`
26213    new_path="$unix_path"
26214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26216    new_path="$unix_path"
26217  fi
26218
26219
26220    new_path=`$WHICH "$new_path" 2> /dev/null`
26221
26222    if test "x$new_path" = x; then
26223      # It's still not found. Now this is an unrecoverable error.
26224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26225$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26226      has_space=`$ECHO "$complete" | $GREP " "`
26227      if test "x$has_space" != x; then
26228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26230      fi
26231      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26232    fi
26233  fi
26234
26235  # Now new_path has a complete unix path to the binary
26236  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26237    # Keep paths in /bin as-is, but remove trailing .exe if any
26238    new_path="${new_path/%.exe/}"
26239    # Do not save /bin paths to all_fixpath_prefixes!
26240  else
26241    # Not in mixed or Windows style, start by that.
26242    new_path=`cmd //c echo $new_path`
26243
26244  input_path="$new_path"
26245  # Check if we need to convert this using DOS-style short mode. If the path
26246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26247  # take no chances and rewrite it.
26248  # Note: m4 eats our [], so we need to use [ and ] instead.
26249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26250  if test "x$has_forbidden_chars" != x; then
26251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26253  fi
26254
26255    # Output is in $new_path
26256
26257  windows_path="$new_path"
26258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26259    unix_path=`$CYGPATH -u "$windows_path"`
26260    new_path="$unix_path"
26261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26263    new_path="$unix_path"
26264  fi
26265
26266    # remove trailing .exe if any
26267    new_path="${new_path/%.exe/}"
26268
26269    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26270    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26271  fi
26272
26273  else
26274    # We're on a posix platform. Hooray! :)
26275    # First separate the path from the arguments. This will split at the first
26276    # space.
26277    complete="$STRIP"
26278    path="${complete%% *}"
26279    tmp="$complete EOL"
26280    arguments="${tmp#* }"
26281
26282    # Cannot rely on the command "which" here since it doesn't always work.
26283    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26284    if test -z "$is_absolute_path"; then
26285      # Path to executable is not absolute. Find it.
26286      IFS_save="$IFS"
26287      IFS=:
26288      for p in $PATH; do
26289        if test -f "$p/$path" && test -x "$p/$path"; then
26290          new_path="$p/$path"
26291          break
26292        fi
26293      done
26294      IFS="$IFS_save"
26295    else
26296      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26297$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26298      new_path="$path"
26299    fi
26300
26301    if test "x$new_path" = x; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26303$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26304        has_space=`$ECHO "$complete" | $GREP " "`
26305        if test "x$has_space" != x; then
26306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26308        fi
26309        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26310      fi
26311  fi
26312
26313      # Now join together the path and the arguments once again
26314      if test "x$arguments" != xEOL; then
26315        new_complete="$new_path ${arguments% *}"
26316      else
26317        new_complete="$new_path"
26318      fi
26319
26320  if test "x$complete" != "x$new_complete"; then
26321      STRIP="$new_complete"
26322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26323$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26324    fi
26325
26326    # Extract the first word of "mcs", so it can be a program name with args.
26327set dummy mcs; ac_word=$2
26328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26329$as_echo_n "checking for $ac_word... " >&6; }
26330if test "${ac_cv_path_MCS+set}" = set; then :
26331  $as_echo_n "(cached) " >&6
26332else
26333  case $MCS in
26334  [\\/]* | ?:[\\/]*)
26335  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26336  ;;
26337  *)
26338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26339for as_dir in $PATH
26340do
26341  IFS=$as_save_IFS
26342  test -z "$as_dir" && as_dir=.
26343    for ac_exec_ext in '' $ac_executable_extensions; do
26344  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26345    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26347    break 2
26348  fi
26349done
26350  done
26351IFS=$as_save_IFS
26352
26353  ;;
26354esac
26355fi
26356MCS=$ac_cv_path_MCS
26357if test -n "$MCS"; then
26358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26359$as_echo "$MCS" >&6; }
26360else
26361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26362$as_echo "no" >&6; }
26363fi
26364
26365
26366
26367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26368
26369  # First separate the path from the arguments. This will split at the first
26370  # space.
26371  complete="$MCS"
26372  path="${complete%% *}"
26373  tmp="$complete EOL"
26374  arguments="${tmp#* }"
26375
26376  # Input might be given as Windows format, start by converting to
26377  # unix format.
26378  new_path=`$CYGPATH -u "$path"`
26379
26380  # Now try to locate executable using which
26381  new_path=`$WHICH "$new_path" 2> /dev/null`
26382  # bat and cmd files are not always considered executable in cygwin causing which
26383  # to not find them
26384  if test "x$new_path" = x \
26385           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26386           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26387    new_path=`$CYGPATH -u "$path"`
26388  fi
26389  if test "x$new_path" = x; then
26390    # Oops. Which didn't find the executable.
26391    # The splitting of arguments from the executable at a space might have been incorrect,
26392    # since paths with space are more likely in Windows. Give it another try with the whole
26393    # argument.
26394    path="$complete"
26395    arguments="EOL"
26396    new_path=`$CYGPATH -u "$path"`
26397    new_path=`$WHICH "$new_path" 2> /dev/null`
26398    # bat and cmd files are not always considered executable in cygwin causing which
26399    # to not find them
26400    if test "x$new_path" = x \
26401             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26402             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26403      new_path=`$CYGPATH -u "$path"`
26404    fi
26405    if test "x$new_path" = x; then
26406      # It's still not found. Now this is an unrecoverable error.
26407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26408$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26409      has_space=`$ECHO "$complete" | $GREP " "`
26410      if test "x$has_space" != x; then
26411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26413      fi
26414      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26415    fi
26416  fi
26417
26418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26421  # "foo.exe" is OK but "foo" is an error.
26422  #
26423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26424  # It is also a way to make sure we got the proper file name for the real test later on.
26425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26426  if test "x$test_shortpath" = x; then
26427    # Short path failed, file does not exist as specified.
26428    # Try adding .exe or .cmd
26429    if test -f "${new_path}.exe"; then
26430       input_to_shortpath="${new_path}.exe"
26431    elif test -f "${new_path}.cmd"; then
26432       input_to_shortpath="${new_path}.cmd"
26433    else
26434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26435$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26438      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26439    fi
26440  else
26441    input_to_shortpath="$new_path"
26442  fi
26443
26444  # Call helper function which possibly converts this using DOS-style short mode.
26445  # If so, the updated path is stored in $new_path.
26446  new_path="$input_to_shortpath"
26447
26448  input_path="$input_to_shortpath"
26449  # Check if we need to convert this using DOS-style short mode. If the path
26450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26451  # take no chances and rewrite it.
26452  # Note: m4 eats our [], so we need to use [ and ] instead.
26453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26454  if test "x$has_forbidden_chars" != x; then
26455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26459      # Going to short mode and back again did indeed matter. Since short mode is
26460      # case insensitive, let's make it lowercase to improve readability.
26461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26462      # Now convert it back to Unix-stile (cygpath)
26463      input_path=`$CYGPATH -u "$shortmode_path"`
26464      new_path="$input_path"
26465    fi
26466  fi
26467
26468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26469  if test "x$test_cygdrive_prefix" = x; then
26470    # As a simple fix, exclude /usr/bin since it's not a real path.
26471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26473      # a path prefixed by /cygdrive for fixpath to work.
26474      new_path="$CYGWIN_ROOT_PATH$input_path"
26475    fi
26476  fi
26477
26478  # remove trailing .exe if any
26479  new_path="${new_path/%.exe/}"
26480
26481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26482
26483  # First separate the path from the arguments. This will split at the first
26484  # space.
26485  complete="$MCS"
26486  path="${complete%% *}"
26487  tmp="$complete EOL"
26488  arguments="${tmp#* }"
26489
26490  # Input might be given as Windows format, start by converting to
26491  # unix format.
26492  new_path="$path"
26493
26494  windows_path="$new_path"
26495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26496    unix_path=`$CYGPATH -u "$windows_path"`
26497    new_path="$unix_path"
26498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26500    new_path="$unix_path"
26501  fi
26502
26503
26504  # Now try to locate executable using which
26505  new_path=`$WHICH "$new_path" 2> /dev/null`
26506
26507  if test "x$new_path" = x; then
26508    # Oops. Which didn't find the executable.
26509    # The splitting of arguments from the executable at a space might have been incorrect,
26510    # since paths with space are more likely in Windows. Give it another try with the whole
26511    # argument.
26512    path="$complete"
26513    arguments="EOL"
26514    new_path="$path"
26515
26516  windows_path="$new_path"
26517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26518    unix_path=`$CYGPATH -u "$windows_path"`
26519    new_path="$unix_path"
26520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26522    new_path="$unix_path"
26523  fi
26524
26525
26526    new_path=`$WHICH "$new_path" 2> /dev/null`
26527
26528    if test "x$new_path" = x; then
26529      # It's still not found. Now this is an unrecoverable error.
26530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26531$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26532      has_space=`$ECHO "$complete" | $GREP " "`
26533      if test "x$has_space" != x; then
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26536      fi
26537      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26538    fi
26539  fi
26540
26541  # Now new_path has a complete unix path to the binary
26542  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26543    # Keep paths in /bin as-is, but remove trailing .exe if any
26544    new_path="${new_path/%.exe/}"
26545    # Do not save /bin paths to all_fixpath_prefixes!
26546  else
26547    # Not in mixed or Windows style, start by that.
26548    new_path=`cmd //c echo $new_path`
26549
26550  input_path="$new_path"
26551  # Check if we need to convert this using DOS-style short mode. If the path
26552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26553  # take no chances and rewrite it.
26554  # Note: m4 eats our [], so we need to use [ and ] instead.
26555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26556  if test "x$has_forbidden_chars" != x; then
26557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26559  fi
26560
26561    # Output is in $new_path
26562
26563  windows_path="$new_path"
26564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26565    unix_path=`$CYGPATH -u "$windows_path"`
26566    new_path="$unix_path"
26567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26569    new_path="$unix_path"
26570  fi
26571
26572    # remove trailing .exe if any
26573    new_path="${new_path/%.exe/}"
26574
26575    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26576    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26577  fi
26578
26579  else
26580    # We're on a posix platform. Hooray! :)
26581    # First separate the path from the arguments. This will split at the first
26582    # space.
26583    complete="$MCS"
26584    path="${complete%% *}"
26585    tmp="$complete EOL"
26586    arguments="${tmp#* }"
26587
26588    # Cannot rely on the command "which" here since it doesn't always work.
26589    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26590    if test -z "$is_absolute_path"; then
26591      # Path to executable is not absolute. Find it.
26592      IFS_save="$IFS"
26593      IFS=:
26594      for p in $PATH; do
26595        if test -f "$p/$path" && test -x "$p/$path"; then
26596          new_path="$p/$path"
26597          break
26598        fi
26599      done
26600      IFS="$IFS_save"
26601    else
26602      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26603$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26604      new_path="$path"
26605    fi
26606
26607    if test "x$new_path" = x; then
26608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26609$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26610        has_space=`$ECHO "$complete" | $GREP " "`
26611        if test "x$has_space" != x; then
26612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26614        fi
26615        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26616      fi
26617  fi
26618
26619      # Now join together the path and the arguments once again
26620      if test "x$arguments" != xEOL; then
26621        new_complete="$new_path ${arguments% *}"
26622      else
26623        new_complete="$new_path"
26624      fi
26625
26626  if test "x$complete" != "x$new_complete"; then
26627      MCS="$new_complete"
26628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26629$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26630    fi
26631
26632elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26633    if test -n "$ac_tool_prefix"; then
26634  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26635set dummy ${ac_tool_prefix}nm; ac_word=$2
26636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26637$as_echo_n "checking for $ac_word... " >&6; }
26638if test "${ac_cv_prog_NM+set}" = set; then :
26639  $as_echo_n "(cached) " >&6
26640else
26641  if test -n "$NM"; then
26642  ac_cv_prog_NM="$NM" # Let the user override the test.
26643else
26644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26645for as_dir in $PATH
26646do
26647  IFS=$as_save_IFS
26648  test -z "$as_dir" && as_dir=.
26649    for ac_exec_ext in '' $ac_executable_extensions; do
26650  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26651    ac_cv_prog_NM="${ac_tool_prefix}nm"
26652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26653    break 2
26654  fi
26655done
26656  done
26657IFS=$as_save_IFS
26658
26659fi
26660fi
26661NM=$ac_cv_prog_NM
26662if test -n "$NM"; then
26663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26664$as_echo "$NM" >&6; }
26665else
26666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26667$as_echo "no" >&6; }
26668fi
26669
26670
26671fi
26672if test -z "$ac_cv_prog_NM"; then
26673  ac_ct_NM=$NM
26674  # Extract the first word of "nm", so it can be a program name with args.
26675set dummy nm; ac_word=$2
26676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26677$as_echo_n "checking for $ac_word... " >&6; }
26678if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26679  $as_echo_n "(cached) " >&6
26680else
26681  if test -n "$ac_ct_NM"; then
26682  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26683else
26684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26685for as_dir in $PATH
26686do
26687  IFS=$as_save_IFS
26688  test -z "$as_dir" && as_dir=.
26689    for ac_exec_ext in '' $ac_executable_extensions; do
26690  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26691    ac_cv_prog_ac_ct_NM="nm"
26692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26693    break 2
26694  fi
26695done
26696  done
26697IFS=$as_save_IFS
26698
26699fi
26700fi
26701ac_ct_NM=$ac_cv_prog_ac_ct_NM
26702if test -n "$ac_ct_NM"; then
26703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26704$as_echo "$ac_ct_NM" >&6; }
26705else
26706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26707$as_echo "no" >&6; }
26708fi
26709
26710  if test "x$ac_ct_NM" = x; then
26711    NM=""
26712  else
26713    case $cross_compiling:$ac_tool_warned in
26714yes:)
26715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26717ac_tool_warned=yes ;;
26718esac
26719    NM=$ac_ct_NM
26720  fi
26721else
26722  NM="$ac_cv_prog_NM"
26723fi
26724
26725
26726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26727
26728  # First separate the path from the arguments. This will split at the first
26729  # space.
26730  complete="$NM"
26731  path="${complete%% *}"
26732  tmp="$complete EOL"
26733  arguments="${tmp#* }"
26734
26735  # Input might be given as Windows format, start by converting to
26736  # unix format.
26737  new_path=`$CYGPATH -u "$path"`
26738
26739  # Now try to locate executable using which
26740  new_path=`$WHICH "$new_path" 2> /dev/null`
26741  # bat and cmd files are not always considered executable in cygwin causing which
26742  # to not find them
26743  if test "x$new_path" = x \
26744           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26745           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26746    new_path=`$CYGPATH -u "$path"`
26747  fi
26748  if test "x$new_path" = x; then
26749    # Oops. Which didn't find the executable.
26750    # The splitting of arguments from the executable at a space might have been incorrect,
26751    # since paths with space are more likely in Windows. Give it another try with the whole
26752    # argument.
26753    path="$complete"
26754    arguments="EOL"
26755    new_path=`$CYGPATH -u "$path"`
26756    new_path=`$WHICH "$new_path" 2> /dev/null`
26757    # bat and cmd files are not always considered executable in cygwin causing which
26758    # to not find them
26759    if test "x$new_path" = x \
26760             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26761             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26762      new_path=`$CYGPATH -u "$path"`
26763    fi
26764    if test "x$new_path" = x; then
26765      # It's still not found. Now this is an unrecoverable error.
26766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26767$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26768      has_space=`$ECHO "$complete" | $GREP " "`
26769      if test "x$has_space" != x; then
26770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26772      fi
26773      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26774    fi
26775  fi
26776
26777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26780  # "foo.exe" is OK but "foo" is an error.
26781  #
26782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26783  # It is also a way to make sure we got the proper file name for the real test later on.
26784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26785  if test "x$test_shortpath" = x; then
26786    # Short path failed, file does not exist as specified.
26787    # Try adding .exe or .cmd
26788    if test -f "${new_path}.exe"; then
26789       input_to_shortpath="${new_path}.exe"
26790    elif test -f "${new_path}.cmd"; then
26791       input_to_shortpath="${new_path}.cmd"
26792    else
26793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26794$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26797      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26798    fi
26799  else
26800    input_to_shortpath="$new_path"
26801  fi
26802
26803  # Call helper function which possibly converts this using DOS-style short mode.
26804  # If so, the updated path is stored in $new_path.
26805  new_path="$input_to_shortpath"
26806
26807  input_path="$input_to_shortpath"
26808  # Check if we need to convert this using DOS-style short mode. If the path
26809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26810  # take no chances and rewrite it.
26811  # Note: m4 eats our [], so we need to use [ and ] instead.
26812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26813  if test "x$has_forbidden_chars" != x; then
26814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26818      # Going to short mode and back again did indeed matter. Since short mode is
26819      # case insensitive, let's make it lowercase to improve readability.
26820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26821      # Now convert it back to Unix-stile (cygpath)
26822      input_path=`$CYGPATH -u "$shortmode_path"`
26823      new_path="$input_path"
26824    fi
26825  fi
26826
26827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26828  if test "x$test_cygdrive_prefix" = x; then
26829    # As a simple fix, exclude /usr/bin since it's not a real path.
26830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26832      # a path prefixed by /cygdrive for fixpath to work.
26833      new_path="$CYGWIN_ROOT_PATH$input_path"
26834    fi
26835  fi
26836
26837  # remove trailing .exe if any
26838  new_path="${new_path/%.exe/}"
26839
26840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26841
26842  # First separate the path from the arguments. This will split at the first
26843  # space.
26844  complete="$NM"
26845  path="${complete%% *}"
26846  tmp="$complete EOL"
26847  arguments="${tmp#* }"
26848
26849  # Input might be given as Windows format, start by converting to
26850  # unix format.
26851  new_path="$path"
26852
26853  windows_path="$new_path"
26854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26855    unix_path=`$CYGPATH -u "$windows_path"`
26856    new_path="$unix_path"
26857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26859    new_path="$unix_path"
26860  fi
26861
26862
26863  # Now try to locate executable using which
26864  new_path=`$WHICH "$new_path" 2> /dev/null`
26865
26866  if test "x$new_path" = x; then
26867    # Oops. Which didn't find the executable.
26868    # The splitting of arguments from the executable at a space might have been incorrect,
26869    # since paths with space are more likely in Windows. Give it another try with the whole
26870    # argument.
26871    path="$complete"
26872    arguments="EOL"
26873    new_path="$path"
26874
26875  windows_path="$new_path"
26876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26877    unix_path=`$CYGPATH -u "$windows_path"`
26878    new_path="$unix_path"
26879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26881    new_path="$unix_path"
26882  fi
26883
26884
26885    new_path=`$WHICH "$new_path" 2> /dev/null`
26886
26887    if test "x$new_path" = x; then
26888      # It's still not found. Now this is an unrecoverable error.
26889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26890$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26891      has_space=`$ECHO "$complete" | $GREP " "`
26892      if test "x$has_space" != x; then
26893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26895      fi
26896      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26897    fi
26898  fi
26899
26900  # Now new_path has a complete unix path to the binary
26901  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26902    # Keep paths in /bin as-is, but remove trailing .exe if any
26903    new_path="${new_path/%.exe/}"
26904    # Do not save /bin paths to all_fixpath_prefixes!
26905  else
26906    # Not in mixed or Windows style, start by that.
26907    new_path=`cmd //c echo $new_path`
26908
26909  input_path="$new_path"
26910  # Check if we need to convert this using DOS-style short mode. If the path
26911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26912  # take no chances and rewrite it.
26913  # Note: m4 eats our [], so we need to use [ and ] instead.
26914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26915  if test "x$has_forbidden_chars" != x; then
26916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26918  fi
26919
26920    # Output is in $new_path
26921
26922  windows_path="$new_path"
26923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26924    unix_path=`$CYGPATH -u "$windows_path"`
26925    new_path="$unix_path"
26926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26928    new_path="$unix_path"
26929  fi
26930
26931    # remove trailing .exe if any
26932    new_path="${new_path/%.exe/}"
26933
26934    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26935    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26936  fi
26937
26938  else
26939    # We're on a posix platform. Hooray! :)
26940    # First separate the path from the arguments. This will split at the first
26941    # space.
26942    complete="$NM"
26943    path="${complete%% *}"
26944    tmp="$complete EOL"
26945    arguments="${tmp#* }"
26946
26947    # Cannot rely on the command "which" here since it doesn't always work.
26948    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26949    if test -z "$is_absolute_path"; then
26950      # Path to executable is not absolute. Find it.
26951      IFS_save="$IFS"
26952      IFS=:
26953      for p in $PATH; do
26954        if test -f "$p/$path" && test -x "$p/$path"; then
26955          new_path="$p/$path"
26956          break
26957        fi
26958      done
26959      IFS="$IFS_save"
26960    else
26961      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26962$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26963      new_path="$path"
26964    fi
26965
26966    if test "x$new_path" = x; then
26967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26968$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26969        has_space=`$ECHO "$complete" | $GREP " "`
26970        if test "x$has_space" != x; then
26971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26973        fi
26974        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26975      fi
26976  fi
26977
26978      # Now join together the path and the arguments once again
26979      if test "x$arguments" != xEOL; then
26980        new_complete="$new_path ${arguments% *}"
26981      else
26982        new_complete="$new_path"
26983      fi
26984
26985  if test "x$complete" != "x$new_complete"; then
26986      NM="$new_complete"
26987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26988$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26989    fi
26990
26991    GNM="$NM"
26992
26993    if test -n "$ac_tool_prefix"; then
26994  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26995set dummy ${ac_tool_prefix}strip; ac_word=$2
26996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26997$as_echo_n "checking for $ac_word... " >&6; }
26998if test "${ac_cv_prog_STRIP+set}" = set; then :
26999  $as_echo_n "(cached) " >&6
27000else
27001  if test -n "$STRIP"; then
27002  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27003else
27004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27005for as_dir in $PATH
27006do
27007  IFS=$as_save_IFS
27008  test -z "$as_dir" && as_dir=.
27009    for ac_exec_ext in '' $ac_executable_extensions; do
27010  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27011    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27013    break 2
27014  fi
27015done
27016  done
27017IFS=$as_save_IFS
27018
27019fi
27020fi
27021STRIP=$ac_cv_prog_STRIP
27022if test -n "$STRIP"; then
27023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27024$as_echo "$STRIP" >&6; }
27025else
27026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27027$as_echo "no" >&6; }
27028fi
27029
27030
27031fi
27032if test -z "$ac_cv_prog_STRIP"; then
27033  ac_ct_STRIP=$STRIP
27034  # Extract the first word of "strip", so it can be a program name with args.
27035set dummy strip; ac_word=$2
27036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27037$as_echo_n "checking for $ac_word... " >&6; }
27038if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27039  $as_echo_n "(cached) " >&6
27040else
27041  if test -n "$ac_ct_STRIP"; then
27042  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27043else
27044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27045for as_dir in $PATH
27046do
27047  IFS=$as_save_IFS
27048  test -z "$as_dir" && as_dir=.
27049    for ac_exec_ext in '' $ac_executable_extensions; do
27050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27051    ac_cv_prog_ac_ct_STRIP="strip"
27052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27053    break 2
27054  fi
27055done
27056  done
27057IFS=$as_save_IFS
27058
27059fi
27060fi
27061ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27062if test -n "$ac_ct_STRIP"; then
27063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27064$as_echo "$ac_ct_STRIP" >&6; }
27065else
27066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27067$as_echo "no" >&6; }
27068fi
27069
27070  if test "x$ac_ct_STRIP" = x; then
27071    STRIP=""
27072  else
27073    case $cross_compiling:$ac_tool_warned in
27074yes:)
27075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27077ac_tool_warned=yes ;;
27078esac
27079    STRIP=$ac_ct_STRIP
27080  fi
27081else
27082  STRIP="$ac_cv_prog_STRIP"
27083fi
27084
27085
27086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27087
27088  # First separate the path from the arguments. This will split at the first
27089  # space.
27090  complete="$STRIP"
27091  path="${complete%% *}"
27092  tmp="$complete EOL"
27093  arguments="${tmp#* }"
27094
27095  # Input might be given as Windows format, start by converting to
27096  # unix format.
27097  new_path=`$CYGPATH -u "$path"`
27098
27099  # Now try to locate executable using which
27100  new_path=`$WHICH "$new_path" 2> /dev/null`
27101  # bat and cmd files are not always considered executable in cygwin causing which
27102  # to not find them
27103  if test "x$new_path" = x \
27104           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27105           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27106    new_path=`$CYGPATH -u "$path"`
27107  fi
27108  if test "x$new_path" = x; then
27109    # Oops. Which didn't find the executable.
27110    # The splitting of arguments from the executable at a space might have been incorrect,
27111    # since paths with space are more likely in Windows. Give it another try with the whole
27112    # argument.
27113    path="$complete"
27114    arguments="EOL"
27115    new_path=`$CYGPATH -u "$path"`
27116    new_path=`$WHICH "$new_path" 2> /dev/null`
27117    # bat and cmd files are not always considered executable in cygwin causing which
27118    # to not find them
27119    if test "x$new_path" = x \
27120             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27121             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27122      new_path=`$CYGPATH -u "$path"`
27123    fi
27124    if test "x$new_path" = x; then
27125      # It's still not found. Now this is an unrecoverable error.
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27127$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27128      has_space=`$ECHO "$complete" | $GREP " "`
27129      if test "x$has_space" != x; then
27130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27132      fi
27133      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27134    fi
27135  fi
27136
27137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27140  # "foo.exe" is OK but "foo" is an error.
27141  #
27142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27143  # It is also a way to make sure we got the proper file name for the real test later on.
27144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27145  if test "x$test_shortpath" = x; then
27146    # Short path failed, file does not exist as specified.
27147    # Try adding .exe or .cmd
27148    if test -f "${new_path}.exe"; then
27149       input_to_shortpath="${new_path}.exe"
27150    elif test -f "${new_path}.cmd"; then
27151       input_to_shortpath="${new_path}.cmd"
27152    else
27153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27154$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27157      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27158    fi
27159  else
27160    input_to_shortpath="$new_path"
27161  fi
27162
27163  # Call helper function which possibly converts this using DOS-style short mode.
27164  # If so, the updated path is stored in $new_path.
27165  new_path="$input_to_shortpath"
27166
27167  input_path="$input_to_shortpath"
27168  # Check if we need to convert this using DOS-style short mode. If the path
27169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27170  # take no chances and rewrite it.
27171  # Note: m4 eats our [], so we need to use [ and ] instead.
27172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27173  if test "x$has_forbidden_chars" != x; then
27174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27178      # Going to short mode and back again did indeed matter. Since short mode is
27179      # case insensitive, let's make it lowercase to improve readability.
27180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27181      # Now convert it back to Unix-stile (cygpath)
27182      input_path=`$CYGPATH -u "$shortmode_path"`
27183      new_path="$input_path"
27184    fi
27185  fi
27186
27187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27188  if test "x$test_cygdrive_prefix" = x; then
27189    # As a simple fix, exclude /usr/bin since it's not a real path.
27190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27192      # a path prefixed by /cygdrive for fixpath to work.
27193      new_path="$CYGWIN_ROOT_PATH$input_path"
27194    fi
27195  fi
27196
27197  # remove trailing .exe if any
27198  new_path="${new_path/%.exe/}"
27199
27200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27201
27202  # First separate the path from the arguments. This will split at the first
27203  # space.
27204  complete="$STRIP"
27205  path="${complete%% *}"
27206  tmp="$complete EOL"
27207  arguments="${tmp#* }"
27208
27209  # Input might be given as Windows format, start by converting to
27210  # unix format.
27211  new_path="$path"
27212
27213  windows_path="$new_path"
27214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27215    unix_path=`$CYGPATH -u "$windows_path"`
27216    new_path="$unix_path"
27217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27219    new_path="$unix_path"
27220  fi
27221
27222
27223  # Now try to locate executable using which
27224  new_path=`$WHICH "$new_path" 2> /dev/null`
27225
27226  if test "x$new_path" = x; then
27227    # Oops. Which didn't find the executable.
27228    # The splitting of arguments from the executable at a space might have been incorrect,
27229    # since paths with space are more likely in Windows. Give it another try with the whole
27230    # argument.
27231    path="$complete"
27232    arguments="EOL"
27233    new_path="$path"
27234
27235  windows_path="$new_path"
27236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27237    unix_path=`$CYGPATH -u "$windows_path"`
27238    new_path="$unix_path"
27239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27241    new_path="$unix_path"
27242  fi
27243
27244
27245    new_path=`$WHICH "$new_path" 2> /dev/null`
27246
27247    if test "x$new_path" = x; then
27248      # It's still not found. Now this is an unrecoverable error.
27249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27250$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27251      has_space=`$ECHO "$complete" | $GREP " "`
27252      if test "x$has_space" != x; then
27253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27255      fi
27256      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27257    fi
27258  fi
27259
27260  # Now new_path has a complete unix path to the binary
27261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27262    # Keep paths in /bin as-is, but remove trailing .exe if any
27263    new_path="${new_path/%.exe/}"
27264    # Do not save /bin paths to all_fixpath_prefixes!
27265  else
27266    # Not in mixed or Windows style, start by that.
27267    new_path=`cmd //c echo $new_path`
27268
27269  input_path="$new_path"
27270  # Check if we need to convert this using DOS-style short mode. If the path
27271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27272  # take no chances and rewrite it.
27273  # Note: m4 eats our [], so we need to use [ and ] instead.
27274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27275  if test "x$has_forbidden_chars" != x; then
27276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27278  fi
27279
27280    # Output is in $new_path
27281
27282  windows_path="$new_path"
27283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27284    unix_path=`$CYGPATH -u "$windows_path"`
27285    new_path="$unix_path"
27286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27288    new_path="$unix_path"
27289  fi
27290
27291    # remove trailing .exe if any
27292    new_path="${new_path/%.exe/}"
27293
27294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27296  fi
27297
27298  else
27299    # We're on a posix platform. Hooray! :)
27300    # First separate the path from the arguments. This will split at the first
27301    # space.
27302    complete="$STRIP"
27303    path="${complete%% *}"
27304    tmp="$complete EOL"
27305    arguments="${tmp#* }"
27306
27307    # Cannot rely on the command "which" here since it doesn't always work.
27308    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27309    if test -z "$is_absolute_path"; then
27310      # Path to executable is not absolute. Find it.
27311      IFS_save="$IFS"
27312      IFS=:
27313      for p in $PATH; do
27314        if test -f "$p/$path" && test -x "$p/$path"; then
27315          new_path="$p/$path"
27316          break
27317        fi
27318      done
27319      IFS="$IFS_save"
27320    else
27321      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27322$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27323      new_path="$path"
27324    fi
27325
27326    if test "x$new_path" = x; then
27327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27328$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27329        has_space=`$ECHO "$complete" | $GREP " "`
27330        if test "x$has_space" != x; then
27331          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27333        fi
27334        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27335      fi
27336  fi
27337
27338      # Now join together the path and the arguments once again
27339      if test "x$arguments" != xEOL; then
27340        new_complete="$new_path ${arguments% *}"
27341      else
27342        new_complete="$new_path"
27343      fi
27344
27345  if test "x$complete" != "x$new_complete"; then
27346      STRIP="$new_complete"
27347      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27348$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27349    fi
27350
27351fi
27352
27353# objcopy is used for moving debug symbols to separate files when
27354# full debug symbols are enabled.
27355if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27356    if test -n "$ac_tool_prefix"; then
27357  for ac_prog in gobjcopy objcopy
27358  do
27359    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27360set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27362$as_echo_n "checking for $ac_word... " >&6; }
27363if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27364  $as_echo_n "(cached) " >&6
27365else
27366  if test -n "$OBJCOPY"; then
27367  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27368else
27369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27370for as_dir in $PATH
27371do
27372  IFS=$as_save_IFS
27373  test -z "$as_dir" && as_dir=.
27374    for ac_exec_ext in '' $ac_executable_extensions; do
27375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27376    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27378    break 2
27379  fi
27380done
27381  done
27382IFS=$as_save_IFS
27383
27384fi
27385fi
27386OBJCOPY=$ac_cv_prog_OBJCOPY
27387if test -n "$OBJCOPY"; then
27388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27389$as_echo "$OBJCOPY" >&6; }
27390else
27391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27392$as_echo "no" >&6; }
27393fi
27394
27395
27396    test -n "$OBJCOPY" && break
27397  done
27398fi
27399if test -z "$OBJCOPY"; then
27400  ac_ct_OBJCOPY=$OBJCOPY
27401  for ac_prog in gobjcopy objcopy
27402do
27403  # Extract the first word of "$ac_prog", so it can be a program name with args.
27404set dummy $ac_prog; ac_word=$2
27405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27406$as_echo_n "checking for $ac_word... " >&6; }
27407if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27408  $as_echo_n "(cached) " >&6
27409else
27410  if test -n "$ac_ct_OBJCOPY"; then
27411  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27412else
27413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27414for as_dir in $PATH
27415do
27416  IFS=$as_save_IFS
27417  test -z "$as_dir" && as_dir=.
27418    for ac_exec_ext in '' $ac_executable_extensions; do
27419  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27420    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27422    break 2
27423  fi
27424done
27425  done
27426IFS=$as_save_IFS
27427
27428fi
27429fi
27430ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27431if test -n "$ac_ct_OBJCOPY"; then
27432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27433$as_echo "$ac_ct_OBJCOPY" >&6; }
27434else
27435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27436$as_echo "no" >&6; }
27437fi
27438
27439
27440  test -n "$ac_ct_OBJCOPY" && break
27441done
27442
27443  if test "x$ac_ct_OBJCOPY" = x; then
27444    OBJCOPY=""
27445  else
27446    case $cross_compiling:$ac_tool_warned in
27447yes:)
27448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27450ac_tool_warned=yes ;;
27451esac
27452    OBJCOPY=$ac_ct_OBJCOPY
27453  fi
27454fi
27455
27456    # Only call fixup if objcopy was found.
27457    if test -n "$OBJCOPY"; then
27458
27459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27460
27461  # First separate the path from the arguments. This will split at the first
27462  # space.
27463  complete="$OBJCOPY"
27464  path="${complete%% *}"
27465  tmp="$complete EOL"
27466  arguments="${tmp#* }"
27467
27468  # Input might be given as Windows format, start by converting to
27469  # unix format.
27470  new_path=`$CYGPATH -u "$path"`
27471
27472  # Now try to locate executable using which
27473  new_path=`$WHICH "$new_path" 2> /dev/null`
27474  # bat and cmd files are not always considered executable in cygwin causing which
27475  # to not find them
27476  if test "x$new_path" = x \
27477           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27478           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27479    new_path=`$CYGPATH -u "$path"`
27480  fi
27481  if test "x$new_path" = x; then
27482    # Oops. Which didn't find the executable.
27483    # The splitting of arguments from the executable at a space might have been incorrect,
27484    # since paths with space are more likely in Windows. Give it another try with the whole
27485    # argument.
27486    path="$complete"
27487    arguments="EOL"
27488    new_path=`$CYGPATH -u "$path"`
27489    new_path=`$WHICH "$new_path" 2> /dev/null`
27490    # bat and cmd files are not always considered executable in cygwin causing which
27491    # to not find them
27492    if test "x$new_path" = x \
27493             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27494             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27495      new_path=`$CYGPATH -u "$path"`
27496    fi
27497    if test "x$new_path" = x; then
27498      # It's still not found. Now this is an unrecoverable error.
27499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27500$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27501      has_space=`$ECHO "$complete" | $GREP " "`
27502      if test "x$has_space" != x; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27505      fi
27506      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27507    fi
27508  fi
27509
27510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27513  # "foo.exe" is OK but "foo" is an error.
27514  #
27515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27516  # It is also a way to make sure we got the proper file name for the real test later on.
27517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27518  if test "x$test_shortpath" = x; then
27519    # Short path failed, file does not exist as specified.
27520    # Try adding .exe or .cmd
27521    if test -f "${new_path}.exe"; then
27522       input_to_shortpath="${new_path}.exe"
27523    elif test -f "${new_path}.cmd"; then
27524       input_to_shortpath="${new_path}.cmd"
27525    else
27526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27527$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27530      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27531    fi
27532  else
27533    input_to_shortpath="$new_path"
27534  fi
27535
27536  # Call helper function which possibly converts this using DOS-style short mode.
27537  # If so, the updated path is stored in $new_path.
27538  new_path="$input_to_shortpath"
27539
27540  input_path="$input_to_shortpath"
27541  # Check if we need to convert this using DOS-style short mode. If the path
27542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27543  # take no chances and rewrite it.
27544  # Note: m4 eats our [], so we need to use [ and ] instead.
27545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27546  if test "x$has_forbidden_chars" != x; then
27547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27551      # Going to short mode and back again did indeed matter. Since short mode is
27552      # case insensitive, let's make it lowercase to improve readability.
27553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27554      # Now convert it back to Unix-stile (cygpath)
27555      input_path=`$CYGPATH -u "$shortmode_path"`
27556      new_path="$input_path"
27557    fi
27558  fi
27559
27560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27561  if test "x$test_cygdrive_prefix" = x; then
27562    # As a simple fix, exclude /usr/bin since it's not a real path.
27563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27565      # a path prefixed by /cygdrive for fixpath to work.
27566      new_path="$CYGWIN_ROOT_PATH$input_path"
27567    fi
27568  fi
27569
27570  # remove trailing .exe if any
27571  new_path="${new_path/%.exe/}"
27572
27573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27574
27575  # First separate the path from the arguments. This will split at the first
27576  # space.
27577  complete="$OBJCOPY"
27578  path="${complete%% *}"
27579  tmp="$complete EOL"
27580  arguments="${tmp#* }"
27581
27582  # Input might be given as Windows format, start by converting to
27583  # unix format.
27584  new_path="$path"
27585
27586  windows_path="$new_path"
27587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27588    unix_path=`$CYGPATH -u "$windows_path"`
27589    new_path="$unix_path"
27590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27592    new_path="$unix_path"
27593  fi
27594
27595
27596  # Now try to locate executable using which
27597  new_path=`$WHICH "$new_path" 2> /dev/null`
27598
27599  if test "x$new_path" = x; then
27600    # Oops. Which didn't find the executable.
27601    # The splitting of arguments from the executable at a space might have been incorrect,
27602    # since paths with space are more likely in Windows. Give it another try with the whole
27603    # argument.
27604    path="$complete"
27605    arguments="EOL"
27606    new_path="$path"
27607
27608  windows_path="$new_path"
27609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27610    unix_path=`$CYGPATH -u "$windows_path"`
27611    new_path="$unix_path"
27612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27614    new_path="$unix_path"
27615  fi
27616
27617
27618    new_path=`$WHICH "$new_path" 2> /dev/null`
27619
27620    if test "x$new_path" = x; then
27621      # It's still not found. Now this is an unrecoverable error.
27622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27623$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27624      has_space=`$ECHO "$complete" | $GREP " "`
27625      if test "x$has_space" != x; then
27626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27628      fi
27629      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27630    fi
27631  fi
27632
27633  # Now new_path has a complete unix path to the binary
27634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27635    # Keep paths in /bin as-is, but remove trailing .exe if any
27636    new_path="${new_path/%.exe/}"
27637    # Do not save /bin paths to all_fixpath_prefixes!
27638  else
27639    # Not in mixed or Windows style, start by that.
27640    new_path=`cmd //c echo $new_path`
27641
27642  input_path="$new_path"
27643  # Check if we need to convert this using DOS-style short mode. If the path
27644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27645  # take no chances and rewrite it.
27646  # Note: m4 eats our [], so we need to use [ and ] instead.
27647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27648  if test "x$has_forbidden_chars" != x; then
27649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27651  fi
27652
27653    # Output is in $new_path
27654
27655  windows_path="$new_path"
27656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27657    unix_path=`$CYGPATH -u "$windows_path"`
27658    new_path="$unix_path"
27659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27661    new_path="$unix_path"
27662  fi
27663
27664    # remove trailing .exe if any
27665    new_path="${new_path/%.exe/}"
27666
27667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27669  fi
27670
27671  else
27672    # We're on a posix platform. Hooray! :)
27673    # First separate the path from the arguments. This will split at the first
27674    # space.
27675    complete="$OBJCOPY"
27676    path="${complete%% *}"
27677    tmp="$complete EOL"
27678    arguments="${tmp#* }"
27679
27680    # Cannot rely on the command "which" here since it doesn't always work.
27681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27682    if test -z "$is_absolute_path"; then
27683      # Path to executable is not absolute. Find it.
27684      IFS_save="$IFS"
27685      IFS=:
27686      for p in $PATH; do
27687        if test -f "$p/$path" && test -x "$p/$path"; then
27688          new_path="$p/$path"
27689          break
27690        fi
27691      done
27692      IFS="$IFS_save"
27693    else
27694      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27695$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27696      new_path="$path"
27697    fi
27698
27699    if test "x$new_path" = x; then
27700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27701$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27702        has_space=`$ECHO "$complete" | $GREP " "`
27703        if test "x$has_space" != x; then
27704          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27706        fi
27707        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27708      fi
27709  fi
27710
27711      # Now join together the path and the arguments once again
27712      if test "x$arguments" != xEOL; then
27713        new_complete="$new_path ${arguments% *}"
27714      else
27715        new_complete="$new_path"
27716      fi
27717
27718  if test "x$complete" != "x$new_complete"; then
27719      OBJCOPY="$new_complete"
27720      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27721$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27722    fi
27723
27724    fi
27725fi
27726
27727if test -n "$ac_tool_prefix"; then
27728  for ac_prog in gobjdump objdump
27729  do
27730    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27733$as_echo_n "checking for $ac_word... " >&6; }
27734if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27735  $as_echo_n "(cached) " >&6
27736else
27737  if test -n "$OBJDUMP"; then
27738  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27739else
27740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27741for as_dir in $PATH
27742do
27743  IFS=$as_save_IFS
27744  test -z "$as_dir" && as_dir=.
27745    for ac_exec_ext in '' $ac_executable_extensions; do
27746  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27747    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27749    break 2
27750  fi
27751done
27752  done
27753IFS=$as_save_IFS
27754
27755fi
27756fi
27757OBJDUMP=$ac_cv_prog_OBJDUMP
27758if test -n "$OBJDUMP"; then
27759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27760$as_echo "$OBJDUMP" >&6; }
27761else
27762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27763$as_echo "no" >&6; }
27764fi
27765
27766
27767    test -n "$OBJDUMP" && break
27768  done
27769fi
27770if test -z "$OBJDUMP"; then
27771  ac_ct_OBJDUMP=$OBJDUMP
27772  for ac_prog in gobjdump objdump
27773do
27774  # Extract the first word of "$ac_prog", so it can be a program name with args.
27775set dummy $ac_prog; ac_word=$2
27776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27777$as_echo_n "checking for $ac_word... " >&6; }
27778if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27779  $as_echo_n "(cached) " >&6
27780else
27781  if test -n "$ac_ct_OBJDUMP"; then
27782  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27783else
27784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27785for as_dir in $PATH
27786do
27787  IFS=$as_save_IFS
27788  test -z "$as_dir" && as_dir=.
27789    for ac_exec_ext in '' $ac_executable_extensions; do
27790  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27791    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27793    break 2
27794  fi
27795done
27796  done
27797IFS=$as_save_IFS
27798
27799fi
27800fi
27801ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27802if test -n "$ac_ct_OBJDUMP"; then
27803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27804$as_echo "$ac_ct_OBJDUMP" >&6; }
27805else
27806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27807$as_echo "no" >&6; }
27808fi
27809
27810
27811  test -n "$ac_ct_OBJDUMP" && break
27812done
27813
27814  if test "x$ac_ct_OBJDUMP" = x; then
27815    OBJDUMP=""
27816  else
27817    case $cross_compiling:$ac_tool_warned in
27818yes:)
27819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27821ac_tool_warned=yes ;;
27822esac
27823    OBJDUMP=$ac_ct_OBJDUMP
27824  fi
27825fi
27826
27827if test "x$OBJDUMP" != x; then
27828  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27829
27830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27831
27832  # First separate the path from the arguments. This will split at the first
27833  # space.
27834  complete="$OBJDUMP"
27835  path="${complete%% *}"
27836  tmp="$complete EOL"
27837  arguments="${tmp#* }"
27838
27839  # Input might be given as Windows format, start by converting to
27840  # unix format.
27841  new_path=`$CYGPATH -u "$path"`
27842
27843  # Now try to locate executable using which
27844  new_path=`$WHICH "$new_path" 2> /dev/null`
27845  # bat and cmd files are not always considered executable in cygwin causing which
27846  # to not find them
27847  if test "x$new_path" = x \
27848           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27849           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27850    new_path=`$CYGPATH -u "$path"`
27851  fi
27852  if test "x$new_path" = x; then
27853    # Oops. Which didn't find the executable.
27854    # The splitting of arguments from the executable at a space might have been incorrect,
27855    # since paths with space are more likely in Windows. Give it another try with the whole
27856    # argument.
27857    path="$complete"
27858    arguments="EOL"
27859    new_path=`$CYGPATH -u "$path"`
27860    new_path=`$WHICH "$new_path" 2> /dev/null`
27861    # bat and cmd files are not always considered executable in cygwin causing which
27862    # to not find them
27863    if test "x$new_path" = x \
27864             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27865             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27866      new_path=`$CYGPATH -u "$path"`
27867    fi
27868    if test "x$new_path" = x; then
27869      # It's still not found. Now this is an unrecoverable error.
27870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27871$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27872      has_space=`$ECHO "$complete" | $GREP " "`
27873      if test "x$has_space" != x; then
27874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27876      fi
27877      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27878    fi
27879  fi
27880
27881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27884  # "foo.exe" is OK but "foo" is an error.
27885  #
27886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27887  # It is also a way to make sure we got the proper file name for the real test later on.
27888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27889  if test "x$test_shortpath" = x; then
27890    # Short path failed, file does not exist as specified.
27891    # Try adding .exe or .cmd
27892    if test -f "${new_path}.exe"; then
27893       input_to_shortpath="${new_path}.exe"
27894    elif test -f "${new_path}.cmd"; then
27895       input_to_shortpath="${new_path}.cmd"
27896    else
27897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27898$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27901      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27902    fi
27903  else
27904    input_to_shortpath="$new_path"
27905  fi
27906
27907  # Call helper function which possibly converts this using DOS-style short mode.
27908  # If so, the updated path is stored in $new_path.
27909  new_path="$input_to_shortpath"
27910
27911  input_path="$input_to_shortpath"
27912  # Check if we need to convert this using DOS-style short mode. If the path
27913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27914  # take no chances and rewrite it.
27915  # Note: m4 eats our [], so we need to use [ and ] instead.
27916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27917  if test "x$has_forbidden_chars" != x; then
27918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27922      # Going to short mode and back again did indeed matter. Since short mode is
27923      # case insensitive, let's make it lowercase to improve readability.
27924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27925      # Now convert it back to Unix-stile (cygpath)
27926      input_path=`$CYGPATH -u "$shortmode_path"`
27927      new_path="$input_path"
27928    fi
27929  fi
27930
27931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27932  if test "x$test_cygdrive_prefix" = x; then
27933    # As a simple fix, exclude /usr/bin since it's not a real path.
27934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27936      # a path prefixed by /cygdrive for fixpath to work.
27937      new_path="$CYGWIN_ROOT_PATH$input_path"
27938    fi
27939  fi
27940
27941  # remove trailing .exe if any
27942  new_path="${new_path/%.exe/}"
27943
27944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27945
27946  # First separate the path from the arguments. This will split at the first
27947  # space.
27948  complete="$OBJDUMP"
27949  path="${complete%% *}"
27950  tmp="$complete EOL"
27951  arguments="${tmp#* }"
27952
27953  # Input might be given as Windows format, start by converting to
27954  # unix format.
27955  new_path="$path"
27956
27957  windows_path="$new_path"
27958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27959    unix_path=`$CYGPATH -u "$windows_path"`
27960    new_path="$unix_path"
27961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27963    new_path="$unix_path"
27964  fi
27965
27966
27967  # Now try to locate executable using which
27968  new_path=`$WHICH "$new_path" 2> /dev/null`
27969
27970  if test "x$new_path" = x; then
27971    # Oops. Which didn't find the executable.
27972    # The splitting of arguments from the executable at a space might have been incorrect,
27973    # since paths with space are more likely in Windows. Give it another try with the whole
27974    # argument.
27975    path="$complete"
27976    arguments="EOL"
27977    new_path="$path"
27978
27979  windows_path="$new_path"
27980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27981    unix_path=`$CYGPATH -u "$windows_path"`
27982    new_path="$unix_path"
27983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27985    new_path="$unix_path"
27986  fi
27987
27988
27989    new_path=`$WHICH "$new_path" 2> /dev/null`
27990
27991    if test "x$new_path" = x; then
27992      # It's still not found. Now this is an unrecoverable error.
27993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27994$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27995      has_space=`$ECHO "$complete" | $GREP " "`
27996      if test "x$has_space" != x; then
27997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27999      fi
28000      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28001    fi
28002  fi
28003
28004  # Now new_path has a complete unix path to the binary
28005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28006    # Keep paths in /bin as-is, but remove trailing .exe if any
28007    new_path="${new_path/%.exe/}"
28008    # Do not save /bin paths to all_fixpath_prefixes!
28009  else
28010    # Not in mixed or Windows style, start by that.
28011    new_path=`cmd //c echo $new_path`
28012
28013  input_path="$new_path"
28014  # Check if we need to convert this using DOS-style short mode. If the path
28015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28016  # take no chances and rewrite it.
28017  # Note: m4 eats our [], so we need to use [ and ] instead.
28018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28019  if test "x$has_forbidden_chars" != x; then
28020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28022  fi
28023
28024    # Output is in $new_path
28025
28026  windows_path="$new_path"
28027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28028    unix_path=`$CYGPATH -u "$windows_path"`
28029    new_path="$unix_path"
28030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28032    new_path="$unix_path"
28033  fi
28034
28035    # remove trailing .exe if any
28036    new_path="${new_path/%.exe/}"
28037
28038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28040  fi
28041
28042  else
28043    # We're on a posix platform. Hooray! :)
28044    # First separate the path from the arguments. This will split at the first
28045    # space.
28046    complete="$OBJDUMP"
28047    path="${complete%% *}"
28048    tmp="$complete EOL"
28049    arguments="${tmp#* }"
28050
28051    # Cannot rely on the command "which" here since it doesn't always work.
28052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28053    if test -z "$is_absolute_path"; then
28054      # Path to executable is not absolute. Find it.
28055      IFS_save="$IFS"
28056      IFS=:
28057      for p in $PATH; do
28058        if test -f "$p/$path" && test -x "$p/$path"; then
28059          new_path="$p/$path"
28060          break
28061        fi
28062      done
28063      IFS="$IFS_save"
28064    else
28065      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28066$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28067      new_path="$path"
28068    fi
28069
28070    if test "x$new_path" = x; then
28071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28072$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28073        has_space=`$ECHO "$complete" | $GREP " "`
28074        if test "x$has_space" != x; then
28075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28077        fi
28078        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28079      fi
28080  fi
28081
28082      # Now join together the path and the arguments once again
28083      if test "x$arguments" != xEOL; then
28084        new_complete="$new_path ${arguments% *}"
28085      else
28086        new_complete="$new_path"
28087      fi
28088
28089  if test "x$complete" != "x$new_complete"; then
28090      OBJDUMP="$new_complete"
28091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28092$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28093    fi
28094
28095fi
28096
28097if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28098   # Extract the first word of "lipo", so it can be a program name with args.
28099set dummy lipo; ac_word=$2
28100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28101$as_echo_n "checking for $ac_word... " >&6; }
28102if test "${ac_cv_path_LIPO+set}" = set; then :
28103  $as_echo_n "(cached) " >&6
28104else
28105  case $LIPO in
28106  [\\/]* | ?:[\\/]*)
28107  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28108  ;;
28109  *)
28110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28111for as_dir in $PATH
28112do
28113  IFS=$as_save_IFS
28114  test -z "$as_dir" && as_dir=.
28115    for ac_exec_ext in '' $ac_executable_extensions; do
28116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28117    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28119    break 2
28120  fi
28121done
28122  done
28123IFS=$as_save_IFS
28124
28125  ;;
28126esac
28127fi
28128LIPO=$ac_cv_path_LIPO
28129if test -n "$LIPO"; then
28130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28131$as_echo "$LIPO" >&6; }
28132else
28133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28134$as_echo "no" >&6; }
28135fi
28136
28137
28138
28139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28140
28141  # First separate the path from the arguments. This will split at the first
28142  # space.
28143  complete="$LIPO"
28144  path="${complete%% *}"
28145  tmp="$complete EOL"
28146  arguments="${tmp#* }"
28147
28148  # Input might be given as Windows format, start by converting to
28149  # unix format.
28150  new_path=`$CYGPATH -u "$path"`
28151
28152  # Now try to locate executable using which
28153  new_path=`$WHICH "$new_path" 2> /dev/null`
28154  # bat and cmd files are not always considered executable in cygwin causing which
28155  # to not find them
28156  if test "x$new_path" = x \
28157           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28158           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28159    new_path=`$CYGPATH -u "$path"`
28160  fi
28161  if test "x$new_path" = x; then
28162    # Oops. Which didn't find the executable.
28163    # The splitting of arguments from the executable at a space might have been incorrect,
28164    # since paths with space are more likely in Windows. Give it another try with the whole
28165    # argument.
28166    path="$complete"
28167    arguments="EOL"
28168    new_path=`$CYGPATH -u "$path"`
28169    new_path=`$WHICH "$new_path" 2> /dev/null`
28170    # bat and cmd files are not always considered executable in cygwin causing which
28171    # to not find them
28172    if test "x$new_path" = x \
28173             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28174             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28175      new_path=`$CYGPATH -u "$path"`
28176    fi
28177    if test "x$new_path" = x; then
28178      # It's still not found. Now this is an unrecoverable error.
28179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28180$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28181      has_space=`$ECHO "$complete" | $GREP " "`
28182      if test "x$has_space" != x; then
28183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28185      fi
28186      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28187    fi
28188  fi
28189
28190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28193  # "foo.exe" is OK but "foo" is an error.
28194  #
28195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28196  # It is also a way to make sure we got the proper file name for the real test later on.
28197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28198  if test "x$test_shortpath" = x; then
28199    # Short path failed, file does not exist as specified.
28200    # Try adding .exe or .cmd
28201    if test -f "${new_path}.exe"; then
28202       input_to_shortpath="${new_path}.exe"
28203    elif test -f "${new_path}.cmd"; then
28204       input_to_shortpath="${new_path}.cmd"
28205    else
28206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28207$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28208      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28209$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28210      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28211    fi
28212  else
28213    input_to_shortpath="$new_path"
28214  fi
28215
28216  # Call helper function which possibly converts this using DOS-style short mode.
28217  # If so, the updated path is stored in $new_path.
28218  new_path="$input_to_shortpath"
28219
28220  input_path="$input_to_shortpath"
28221  # Check if we need to convert this using DOS-style short mode. If the path
28222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28223  # take no chances and rewrite it.
28224  # Note: m4 eats our [], so we need to use [ and ] instead.
28225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28226  if test "x$has_forbidden_chars" != x; then
28227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28231      # Going to short mode and back again did indeed matter. Since short mode is
28232      # case insensitive, let's make it lowercase to improve readability.
28233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28234      # Now convert it back to Unix-stile (cygpath)
28235      input_path=`$CYGPATH -u "$shortmode_path"`
28236      new_path="$input_path"
28237    fi
28238  fi
28239
28240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28241  if test "x$test_cygdrive_prefix" = x; then
28242    # As a simple fix, exclude /usr/bin since it's not a real path.
28243    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28245      # a path prefixed by /cygdrive for fixpath to work.
28246      new_path="$CYGWIN_ROOT_PATH$input_path"
28247    fi
28248  fi
28249
28250  # remove trailing .exe if any
28251  new_path="${new_path/%.exe/}"
28252
28253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28254
28255  # First separate the path from the arguments. This will split at the first
28256  # space.
28257  complete="$LIPO"
28258  path="${complete%% *}"
28259  tmp="$complete EOL"
28260  arguments="${tmp#* }"
28261
28262  # Input might be given as Windows format, start by converting to
28263  # unix format.
28264  new_path="$path"
28265
28266  windows_path="$new_path"
28267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28268    unix_path=`$CYGPATH -u "$windows_path"`
28269    new_path="$unix_path"
28270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28272    new_path="$unix_path"
28273  fi
28274
28275
28276  # Now try to locate executable using which
28277  new_path=`$WHICH "$new_path" 2> /dev/null`
28278
28279  if test "x$new_path" = x; then
28280    # Oops. Which didn't find the executable.
28281    # The splitting of arguments from the executable at a space might have been incorrect,
28282    # since paths with space are more likely in Windows. Give it another try with the whole
28283    # argument.
28284    path="$complete"
28285    arguments="EOL"
28286    new_path="$path"
28287
28288  windows_path="$new_path"
28289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28290    unix_path=`$CYGPATH -u "$windows_path"`
28291    new_path="$unix_path"
28292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28294    new_path="$unix_path"
28295  fi
28296
28297
28298    new_path=`$WHICH "$new_path" 2> /dev/null`
28299
28300    if test "x$new_path" = x; then
28301      # It's still not found. Now this is an unrecoverable error.
28302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28303$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28304      has_space=`$ECHO "$complete" | $GREP " "`
28305      if test "x$has_space" != x; then
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28308      fi
28309      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28310    fi
28311  fi
28312
28313  # Now new_path has a complete unix path to the binary
28314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28315    # Keep paths in /bin as-is, but remove trailing .exe if any
28316    new_path="${new_path/%.exe/}"
28317    # Do not save /bin paths to all_fixpath_prefixes!
28318  else
28319    # Not in mixed or Windows style, start by that.
28320    new_path=`cmd //c echo $new_path`
28321
28322  input_path="$new_path"
28323  # Check if we need to convert this using DOS-style short mode. If the path
28324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28325  # take no chances and rewrite it.
28326  # Note: m4 eats our [], so we need to use [ and ] instead.
28327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28328  if test "x$has_forbidden_chars" != x; then
28329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28331  fi
28332
28333    # Output is in $new_path
28334
28335  windows_path="$new_path"
28336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28337    unix_path=`$CYGPATH -u "$windows_path"`
28338    new_path="$unix_path"
28339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28341    new_path="$unix_path"
28342  fi
28343
28344    # remove trailing .exe if any
28345    new_path="${new_path/%.exe/}"
28346
28347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28349  fi
28350
28351  else
28352    # We're on a posix platform. Hooray! :)
28353    # First separate the path from the arguments. This will split at the first
28354    # space.
28355    complete="$LIPO"
28356    path="${complete%% *}"
28357    tmp="$complete EOL"
28358    arguments="${tmp#* }"
28359
28360    # Cannot rely on the command "which" here since it doesn't always work.
28361    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28362    if test -z "$is_absolute_path"; then
28363      # Path to executable is not absolute. Find it.
28364      IFS_save="$IFS"
28365      IFS=:
28366      for p in $PATH; do
28367        if test -f "$p/$path" && test -x "$p/$path"; then
28368          new_path="$p/$path"
28369          break
28370        fi
28371      done
28372      IFS="$IFS_save"
28373    else
28374      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28375$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28376      new_path="$path"
28377    fi
28378
28379    if test "x$new_path" = x; then
28380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28381$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28382        has_space=`$ECHO "$complete" | $GREP " "`
28383        if test "x$has_space" != x; then
28384          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28386        fi
28387        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28388      fi
28389  fi
28390
28391      # Now join together the path and the arguments once again
28392      if test "x$arguments" != xEOL; then
28393        new_complete="$new_path ${arguments% *}"
28394      else
28395        new_complete="$new_path"
28396      fi
28397
28398  if test "x$complete" != "x$new_complete"; then
28399      LIPO="$new_complete"
28400      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28401$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28402    fi
28403
28404fi
28405
28406
28407
28408# Restore old path without tools dir
28409PATH="$OLD_PATH"
28410
28411
28412# FIXME: Currently we must test this after paths but before flags. Fix!
28413
28414# And we can test some aspects on the target using configure macros.
28415
28416
28417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28418$as_echo_n "checking for ANSI C header files... " >&6; }
28419if test "${ac_cv_header_stdc+set}" = set; then :
28420  $as_echo_n "(cached) " >&6
28421else
28422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28423/* end confdefs.h.  */
28424#include <stdlib.h>
28425#include <stdarg.h>
28426#include <string.h>
28427#include <float.h>
28428
28429int
28430main ()
28431{
28432
28433  ;
28434  return 0;
28435}
28436_ACEOF
28437if ac_fn_cxx_try_compile "$LINENO"; then :
28438  ac_cv_header_stdc=yes
28439else
28440  ac_cv_header_stdc=no
28441fi
28442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28443
28444if test $ac_cv_header_stdc = yes; then
28445  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28447/* end confdefs.h.  */
28448#include <string.h>
28449
28450_ACEOF
28451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28452  $EGREP "memchr" >/dev/null 2>&1; then :
28453
28454else
28455  ac_cv_header_stdc=no
28456fi
28457rm -f conftest*
28458
28459fi
28460
28461if test $ac_cv_header_stdc = yes; then
28462  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28464/* end confdefs.h.  */
28465#include <stdlib.h>
28466
28467_ACEOF
28468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28469  $EGREP "free" >/dev/null 2>&1; then :
28470
28471else
28472  ac_cv_header_stdc=no
28473fi
28474rm -f conftest*
28475
28476fi
28477
28478if test $ac_cv_header_stdc = yes; then
28479  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28480  if test "$cross_compiling" = yes; then :
28481  :
28482else
28483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28484/* end confdefs.h.  */
28485#include <ctype.h>
28486#include <stdlib.h>
28487#if ((' ' & 0x0FF) == 0x020)
28488# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28489# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28490#else
28491# define ISLOWER(c) \
28492		   (('a' <= (c) && (c) <= 'i') \
28493		     || ('j' <= (c) && (c) <= 'r') \
28494		     || ('s' <= (c) && (c) <= 'z'))
28495# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28496#endif
28497
28498#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28499int
28500main ()
28501{
28502  int i;
28503  for (i = 0; i < 256; i++)
28504    if (XOR (islower (i), ISLOWER (i))
28505	|| toupper (i) != TOUPPER (i))
28506      return 2;
28507  return 0;
28508}
28509_ACEOF
28510if ac_fn_cxx_try_run "$LINENO"; then :
28511
28512else
28513  ac_cv_header_stdc=no
28514fi
28515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28516  conftest.$ac_objext conftest.beam conftest.$ac_ext
28517fi
28518
28519fi
28520fi
28521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28522$as_echo "$ac_cv_header_stdc" >&6; }
28523if test $ac_cv_header_stdc = yes; then
28524
28525$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28526
28527fi
28528
28529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28530for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28531		  inttypes.h stdint.h unistd.h
28532do :
28533  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28534ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28535"
28536if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28537  cat >>confdefs.h <<_ACEOF
28538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28539_ACEOF
28540
28541fi
28542
28543done
28544
28545
28546
28547###############################################################################
28548#
28549# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28550# (The JVM can use 32 or 64 bit Java pointers but that decision
28551# is made at runtime.)
28552#
28553
28554if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28555  # Always specify -m flags on Solaris
28556
28557  # keep track of c/cxx flags that we added outselves...
28558  #   to prevent emitting warning...
28559  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28560  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28561  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28562
28563  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28564  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28565  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28566
28567  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28568  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28569  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28570
28571elif test "x$COMPILE_TYPE" = xreduced; then
28572  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28573    # Specify -m if running reduced on other Posix platforms
28574
28575  # keep track of c/cxx flags that we added outselves...
28576  #   to prevent emitting warning...
28577  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28578  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28579  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28580
28581  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28582  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28583  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28584
28585  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28586  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28587  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28588
28589  fi
28590fi
28591
28592# Make compilation sanity check
28593for ac_header in stdio.h
28594do :
28595  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28596if test "x$ac_cv_header_stdio_h" = x""yes; then :
28597  cat >>confdefs.h <<_ACEOF
28598#define HAVE_STDIO_H 1
28599_ACEOF
28600
28601else
28602
28603  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28604$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28605  if test "x$COMPILE_TYPE" = xreduced; then
28606    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28607$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28608  elif test "x$COMPILE_TYPE" = xcross; then
28609    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28610$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28611  fi
28612  as_fn_error $? "Cannot continue." "$LINENO" 5
28613
28614fi
28615
28616done
28617
28618
28619# The cast to long int works around a bug in the HP C Compiler
28620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28622# This bug is HP SR number 8606223364.
28623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28624$as_echo_n "checking size of int *... " >&6; }
28625if test "${ac_cv_sizeof_int_p+set}" = set; then :
28626  $as_echo_n "(cached) " >&6
28627else
28628  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28629
28630else
28631  if test "$ac_cv_type_int_p" = yes; then
28632     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28634as_fn_error 77 "cannot compute sizeof (int *)
28635See \`config.log' for more details" "$LINENO" 5 ; }
28636   else
28637     ac_cv_sizeof_int_p=0
28638   fi
28639fi
28640
28641fi
28642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28643$as_echo "$ac_cv_sizeof_int_p" >&6; }
28644
28645
28646
28647cat >>confdefs.h <<_ACEOF
28648#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28649_ACEOF
28650
28651
28652
28653if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28654  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28655  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28656fi
28657
28658if test "x$SIZEOF_INT_P" = x; then
28659    # The test failed, lets stick to the assumed value.
28660    { $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
28661$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28662else
28663    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28664
28665    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28666        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
28667    fi
28668fi
28669
28670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28671$as_echo_n "checking for target address size... " >&6; }
28672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28673$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28674
28675
28676###############################################################################
28677#
28678# Is the target little of big endian?
28679#
28680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28681$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28682if test "${ac_cv_c_bigendian+set}" = set; then :
28683  $as_echo_n "(cached) " >&6
28684else
28685  ac_cv_c_bigendian=unknown
28686    # See if we're dealing with a universal compiler.
28687    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28688/* end confdefs.h.  */
28689#ifndef __APPLE_CC__
28690	       not a universal capable compiler
28691	     #endif
28692	     typedef int dummy;
28693
28694_ACEOF
28695if ac_fn_cxx_try_compile "$LINENO"; then :
28696
28697	# Check for potential -arch flags.  It is not universal unless
28698	# there are at least two -arch flags with different values.
28699	ac_arch=
28700	ac_prev=
28701	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28702	 if test -n "$ac_prev"; then
28703	   case $ac_word in
28704	     i?86 | x86_64 | ppc | ppc64)
28705	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28706		 ac_arch=$ac_word
28707	       else
28708		 ac_cv_c_bigendian=universal
28709		 break
28710	       fi
28711	       ;;
28712	   esac
28713	   ac_prev=
28714	 elif test "x$ac_word" = "x-arch"; then
28715	   ac_prev=arch
28716	 fi
28717       done
28718fi
28719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28720    if test $ac_cv_c_bigendian = unknown; then
28721      # See if sys/param.h defines the BYTE_ORDER macro.
28722      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28723/* end confdefs.h.  */
28724#include <sys/types.h>
28725	     #include <sys/param.h>
28726
28727int
28728main ()
28729{
28730#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28731		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28732		     && LITTLE_ENDIAN)
28733	      bogus endian macros
28734	     #endif
28735
28736  ;
28737  return 0;
28738}
28739_ACEOF
28740if ac_fn_cxx_try_compile "$LINENO"; then :
28741  # It does; now see whether it defined to BIG_ENDIAN or not.
28742	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28743/* end confdefs.h.  */
28744#include <sys/types.h>
28745		#include <sys/param.h>
28746
28747int
28748main ()
28749{
28750#if BYTE_ORDER != BIG_ENDIAN
28751		 not big endian
28752		#endif
28753
28754  ;
28755  return 0;
28756}
28757_ACEOF
28758if ac_fn_cxx_try_compile "$LINENO"; then :
28759  ac_cv_c_bigendian=yes
28760else
28761  ac_cv_c_bigendian=no
28762fi
28763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28764fi
28765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28766    fi
28767    if test $ac_cv_c_bigendian = unknown; then
28768      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28769      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28770/* end confdefs.h.  */
28771#include <limits.h>
28772
28773int
28774main ()
28775{
28776#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28777	      bogus endian macros
28778	     #endif
28779
28780  ;
28781  return 0;
28782}
28783_ACEOF
28784if ac_fn_cxx_try_compile "$LINENO"; then :
28785  # It does; now see whether it defined to _BIG_ENDIAN or not.
28786	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28787/* end confdefs.h.  */
28788#include <limits.h>
28789
28790int
28791main ()
28792{
28793#ifndef _BIG_ENDIAN
28794		 not big endian
28795		#endif
28796
28797  ;
28798  return 0;
28799}
28800_ACEOF
28801if ac_fn_cxx_try_compile "$LINENO"; then :
28802  ac_cv_c_bigendian=yes
28803else
28804  ac_cv_c_bigendian=no
28805fi
28806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28807fi
28808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28809    fi
28810    if test $ac_cv_c_bigendian = unknown; then
28811      # Compile a test program.
28812      if test "$cross_compiling" = yes; then :
28813  # Try to guess by grepping values from an object file.
28814	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28815/* end confdefs.h.  */
28816short int ascii_mm[] =
28817		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28818		short int ascii_ii[] =
28819		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28820		int use_ascii (int i) {
28821		  return ascii_mm[i] + ascii_ii[i];
28822		}
28823		short int ebcdic_ii[] =
28824		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28825		short int ebcdic_mm[] =
28826		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28827		int use_ebcdic (int i) {
28828		  return ebcdic_mm[i] + ebcdic_ii[i];
28829		}
28830		extern int foo;
28831
28832int
28833main ()
28834{
28835return use_ascii (foo) == use_ebcdic (foo);
28836  ;
28837  return 0;
28838}
28839_ACEOF
28840if ac_fn_cxx_try_compile "$LINENO"; then :
28841  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28842	      ac_cv_c_bigendian=yes
28843	    fi
28844	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28845	      if test "$ac_cv_c_bigendian" = unknown; then
28846		ac_cv_c_bigendian=no
28847	      else
28848		# finding both strings is unlikely to happen, but who knows?
28849		ac_cv_c_bigendian=unknown
28850	      fi
28851	    fi
28852fi
28853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28854else
28855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28856/* end confdefs.h.  */
28857$ac_includes_default
28858int
28859main ()
28860{
28861
28862	     /* Are we little or big endian?  From Harbison&Steele.  */
28863	     union
28864	     {
28865	       long int l;
28866	       char c[sizeof (long int)];
28867	     } u;
28868	     u.l = 1;
28869	     return u.c[sizeof (long int) - 1] == 1;
28870
28871  ;
28872  return 0;
28873}
28874_ACEOF
28875if ac_fn_cxx_try_run "$LINENO"; then :
28876  ac_cv_c_bigendian=no
28877else
28878  ac_cv_c_bigendian=yes
28879fi
28880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28881  conftest.$ac_objext conftest.beam conftest.$ac_ext
28882fi
28883
28884    fi
28885fi
28886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28887$as_echo "$ac_cv_c_bigendian" >&6; }
28888 case $ac_cv_c_bigendian in #(
28889   yes)
28890     ENDIAN="big";; #(
28891   no)
28892     ENDIAN="little" ;; #(
28893   universal)
28894     ENDIAN="universal_endianness"
28895     ;; #(
28896   *)
28897     ENDIAN="unknown" ;;
28898 esac
28899
28900
28901if test "x$ENDIAN" = xuniversal_endianness; then
28902    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28903fi
28904if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28905    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
28906fi
28907
28908
28909# Configure flags for the tools
28910
28911
28912###############################################################################
28913#
28914# How to compile shared libraries.
28915#
28916
28917if test "x$GCC" = xyes; then
28918    COMPILER_NAME=gcc
28919    PICFLAG="-fPIC"
28920    LIBRARY_PREFIX=lib
28921    SHARED_LIBRARY='lib$1.so'
28922    STATIC_LIBRARY='lib$1.a'
28923    SHARED_LIBRARY_FLAGS="-shared"
28924    SHARED_LIBRARY_SUFFIX='.so'
28925    STATIC_LIBRARY_SUFFIX='.a'
28926    OBJ_SUFFIX='.o'
28927    EXE_SUFFIX=''
28928    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28929    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28930    C_FLAG_REORDER=''
28931    CXX_FLAG_REORDER=''
28932    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28933    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28934    LD="$CC"
28935    LDEXE="$CC"
28936    LDCXX="$CXX"
28937    LDEXECXX="$CXX"
28938    POST_STRIP_CMD="$STRIP -g"
28939
28940    # Linking is different on MacOSX
28941    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28942        # Might change in the future to clang.
28943        COMPILER_NAME=gcc
28944        SHARED_LIBRARY='lib$1.dylib'
28945        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28946        SHARED_LIBRARY_SUFFIX='.dylib'
28947        EXE_SUFFIX=''
28948        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28949        SET_SHARED_LIBRARY_MAPFILE=''
28950        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28951        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28952        POST_STRIP_CMD="$STRIP -S"
28953    fi
28954else
28955    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28956        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28957        COMPILER_NAME=ossc
28958        PICFLAG="-KPIC"
28959        LIBRARY_PREFIX=lib
28960        SHARED_LIBRARY='lib$1.so'
28961        STATIC_LIBRARY='lib$1.a'
28962        SHARED_LIBRARY_FLAGS="-G"
28963        SHARED_LIBRARY_SUFFIX='.so'
28964        STATIC_LIBRARY_SUFFIX='.a'
28965        OBJ_SUFFIX='.o'
28966        EXE_SUFFIX=''
28967        SET_SHARED_LIBRARY_NAME=''
28968        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28969	C_FLAG_REORDER='-xF'
28970	CXX_FLAG_REORDER='-xF'
28971        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28972        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28973        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28974        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28975        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28976        POST_STRIP_CMD="$STRIP -x"
28977        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28978    fi
28979    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28980        # If it is not gcc, then assume it is the MS Visual Studio compiler
28981        COMPILER_NAME=cl
28982        PICFLAG=""
28983        LIBRARY_PREFIX=
28984        SHARED_LIBRARY='$1.dll'
28985        STATIC_LIBRARY='$1.lib'
28986        SHARED_LIBRARY_FLAGS="-LD"
28987        SHARED_LIBRARY_SUFFIX='.dll'
28988        STATIC_LIBRARY_SUFFIX='.lib'
28989        OBJ_SUFFIX='.obj'
28990        EXE_SUFFIX='.exe'
28991        SET_SHARED_LIBRARY_NAME=''
28992        SET_SHARED_LIBRARY_MAPFILE=''
28993        SET_SHARED_LIBRARY_ORIGIN=''
28994        SET_EXECUTABLE_ORIGIN=''
28995    fi
28996fi
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016# The (cross) compiler is now configured, we can now test capabilities
29017# of the target platform.
29018
29019
29020
29021###############################################################################
29022#
29023# Setup the opt flags for different compilers
29024# and different operating systems.
29025#
29026
29027#
29028# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29029#
29030if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29031    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29032    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29033    CFLAGS="$CFLAGS -mstackrealign"
29034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29035$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29036    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29037/* end confdefs.h.  */
29038int main() { return 0; }
29039_ACEOF
29040if ac_fn_cxx_try_link "$LINENO"; then :
29041
29042		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29043$as_echo "yes" >&6; }
29044
29045else
29046
29047		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29048$as_echo "no" >&6; }
29049	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29050
29051fi
29052rm -f core conftest.err conftest.$ac_objext \
29053    conftest$ac_exeext conftest.$ac_ext
29054fi
29055
29056C_FLAG_DEPS="-MMD -MF"
29057CXX_FLAG_DEPS="-MMD -MF"
29058
29059case $COMPILER_TYPE in
29060  CC )
29061    D_FLAG="-g"
29062    case $COMPILER_NAME in
29063      gcc )
29064      	case $OPENJDK_TARGET_OS in
29065	  macosx )
29066	    # On MacOSX we optimize for size, something
29067	    # we should do for all platforms?
29068	    C_O_FLAG_HI="-Os"
29069	    C_O_FLAG_NORM="-Os"
29070	    C_O_FLAG_NONE=""
29071	    ;;
29072	  *)
29073	    C_O_FLAG_HI="-O3"
29074	    C_O_FLAG_NORM="-O2"
29075	    C_O_FLAG_NONE="-O0"
29076	    CFLAGS_DEBUG_SYMBOLS="-g"
29077	    CXXFLAGS_DEBUG_SYMBOLS="-g"
29078	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29079	       CFLAGS_DEBUG_SYMBOLS="-g1"
29080	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
29081	    fi
29082	    ;;
29083	esac
29084        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29085        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29086        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29087        ;;
29088      ossc )
29089        #
29090        # Forte has different names for this with their C++ compiler...
29091        #
29092        C_FLAG_DEPS="-xMMD -xMF"
29093        CXX_FLAG_DEPS="-xMMD -xMF"
29094
29095        # Extra options used with HIGHEST
29096        #
29097        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29098        #          done with care, there are some assumptions below that need to
29099        #          be understood about the use of pointers, and IEEE behavior.
29100        #
29101        # Use non-standard floating point mode (not IEEE 754)
29102        CC_HIGHEST="$CC_HIGHEST -fns"
29103        # Do some simplification of floating point arithmetic (not IEEE 754)
29104        CC_HIGHEST="$CC_HIGHEST -fsimple"
29105        # Use single precision floating point with 'float'
29106        CC_HIGHEST="$CC_HIGHEST -fsingle"
29107        # Assume memory references via basic pointer types do not alias
29108        #   (Source with excessing pointer casting and data access with mixed
29109        #    pointer types are not recommended)
29110        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29111        # Use intrinsic or inline versions for math/std functions
29112        #   (If you expect perfect errno behavior, do not use this)
29113        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29114        # Loop data dependency optimizations (need -xO3 or higher)
29115        CC_HIGHEST="$CC_HIGHEST -xdepend"
29116        # Pointer parameters to functions do not overlap
29117        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29118        #    If you pass in multiple pointers to the same data, do not use this)
29119        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29120        # Inline some library routines
29121        #   (If you expect perfect errno behavior, do not use this)
29122        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29123        # Use optimized math routines
29124        #   (If you expect perfect errno behavior, do not use this)
29125        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29126        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29127
29128        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29129          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29130          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29131        fi
29132
29133        case $OPENJDK_TARGET_CPU_ARCH in
29134          x86)
29135            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29136            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29137            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29138            C_O_FLAG_NONE="-xregs=no%frameptr"
29139            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29140            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29141            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29142            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29143            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29144               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29145               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29146            fi
29147            ;;
29148          sparc)
29149            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29150            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29151            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29152            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29153            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29154            C_O_FLAG_NONE=""
29155            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29156            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29157            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29158            CXX_O_FLAG_NONE=""
29159            ;;
29160        esac
29161
29162    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29163    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29164    esac
29165    ;;
29166  CL )
29167    D_FLAG=
29168    C_O_FLAG_HIGHEST="-O2"
29169    C_O_FLAG_HI="-O1"
29170    C_O_FLAG_NORM="-O1"
29171    C_O_FLAG_NONE="-Od"
29172    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29173    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29174    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29175    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29176    ;;
29177esac
29178
29179if test -z "$C_O_FLAG_HIGHEST"; then
29180   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29181fi
29182
29183if test -z "$CXX_O_FLAG_HIGHEST"; then
29184   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29185fi
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29201   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29202$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29203fi
29204
29205if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29206   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29207$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29208fi
29209
29210if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29211   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29212$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29213fi
29214
29215
29216# Check whether --with-extra-cflags was given.
29217if test "${with_extra_cflags+set}" = set; then :
29218  withval=$with_extra_cflags;
29219fi
29220
29221
29222
29223# Check whether --with-extra-cxxflags was given.
29224if test "${with_extra_cxxflags+set}" = set; then :
29225  withval=$with_extra_cxxflags;
29226fi
29227
29228
29229
29230# Check whether --with-extra-ldflags was given.
29231if test "${with_extra_ldflags+set}" = set; then :
29232  withval=$with_extra_ldflags;
29233fi
29234
29235
29236CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29237CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29238LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29239
29240# Hotspot needs these set in their legacy form
29241LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29242LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29243LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29244
29245
29246
29247
29248
29249###############################################################################
29250#
29251# Now setup the CFLAGS and LDFLAGS for the JDK build.
29252# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29253#
29254case $COMPILER_NAME in
29255      gcc )
29256      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29257                          -pipe \
29258                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29259	  case $OPENJDK_TARGET_CPU_ARCH in
29260	  arm )
29261            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29262	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29263	  ;;
29264	  ppc )
29265            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29266	  ;;
29267	  * )
29268	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29269	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29270          ;;
29271	  esac
29272          ;;
29273      ossc )
29274          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29275          case $OPENJDK_TARGET_CPU_ARCH in
29276          x86 )
29277            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29278       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29279          ;;
29280          esac
29281
29282      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29283      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29284
29285          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29286          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29287          ;;
29288      cl )
29289          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29290               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29291	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29292	       -DWIN32 -DIAL"
29293          case $OPENJDK_TARGET_CPU in
29294              x86 )
29295                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29296                  ;;
29297              x86_64 )
29298                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29299                  ;;
29300          esac
29301          ;;
29302esac
29303
29304###############################################################################
29305
29306CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29307
29308# The package path is used only on macosx?
29309PACKAGE_PATH=/opt/local
29310
29311
29312if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29313    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29314    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29315    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29316    #   Note: -Dmacro         is the same as    #define macro 1
29317    #         -Dmacro=	    is the same as    #define macro
29318    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29319        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29320    else
29321        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29322    fi
29323else
29324    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29325fi
29326if test "x$OPENJDK_TARGET_OS" = xlinux; then
29327    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29328fi
29329if test "x$OPENJDK_TARGET_OS" = xwindows; then
29330    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29331fi
29332if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29333    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29334fi
29335if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29336    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29337    # Setting these parameters makes it an error to link to macosx APIs that are
29338    # newer than the given OS version and makes the linked binaries compatible even
29339    # if built on a newer version of the OS.
29340    # The expected format is X.Y.Z
29341    MACOSX_VERSION_MIN=10.7.0
29342
29343    # The macro takes the version with no dots, ex: 1070
29344    # Let the flags variables get resolved in make for easier override on make
29345    # command line.
29346    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29347    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29348fi
29349if test "x$OPENJDK_TARGET_OS" = xbsd; then
29350    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29351fi
29352if test "x$DEBUG_LEVEL" = xrelease; then
29353    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29354    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29355        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29356    fi
29357else
29358    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29359fi
29360
29361CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29362CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29363
29364CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29365        -I${JDK_OUTPUTDIR}/include \
29366        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29367        -I${JDK_TOPDIR}/src/share/javavm/export \
29368        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29369        -I${JDK_TOPDIR}/src/share/native/common \
29370        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29371
29372# The shared libraries are compiled using the picflag.
29373CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29374CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29375
29376# Executable flags
29377CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29378CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29379
29380# Now this is odd. The JDK native libraries have to link against libjvm.so
29381# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29382# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29383# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29384# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29385# libraries will link to whatever is in memory. Yuck.
29386#
29387# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29388if test "x$COMPILER_NAME" = xcl; then
29389    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29390    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29391        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29392    fi
29393    # TODO: make -debug optional "--disable-full-debug-symbols"
29394    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29395    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29396    LDFLAGS_JDKLIB_SUFFIX=""
29397    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29398        LDFLAGS_STACK_SIZE=1048576
29399    else
29400        LDFLAGS_STACK_SIZE=327680
29401    fi
29402    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29403else
29404    if test "x$COMPILER_NAME" = xgcc; then
29405        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29406        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29407        if test -n "$HAS_GNU_HASH"; then
29408            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29409        fi
29410        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29411          # And since we now know that the linker is gnu, then add -z defs, to forbid
29412          # undefined symbols in object files.
29413          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29414          if test "x$DEBUG_LEVEL" = "xrelease"; then
29415              # When building release libraries, tell the linker optimize them.
29416              # Should this be supplied to the OSS linker as well?
29417              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29418          fi
29419        fi
29420    fi
29421    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29422                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29423
29424    # On some platforms (mac) the linker warns about non existing -L dirs.
29425    # Add server first if available. Linking aginst client does not always produce the same results.
29426    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29427    # Default to server for other variants.
29428    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29429        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29430    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29431        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29432    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29433        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29434    else
29435        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29436    fi
29437
29438    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29439    if test "x$COMPILER_NAME" = xossc; then
29440        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29441    fi
29442
29443    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29444    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29445        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29446    fi
29447fi
29448
29449# Adjust flags according to debug level.
29450case $DEBUG_LEVEL in
29451      fastdebug )
29452              CFLAGS="$CFLAGS $D_FLAG"
29453              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29454              ;;
29455      slowdebug )
29456              CFLAGS="$CFLAGS $D_FLAG"
29457	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29458	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29459	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29460	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29461              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29462              ;;
29463esac
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480  # Some Zero and Shark settings.
29481  # ZERO_ARCHFLAG tells the compiler which mode to build for
29482  case "${OPENJDK_TARGET_CPU}" in
29483    s390)
29484      ZERO_ARCHFLAG="-m31"
29485      ;;
29486    *)
29487      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29488  esac
29489
29490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29491$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29492  supports=yes
29493
29494  saved_cflags="$CFLAGS"
29495  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29496  ac_ext=c
29497ac_cpp='$CPP $CPPFLAGS'
29498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29500ac_compiler_gnu=$ac_cv_c_compiler_gnu
29501
29502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29503/* end confdefs.h.  */
29504
29505    int i;
29506
29507_ACEOF
29508if ac_fn_c_try_compile "$LINENO"; then :
29509
29510else
29511  supports=no
29512fi
29513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29514  ac_ext=cpp
29515ac_cpp='$CXXCPP $CPPFLAGS'
29516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29519
29520  CFLAGS="$saved_cflags"
29521
29522  saved_cxxflags="$CXXFLAGS"
29523  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29524  ac_ext=cpp
29525ac_cpp='$CXXCPP $CPPFLAGS'
29526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29529
29530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29531/* end confdefs.h.  */
29532
29533    int i;
29534
29535_ACEOF
29536if ac_fn_cxx_try_compile "$LINENO"; then :
29537
29538else
29539  supports=no
29540fi
29541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29542  ac_ext=cpp
29543ac_cpp='$CXXCPP $CPPFLAGS'
29544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29547
29548  CXXFLAGS="$saved_cxxflags"
29549
29550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29551$as_echo "$supports" >&6; }
29552  if test "x$supports" = "xyes" ; then
29553    :
29554  else
29555    ZERO_ARCHFLAG=""
29556  fi
29557
29558
29559
29560  # Check that the compiler supports -mX flags
29561  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29562
29563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29564$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29565  supports=yes
29566
29567  saved_cflags="$CFLAGS"
29568  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29569  ac_ext=c
29570ac_cpp='$CPP $CPPFLAGS'
29571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29573ac_compiler_gnu=$ac_cv_c_compiler_gnu
29574
29575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29576/* end confdefs.h.  */
29577
29578    int i;
29579
29580_ACEOF
29581if ac_fn_c_try_compile "$LINENO"; then :
29582
29583else
29584  supports=no
29585fi
29586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29587  ac_ext=cpp
29588ac_cpp='$CXXCPP $CPPFLAGS'
29589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29592
29593  CFLAGS="$saved_cflags"
29594
29595  saved_cxxflags="$CXXFLAGS"
29596  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29597  ac_ext=cpp
29598ac_cpp='$CXXCPP $CPPFLAGS'
29599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29602
29603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29604/* end confdefs.h.  */
29605
29606    int i;
29607
29608_ACEOF
29609if ac_fn_cxx_try_compile "$LINENO"; then :
29610
29611else
29612  supports=no
29613fi
29614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29615  ac_ext=cpp
29616ac_cpp='$CXXCPP $CPPFLAGS'
29617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29620
29621  CXXFLAGS="$saved_cxxflags"
29622
29623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29624$as_echo "$supports" >&6; }
29625  if test "x$supports" = "xyes" ; then
29626    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29627  else
29628    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29629  fi
29630
29631
29632
29633
29634# Setup debug symbols (need objcopy from the toolchain for that)
29635
29636#
29637# ENABLE_DEBUG_SYMBOLS
29638# This must be done after the toolchain is setup, since we're looking at objcopy.
29639#
29640# Check whether --enable-debug-symbols was given.
29641if test "${enable_debug_symbols+set}" = set; then :
29642  enableval=$enable_debug_symbols;
29643fi
29644
29645
29646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29647$as_echo_n "checking if we should generate debug symbols... " >&6; }
29648
29649if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29650   # explicit enabling of enable-debug-symbols and can't find objcopy
29651   #   this is an error
29652   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29653fi
29654
29655if test "x$enable_debug_symbols" = "xyes"; then
29656  ENABLE_DEBUG_SYMBOLS=true
29657elif test "x$enable_debug_symbols" = "xno"; then
29658  ENABLE_DEBUG_SYMBOLS=false
29659else
29660  # default on macosx is false
29661  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29662    ENABLE_DEBUG_SYMBOLS=false
29663  # Default is on if objcopy is found, otherwise off
29664  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29665    ENABLE_DEBUG_SYMBOLS=true
29666  else
29667    ENABLE_DEBUG_SYMBOLS=false
29668  fi
29669fi
29670
29671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29672$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29673
29674#
29675# ZIP_DEBUGINFO_FILES
29676#
29677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29678$as_echo_n "checking if we should zip debug-info files... " >&6; }
29679# Check whether --enable-zip-debug-info was given.
29680if test "${enable_zip_debug_info+set}" = set; then :
29681  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29682else
29683  enable_zip_debug_info="yes"
29684fi
29685
29686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29687$as_echo "${enable_zip_debug_info}" >&6; }
29688
29689if test "x${enable_zip_debug_info}" = "xno"; then
29690   ZIP_DEBUGINFO_FILES=false
29691else
29692   ZIP_DEBUGINFO_FILES=true
29693fi
29694
29695
29696
29697
29698
29699
29700
29701###############################################################################
29702#
29703# Check dependencies for external and internal libraries.
29704#
29705###############################################################################
29706
29707
29708
29709###############################################################################
29710#
29711# OS specific settings that we never will need to probe.
29712#
29713if test "x$OPENJDK_TARGET_OS" = xlinux; then
29714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29715$as_echo_n "checking what is not needed on Linux?... " >&6; }
29716    PULSE_NOT_NEEDED=yes
29717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29718$as_echo "pulse" >&6; }
29719fi
29720
29721if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29723$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29724    ALSA_NOT_NEEDED=yes
29725    PULSE_NOT_NEEDED=yes
29726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29727$as_echo "alsa pulse" >&6; }
29728fi
29729
29730if test "x$OPENJDK_TARGET_OS" = xwindows; then
29731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29732$as_echo_n "checking what is not needed on Windows?... " >&6; }
29733    CUPS_NOT_NEEDED=yes
29734    ALSA_NOT_NEEDED=yes
29735    PULSE_NOT_NEEDED=yes
29736    X11_NOT_NEEDED=yes
29737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29738$as_echo "alsa cups pulse x11" >&6; }
29739fi
29740
29741if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29743$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29744    ALSA_NOT_NEEDED=yes
29745    PULSE_NOT_NEEDED=yes
29746    X11_NOT_NEEDED=yes
29747    FREETYPE2_NOT_NEEDED=yes
29748    # If the java runtime framework is disabled, then we need X11.
29749    # This will be adjusted below.
29750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29751$as_echo "alsa pulse x11" >&6; }
29752fi
29753
29754if test "x$OPENJDK_TARGET_OS" = xbsd; then
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29756$as_echo_n "checking what is not needed on bsd?... " >&6; }
29757    ALSA_NOT_NEEDED=yes
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29759$as_echo "alsa" >&6; }
29760fi
29761
29762if test "x$OPENJDK" = "xfalse"; then
29763    FREETYPE2_NOT_NEEDED=yes
29764fi
29765
29766if test "x$SUPPORT_HEADFUL" = xno; then
29767    X11_NOT_NEEDED=yes
29768fi
29769
29770###############################################################################
29771#
29772# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29773# that uses this API.
29774#
29775# Check whether --enable-macosx-runtime-support was given.
29776if test "${enable_macosx_runtime_support+set}" = set; then :
29777  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29778else
29779  MACOSX_RUNTIME_SUPPORT="no"
29780fi
29781
29782
29783USE_MACOSX_RUNTIME_SUPPORT=no
29784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29785$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29786if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29787    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29788        MACOSX_RUNTIME_SUPPORT=yes
29789        USE_MACOSX_RUNTIME_SUPPORT=yes
29790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29791$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29792    else
29793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29794$as_echo "yes, but explicitly disabled." >&6; }
29795    fi
29796else
29797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29798$as_echo "no" >&6; }
29799fi
29800
29801if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29803$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29804    X11_NOT_NEEDED=
29805    FREETYPE2_NOT_NEEDED=
29806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29807$as_echo "alsa pulse" >&6; }
29808fi
29809
29810
29811
29812###############################################################################
29813#
29814# Check for X Windows
29815#
29816
29817# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29818# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29819# --x-libraries for the sysroot, if that seems to be correct.
29820if test "x$SYS_ROOT" != "x/"; then
29821  if test "x$x_includes" = xNONE; then
29822    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29823      x_includes="$SYS_ROOT/usr/X11R6/include"
29824    fi
29825  fi
29826  if test "x$x_libraries" = xNONE; then
29827    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29828      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29829    fi
29830  fi
29831fi
29832
29833# Now let autoconf do it's magic
29834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29835$as_echo_n "checking for X... " >&6; }
29836
29837
29838# Check whether --with-x was given.
29839if test "${with_x+set}" = set; then :
29840  withval=$with_x;
29841fi
29842
29843# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29844if test "x$with_x" = xno; then
29845  # The user explicitly disabled X.
29846  have_x=disabled
29847else
29848  case $x_includes,$x_libraries in #(
29849    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29850    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29851  $as_echo_n "(cached) " >&6
29852else
29853  # One or both of the vars are not set, and there is no cached value.
29854ac_x_includes=no ac_x_libraries=no
29855rm -f -r conftest.dir
29856if mkdir conftest.dir; then
29857  cd conftest.dir
29858  cat >Imakefile <<'_ACEOF'
29859incroot:
29860	@echo incroot='${INCROOT}'
29861usrlibdir:
29862	@echo usrlibdir='${USRLIBDIR}'
29863libdir:
29864	@echo libdir='${LIBDIR}'
29865_ACEOF
29866  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29867    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29868    for ac_var in incroot usrlibdir libdir; do
29869      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29870    done
29871    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29872    for ac_extension in a so sl dylib la dll; do
29873      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29874	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29875	ac_im_usrlibdir=$ac_im_libdir; break
29876      fi
29877    done
29878    # Screen out bogus values from the imake configuration.  They are
29879    # bogus both because they are the default anyway, and because
29880    # using them would break gcc on systems where it needs fixed includes.
29881    case $ac_im_incroot in
29882	/usr/include) ac_x_includes= ;;
29883	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29884    esac
29885    case $ac_im_usrlibdir in
29886	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29887	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29888    esac
29889  fi
29890  cd ..
29891  rm -f -r conftest.dir
29892fi
29893
29894# Standard set of common directories for X headers.
29895# Check X11 before X11Rn because it is often a symlink to the current release.
29896ac_x_header_dirs='
29897/usr/X11/include
29898/usr/X11R7/include
29899/usr/X11R6/include
29900/usr/X11R5/include
29901/usr/X11R4/include
29902
29903/usr/include/X11
29904/usr/include/X11R7
29905/usr/include/X11R6
29906/usr/include/X11R5
29907/usr/include/X11R4
29908
29909/usr/local/X11/include
29910/usr/local/X11R7/include
29911/usr/local/X11R6/include
29912/usr/local/X11R5/include
29913/usr/local/X11R4/include
29914
29915/usr/local/include/X11
29916/usr/local/include/X11R7
29917/usr/local/include/X11R6
29918/usr/local/include/X11R5
29919/usr/local/include/X11R4
29920
29921/usr/X386/include
29922/usr/x386/include
29923/usr/XFree86/include/X11
29924
29925/usr/include
29926/usr/local/include
29927/usr/unsupported/include
29928/usr/athena/include
29929/usr/local/x11r5/include
29930/usr/lpp/Xamples/include
29931
29932/usr/openwin/include
29933/usr/openwin/share/include'
29934
29935if test "$ac_x_includes" = no; then
29936  # Guess where to find include files, by looking for Xlib.h.
29937  # First, try using that file with no special directory specified.
29938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29939/* end confdefs.h.  */
29940#include <X11/Xlib.h>
29941_ACEOF
29942if ac_fn_cxx_try_cpp "$LINENO"; then :
29943  # We can compile using X headers with no special include directory.
29944ac_x_includes=
29945else
29946  for ac_dir in $ac_x_header_dirs; do
29947  if test -r "$ac_dir/X11/Xlib.h"; then
29948    ac_x_includes=$ac_dir
29949    break
29950  fi
29951done
29952fi
29953rm -f conftest.err conftest.i conftest.$ac_ext
29954fi # $ac_x_includes = no
29955
29956if test "$ac_x_libraries" = no; then
29957  # Check for the libraries.
29958  # See if we find them without any special options.
29959  # Don't add to $LIBS permanently.
29960  ac_save_LIBS=$LIBS
29961  LIBS="-lX11 $LIBS"
29962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29963/* end confdefs.h.  */
29964#include <X11/Xlib.h>
29965int
29966main ()
29967{
29968XrmInitialize ()
29969  ;
29970  return 0;
29971}
29972_ACEOF
29973if ac_fn_cxx_try_link "$LINENO"; then :
29974  LIBS=$ac_save_LIBS
29975# We can link X programs with no special library path.
29976ac_x_libraries=
29977else
29978  LIBS=$ac_save_LIBS
29979for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29980do
29981  # Don't even attempt the hair of trying to link an X program!
29982  for ac_extension in a so sl dylib la dll; do
29983    if test -r "$ac_dir/libX11.$ac_extension"; then
29984      ac_x_libraries=$ac_dir
29985      break 2
29986    fi
29987  done
29988done
29989fi
29990rm -f core conftest.err conftest.$ac_objext \
29991    conftest$ac_exeext conftest.$ac_ext
29992fi # $ac_x_libraries = no
29993
29994case $ac_x_includes,$ac_x_libraries in #(
29995  no,* | *,no | *\'*)
29996    # Didn't find X, or a directory has "'" in its name.
29997    ac_cv_have_x="have_x=no";; #(
29998  *)
29999    # Record where we found X for the cache.
30000    ac_cv_have_x="have_x=yes\
30001	ac_x_includes='$ac_x_includes'\
30002	ac_x_libraries='$ac_x_libraries'"
30003esac
30004fi
30005;; #(
30006    *) have_x=yes;;
30007  esac
30008  eval "$ac_cv_have_x"
30009fi # $with_x != no
30010
30011if test "$have_x" != yes; then
30012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30013$as_echo "$have_x" >&6; }
30014  no_x=yes
30015else
30016  # If each of the values was on the command line, it overrides each guess.
30017  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30018  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30019  # Update the cache value to reflect the command line values.
30020  ac_cv_have_x="have_x=yes\
30021	ac_x_includes='$x_includes'\
30022	ac_x_libraries='$x_libraries'"
30023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30024$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30025fi
30026
30027if test "$no_x" = yes; then
30028  # Not all programs may use this symbol, but it does not hurt to define it.
30029
30030$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30031
30032  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30033else
30034  if test -n "$x_includes"; then
30035    X_CFLAGS="$X_CFLAGS -I$x_includes"
30036  fi
30037
30038  # It would also be nice to do this for all -L options, not just this one.
30039  if test -n "$x_libraries"; then
30040    X_LIBS="$X_LIBS -L$x_libraries"
30041    # For Solaris; some versions of Sun CC require a space after -R and
30042    # others require no space.  Words are not sufficient . . . .
30043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30044$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30045    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30046    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30047    ac_cxx_werror_flag=yes
30048    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30049/* end confdefs.h.  */
30050
30051int
30052main ()
30053{
30054
30055  ;
30056  return 0;
30057}
30058_ACEOF
30059if ac_fn_cxx_try_link "$LINENO"; then :
30060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30061$as_echo "no" >&6; }
30062       X_LIBS="$X_LIBS -R$x_libraries"
30063else
30064  LIBS="$ac_xsave_LIBS -R $x_libraries"
30065       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30066/* end confdefs.h.  */
30067
30068int
30069main ()
30070{
30071
30072  ;
30073  return 0;
30074}
30075_ACEOF
30076if ac_fn_cxx_try_link "$LINENO"; then :
30077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30078$as_echo "yes" >&6; }
30079	  X_LIBS="$X_LIBS -R $x_libraries"
30080else
30081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30082$as_echo "neither works" >&6; }
30083fi
30084rm -f core conftest.err conftest.$ac_objext \
30085    conftest$ac_exeext conftest.$ac_ext
30086fi
30087rm -f core conftest.err conftest.$ac_objext \
30088    conftest$ac_exeext conftest.$ac_ext
30089    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30090    LIBS=$ac_xsave_LIBS
30091  fi
30092
30093  # Check for system-dependent libraries X programs must link with.
30094  # Do this before checking for the system-independent R6 libraries
30095  # (-lICE), since we may need -lsocket or whatever for X linking.
30096
30097  if test "$ISC" = yes; then
30098    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30099  else
30100    # Martyn Johnson says this is needed for Ultrix, if the X
30101    # libraries were built with DECnet support.  And Karl Berry says
30102    # the Alpha needs dnet_stub (dnet does not exist).
30103    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30104    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30105/* end confdefs.h.  */
30106
30107/* Override any GCC internal prototype to avoid an error.
30108   Use char because int might match the return type of a GCC
30109   builtin and then its argument prototype would still apply.  */
30110#ifdef __cplusplus
30111extern "C"
30112#endif
30113char XOpenDisplay ();
30114int
30115main ()
30116{
30117return XOpenDisplay ();
30118  ;
30119  return 0;
30120}
30121_ACEOF
30122if ac_fn_cxx_try_link "$LINENO"; then :
30123
30124else
30125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30126$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30127if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30128  $as_echo_n "(cached) " >&6
30129else
30130  ac_check_lib_save_LIBS=$LIBS
30131LIBS="-ldnet  $LIBS"
30132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30133/* end confdefs.h.  */
30134
30135/* Override any GCC internal prototype to avoid an error.
30136   Use char because int might match the return type of a GCC
30137   builtin and then its argument prototype would still apply.  */
30138#ifdef __cplusplus
30139extern "C"
30140#endif
30141char dnet_ntoa ();
30142int
30143main ()
30144{
30145return dnet_ntoa ();
30146  ;
30147  return 0;
30148}
30149_ACEOF
30150if ac_fn_cxx_try_link "$LINENO"; then :
30151  ac_cv_lib_dnet_dnet_ntoa=yes
30152else
30153  ac_cv_lib_dnet_dnet_ntoa=no
30154fi
30155rm -f core conftest.err conftest.$ac_objext \
30156    conftest$ac_exeext conftest.$ac_ext
30157LIBS=$ac_check_lib_save_LIBS
30158fi
30159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30160$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30161if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30162  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30163fi
30164
30165    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30167$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30168if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30169  $as_echo_n "(cached) " >&6
30170else
30171  ac_check_lib_save_LIBS=$LIBS
30172LIBS="-ldnet_stub  $LIBS"
30173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30174/* end confdefs.h.  */
30175
30176/* Override any GCC internal prototype to avoid an error.
30177   Use char because int might match the return type of a GCC
30178   builtin and then its argument prototype would still apply.  */
30179#ifdef __cplusplus
30180extern "C"
30181#endif
30182char dnet_ntoa ();
30183int
30184main ()
30185{
30186return dnet_ntoa ();
30187  ;
30188  return 0;
30189}
30190_ACEOF
30191if ac_fn_cxx_try_link "$LINENO"; then :
30192  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30193else
30194  ac_cv_lib_dnet_stub_dnet_ntoa=no
30195fi
30196rm -f core conftest.err conftest.$ac_objext \
30197    conftest$ac_exeext conftest.$ac_ext
30198LIBS=$ac_check_lib_save_LIBS
30199fi
30200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30201$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30202if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30203  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30204fi
30205
30206    fi
30207fi
30208rm -f core conftest.err conftest.$ac_objext \
30209    conftest$ac_exeext conftest.$ac_ext
30210    LIBS="$ac_xsave_LIBS"
30211
30212    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30213    # to get the SysV transport functions.
30214    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30215    # needs -lnsl.
30216    # The nsl library prevents programs from opening the X display
30217    # on Irix 5.2, according to T.E. Dickey.
30218    # The functions gethostbyname, getservbyname, and inet_addr are
30219    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30220    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30221if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30222
30223fi
30224
30225    if test $ac_cv_func_gethostbyname = no; then
30226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30227$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30228if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30229  $as_echo_n "(cached) " >&6
30230else
30231  ac_check_lib_save_LIBS=$LIBS
30232LIBS="-lnsl  $LIBS"
30233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30234/* end confdefs.h.  */
30235
30236/* Override any GCC internal prototype to avoid an error.
30237   Use char because int might match the return type of a GCC
30238   builtin and then its argument prototype would still apply.  */
30239#ifdef __cplusplus
30240extern "C"
30241#endif
30242char gethostbyname ();
30243int
30244main ()
30245{
30246return gethostbyname ();
30247  ;
30248  return 0;
30249}
30250_ACEOF
30251if ac_fn_cxx_try_link "$LINENO"; then :
30252  ac_cv_lib_nsl_gethostbyname=yes
30253else
30254  ac_cv_lib_nsl_gethostbyname=no
30255fi
30256rm -f core conftest.err conftest.$ac_objext \
30257    conftest$ac_exeext conftest.$ac_ext
30258LIBS=$ac_check_lib_save_LIBS
30259fi
30260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30261$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30262if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30263  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30264fi
30265
30266      if test $ac_cv_lib_nsl_gethostbyname = no; then
30267	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30268$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30269if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30270  $as_echo_n "(cached) " >&6
30271else
30272  ac_check_lib_save_LIBS=$LIBS
30273LIBS="-lbsd  $LIBS"
30274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30275/* end confdefs.h.  */
30276
30277/* Override any GCC internal prototype to avoid an error.
30278   Use char because int might match the return type of a GCC
30279   builtin and then its argument prototype would still apply.  */
30280#ifdef __cplusplus
30281extern "C"
30282#endif
30283char gethostbyname ();
30284int
30285main ()
30286{
30287return gethostbyname ();
30288  ;
30289  return 0;
30290}
30291_ACEOF
30292if ac_fn_cxx_try_link "$LINENO"; then :
30293  ac_cv_lib_bsd_gethostbyname=yes
30294else
30295  ac_cv_lib_bsd_gethostbyname=no
30296fi
30297rm -f core conftest.err conftest.$ac_objext \
30298    conftest$ac_exeext conftest.$ac_ext
30299LIBS=$ac_check_lib_save_LIBS
30300fi
30301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30302$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30303if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30304  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30305fi
30306
30307      fi
30308    fi
30309
30310    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30311    # socket/setsockopt and other routines are undefined under SCO ODT
30312    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30313    # on later versions), says Simon Leinen: it contains gethostby*
30314    # variants that don't use the name server (or something).  -lsocket
30315    # must be given before -lnsl if both are needed.  We assume that
30316    # if connect needs -lnsl, so does gethostbyname.
30317    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30318if test "x$ac_cv_func_connect" = x""yes; then :
30319
30320fi
30321
30322    if test $ac_cv_func_connect = no; then
30323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30324$as_echo_n "checking for connect in -lsocket... " >&6; }
30325if test "${ac_cv_lib_socket_connect+set}" = set; then :
30326  $as_echo_n "(cached) " >&6
30327else
30328  ac_check_lib_save_LIBS=$LIBS
30329LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30331/* end confdefs.h.  */
30332
30333/* Override any GCC internal prototype to avoid an error.
30334   Use char because int might match the return type of a GCC
30335   builtin and then its argument prototype would still apply.  */
30336#ifdef __cplusplus
30337extern "C"
30338#endif
30339char connect ();
30340int
30341main ()
30342{
30343return connect ();
30344  ;
30345  return 0;
30346}
30347_ACEOF
30348if ac_fn_cxx_try_link "$LINENO"; then :
30349  ac_cv_lib_socket_connect=yes
30350else
30351  ac_cv_lib_socket_connect=no
30352fi
30353rm -f core conftest.err conftest.$ac_objext \
30354    conftest$ac_exeext conftest.$ac_ext
30355LIBS=$ac_check_lib_save_LIBS
30356fi
30357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30358$as_echo "$ac_cv_lib_socket_connect" >&6; }
30359if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30360  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30361fi
30362
30363    fi
30364
30365    # Guillermo Gomez says -lposix is necessary on A/UX.
30366    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30367if test "x$ac_cv_func_remove" = x""yes; then :
30368
30369fi
30370
30371    if test $ac_cv_func_remove = no; then
30372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30373$as_echo_n "checking for remove in -lposix... " >&6; }
30374if test "${ac_cv_lib_posix_remove+set}" = set; then :
30375  $as_echo_n "(cached) " >&6
30376else
30377  ac_check_lib_save_LIBS=$LIBS
30378LIBS="-lposix  $LIBS"
30379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30380/* end confdefs.h.  */
30381
30382/* Override any GCC internal prototype to avoid an error.
30383   Use char because int might match the return type of a GCC
30384   builtin and then its argument prototype would still apply.  */
30385#ifdef __cplusplus
30386extern "C"
30387#endif
30388char remove ();
30389int
30390main ()
30391{
30392return remove ();
30393  ;
30394  return 0;
30395}
30396_ACEOF
30397if ac_fn_cxx_try_link "$LINENO"; then :
30398  ac_cv_lib_posix_remove=yes
30399else
30400  ac_cv_lib_posix_remove=no
30401fi
30402rm -f core conftest.err conftest.$ac_objext \
30403    conftest$ac_exeext conftest.$ac_ext
30404LIBS=$ac_check_lib_save_LIBS
30405fi
30406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30407$as_echo "$ac_cv_lib_posix_remove" >&6; }
30408if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30409  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30410fi
30411
30412    fi
30413
30414    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30415    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30416if test "x$ac_cv_func_shmat" = x""yes; then :
30417
30418fi
30419
30420    if test $ac_cv_func_shmat = no; then
30421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30422$as_echo_n "checking for shmat in -lipc... " >&6; }
30423if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30424  $as_echo_n "(cached) " >&6
30425else
30426  ac_check_lib_save_LIBS=$LIBS
30427LIBS="-lipc  $LIBS"
30428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30429/* end confdefs.h.  */
30430
30431/* Override any GCC internal prototype to avoid an error.
30432   Use char because int might match the return type of a GCC
30433   builtin and then its argument prototype would still apply.  */
30434#ifdef __cplusplus
30435extern "C"
30436#endif
30437char shmat ();
30438int
30439main ()
30440{
30441return shmat ();
30442  ;
30443  return 0;
30444}
30445_ACEOF
30446if ac_fn_cxx_try_link "$LINENO"; then :
30447  ac_cv_lib_ipc_shmat=yes
30448else
30449  ac_cv_lib_ipc_shmat=no
30450fi
30451rm -f core conftest.err conftest.$ac_objext \
30452    conftest$ac_exeext conftest.$ac_ext
30453LIBS=$ac_check_lib_save_LIBS
30454fi
30455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30456$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30457if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30458  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30459fi
30460
30461    fi
30462  fi
30463
30464  # Check for libraries that X11R6 Xt/Xaw programs need.
30465  ac_save_LDFLAGS=$LDFLAGS
30466  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30467  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30468  # check for ICE first), but we must link in the order -lSM -lICE or
30469  # we get undefined symbols.  So assume we have SM if we have ICE.
30470  # These have to be linked with before -lX11, unlike the other
30471  # libraries we check for below, so use a different variable.
30472  # John Interrante, Karl Berry
30473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30474$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30475if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30476  $as_echo_n "(cached) " >&6
30477else
30478  ac_check_lib_save_LIBS=$LIBS
30479LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30481/* end confdefs.h.  */
30482
30483/* Override any GCC internal prototype to avoid an error.
30484   Use char because int might match the return type of a GCC
30485   builtin and then its argument prototype would still apply.  */
30486#ifdef __cplusplus
30487extern "C"
30488#endif
30489char IceConnectionNumber ();
30490int
30491main ()
30492{
30493return IceConnectionNumber ();
30494  ;
30495  return 0;
30496}
30497_ACEOF
30498if ac_fn_cxx_try_link "$LINENO"; then :
30499  ac_cv_lib_ICE_IceConnectionNumber=yes
30500else
30501  ac_cv_lib_ICE_IceConnectionNumber=no
30502fi
30503rm -f core conftest.err conftest.$ac_objext \
30504    conftest$ac_exeext conftest.$ac_ext
30505LIBS=$ac_check_lib_save_LIBS
30506fi
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30508$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30509if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30510  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30511fi
30512
30513  LDFLAGS=$ac_save_LDFLAGS
30514
30515fi
30516
30517
30518# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30519# this doesn't make sense so we remove it.
30520if test "x$COMPILE_TYPE" = xcross; then
30521  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30522fi
30523
30524if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30525
30526    # Print a helpful message on how to acquire the necessary build dependency.
30527    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30528    MISSING_DEPENDENCY=x11
30529    PKGHANDLER_COMMAND=
30530
30531    case $PKGHANDLER in
30532	apt-get)
30533                apt_help     $MISSING_DEPENDENCY ;;
30534    yum)
30535                yum_help     $MISSING_DEPENDENCY ;;
30536	port)
30537                port_help    $MISSING_DEPENDENCY ;;
30538	pkgutil)
30539                pkgutil_help $MISSING_DEPENDENCY ;;
30540	pkgadd)
30541                pkgadd_help  $MISSING_DEPENDENCY ;;
30542    * )
30543      break ;;
30544    esac
30545
30546    if test "x$PKGHANDLER_COMMAND" != x; then
30547        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30548    fi
30549
30550    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30551fi
30552
30553# Some of the old makefiles require a setting of OPENWIN_HOME
30554# Since the X11R6 directory has disappeared on later Linuxes,
30555# we need to probe for it.
30556if test "x$OPENJDK_TARGET_OS" = xlinux; then
30557    if test -d "$SYS_ROOT/usr/X11R6"; then
30558        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30559    fi
30560    if test -d "$SYS_ROOT/usr/include/X11"; then
30561        OPENWIN_HOME="$SYS_ROOT/usr"
30562    fi
30563fi
30564if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30565    OPENWIN_HOME="/usr/openwin"
30566fi
30567
30568
30569
30570#
30571# Weird Sol10 something check...TODO change to try compile
30572#
30573if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30574  if test "`uname -r`" = "5.10"; then
30575     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30576     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30577     fi
30578  fi
30579fi
30580
30581ac_ext=c
30582ac_cpp='$CPP $CPPFLAGS'
30583ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30584ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30585ac_compiler_gnu=$ac_cv_c_compiler_gnu
30586
30587OLD_CFLAGS="$CFLAGS"
30588CFLAGS="$CFLAGS $X_CFLAGS"
30589
30590# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30591for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30592do :
30593  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30594ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30595                   # include <X11/Xutil.h>
30596
30597"
30598if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30599  cat >>confdefs.h <<_ACEOF
30600#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30601_ACEOF
30602 X11_A_OK=yes
30603else
30604  X11_A_OK=no; break
30605fi
30606
30607done
30608
30609
30610CFLAGS="$OLD_CFLAGS"
30611ac_ext=cpp
30612ac_cpp='$CXXCPP $CPPFLAGS'
30613ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30614ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30615ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30616
30617
30618if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30619
30620    # Print a helpful message on how to acquire the necessary build dependency.
30621    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30622    MISSING_DEPENDENCY=x11
30623    PKGHANDLER_COMMAND=
30624
30625    case $PKGHANDLER in
30626	apt-get)
30627                apt_help     $MISSING_DEPENDENCY ;;
30628    yum)
30629                yum_help     $MISSING_DEPENDENCY ;;
30630	port)
30631                port_help    $MISSING_DEPENDENCY ;;
30632	pkgutil)
30633                pkgutil_help $MISSING_DEPENDENCY ;;
30634	pkgadd)
30635                pkgadd_help  $MISSING_DEPENDENCY ;;
30636    * )
30637      break ;;
30638    esac
30639
30640    if test "x$PKGHANDLER_COMMAND" != x; then
30641        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30642    fi
30643
30644    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30645fi
30646
30647
30648
30649
30650
30651
30652###############################################################################
30653#
30654# The common unix printing system cups is used to print from java.
30655#
30656
30657# Check whether --with-cups was given.
30658if test "${with_cups+set}" = set; then :
30659  withval=$with_cups;
30660fi
30661
30662
30663# Check whether --with-cups-include was given.
30664if test "${with_cups_include+set}" = set; then :
30665  withval=$with_cups_include;
30666fi
30667
30668
30669if test "x$CUPS_NOT_NEEDED" = xyes; then
30670	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30671		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30672$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30673	fi
30674	CUPS_CFLAGS=
30675else
30676	CUPS_FOUND=no
30677
30678	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30679	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30680	fi
30681
30682	if test "x${with_cups}" != x; then
30683	    CUPS_CFLAGS="-I${with_cups}/include"
30684	    CUPS_FOUND=yes
30685	fi
30686	if test "x${with_cups_include}" != x; then
30687	    CUPS_CFLAGS="-I${with_cups_include}"
30688	    CUPS_FOUND=yes
30689	fi
30690	if test "x$CUPS_FOUND" = xno; then
30691
30692
30693    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30694        # Source the builddeps file again, to make sure it uses the latest variables!
30695        . $builddepsfile
30696        # Look for a target and build machine specific resource!
30697        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30698        if test "x$resource" = x; then
30699            # Ok, lets instead look for a target specific resource
30700            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30701        fi
30702        if test "x$resource" = x; then
30703            # Ok, lets instead look for a build specific resource
30704            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30705        fi
30706        if test "x$resource" = x; then
30707            # Ok, lets instead look for a generic resource
30708            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30709            resource=${builddep_cups}
30710        fi
30711        if test "x$resource" != x; then
30712            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30713$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30714	    # If the resource in the builddeps.conf file is an existing directory,
30715	    # for example /java/linux/cups
30716	    if test -d ${resource}; then
30717	       depdir=${resource}
30718	    else
30719
30720# cups is for example mymodule
30721# $resource is for example libs/general/libmymod_1_2_3.zip
30722# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30723# $with_builddeps_dir is for example /localhome/builddeps
30724# depdir is the name of the variable into which we store the depdir, eg MYMOD
30725# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30726# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30727    filename=`basename $resource`
30728    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30729    filebase=${filename%%.*}
30730    extension=${filename#*.}
30731    installdir=$with_builddeps_dir/$filebase
30732    if test ! -f $installdir/$filename.unpacked; then
30733        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30734$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30735        if test ! -d $installdir; then
30736            mkdir -p $installdir
30737        fi
30738        if test ! -d $installdir; then
30739            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30740        fi
30741        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30742        touch $tmpfile
30743        if test ! -f $tmpfile; then
30744            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30745        fi
30746
30747    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30748    # $tmpfile is the local file name for the downloaded file.
30749    VALID_TOOL=no
30750    if test "x$BDEPS_FTP" = xwget; then
30751       VALID_TOOL=yes
30752       wget -O $tmpfile $with_builddeps_server/$resource
30753    fi
30754    if test "x$BDEPS_FTP" = xlftp; then
30755       VALID_TOOL=yes
30756       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30757    fi
30758    if test "x$BDEPS_FTP" = xftp; then
30759        VALID_TOOL=yes
30760        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30761        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30762        FTPUSERPWD=${FTPSERVER%%@*}
30763        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30764            FTPUSER=${userpwd%%:*}
30765            FTPPWD=${userpwd#*@}
30766            FTPSERVER=${FTPSERVER#*@}
30767        else
30768            FTPUSER=ftp
30769            FTPPWD=ftp
30770        fi
30771        # the "pass" command does not work on some
30772        # ftp clients (read ftp.exe) but if it works,
30773        # passive mode is better!
30774        (\
30775            echo "user $FTPUSER $FTPPWD"        ;\
30776            echo "pass"                         ;\
30777            echo "bin"                          ;\
30778            echo "get $FTPPATH $tmpfile"              ;\
30779        ) | ftp -in $FTPSERVER
30780    fi
30781    if test "x$VALID_TOOL" != xyes; then
30782       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30783    fi
30784
30785        mv $tmpfile $installdir/$filename
30786        if test ! -s $installdir/$filename; then
30787            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30788        fi
30789        case "$extension" in
30790            zip)  echo "Unzipping $installdir/$filename..."
30791               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30792            ;;
30793            tar.gz) echo "Untaring $installdir/$filename..."
30794               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30795            ;;
30796            tgz) echo "Untaring $installdir/$filename..."
30797               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30798            ;;
30799            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30800            ;;
30801        esac
30802    fi
30803    if test -f $installdir/$filename.unpacked; then
30804        depdir=$installdir
30805    fi
30806
30807	    fi
30808            # Source the builddeps file again, because in the previous command, the depdir
30809            # was updated to point at the current build dependency install directory.
30810            . $builddepsfile
30811            # Now extract variables from the builddeps.conf files.
30812            theroot=${builddep_cups_ROOT}
30813            thecflags=${builddep_cups_CFLAGS}
30814            thelibs=${builddep_cups_LIBS}
30815            if test "x$depdir" = x; then
30816                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30817            fi
30818            CUPS=$depdir
30819            if test "x$theroot" != x; then
30820               CUPS="$theroot"
30821            fi
30822            if test "x$thecflags" != x; then
30823               CUPS_CFLAGS="$thecflags"
30824            fi
30825            if test "x$thelibs" != x; then
30826               CUPS_LIBS="$thelibs"
30827            fi
30828            CUPS_FOUND=yes
30829
30830        fi
30831
30832    fi
30833
30834	fi
30835	if test "x$CUPS_FOUND" = xno; then
30836	    # Are the cups headers installed in the default /usr/include location?
30837	    for ac_header in cups/cups.h cups/ppd.h
30838do :
30839  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30840ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30841if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30842  cat >>confdefs.h <<_ACEOF
30843#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30844_ACEOF
30845 CUPS_FOUND=yes
30846	                      CUPS_CFLAGS=
30847	                      DEFAULT_CUPS=yes
30848fi
30849
30850done
30851
30852	fi
30853	if test "x$CUPS_FOUND" = xno; then
30854	    # Getting nervous now? Lets poke around for standard Solaris third-party
30855	    # package installation locations.
30856	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30857$as_echo_n "checking for cups headers... " >&6; }
30858	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30859	       # An SFW package seems to be installed!
30860	       CUPS_FOUND=yes
30861	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30862	    elif test -s /opt/csw/include/cups/cups.h; then
30863	       # A CSW package seems to be installed!
30864	       CUPS_FOUND=yes
30865	       CUPS_CFLAGS="-I/opt/csw/include"
30866	    fi
30867	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30868$as_echo "$CUPS_FOUND" >&6; }
30869	fi
30870	if test "x$CUPS_FOUND" = xno; then
30871
30872    # Print a helpful message on how to acquire the necessary build dependency.
30873    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30874    MISSING_DEPENDENCY=cups
30875    PKGHANDLER_COMMAND=
30876
30877    case $PKGHANDLER in
30878	apt-get)
30879                apt_help     $MISSING_DEPENDENCY ;;
30880    yum)
30881                yum_help     $MISSING_DEPENDENCY ;;
30882	port)
30883                port_help    $MISSING_DEPENDENCY ;;
30884	pkgutil)
30885                pkgutil_help $MISSING_DEPENDENCY ;;
30886	pkgadd)
30887                pkgadd_help  $MISSING_DEPENDENCY ;;
30888    * )
30889      break ;;
30890    esac
30891
30892    if test "x$PKGHANDLER_COMMAND" != x; then
30893        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30894    fi
30895
30896	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30897	fi
30898fi
30899
30900
30901
30902
30903
30904
30905###############################################################################
30906#
30907# The ubiquitous freetype2 library is used to render fonts.
30908#
30909
30910# Check whether --with-freetype was given.
30911if test "${with_freetype+set}" = set; then :
30912  withval=$with_freetype;
30913fi
30914
30915
30916# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30917USING_SYSTEM_FT_LIB=false
30918
30919if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30920	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30921		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30922$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30923	fi
30924	FREETYPE2_CFLAGS=
30925	FREETYPE2_LIBS=
30926        FREETYPE2_LIB_PATH=
30927else
30928	FREETYPE2_FOUND=no
30929
30930	if test "x$with_freetype" != x; then
30931
30932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30933
30934  # Input might be given as Windows format, start by converting to
30935  # unix format.
30936  path="$with_freetype"
30937  new_path=`$CYGPATH -u "$path"`
30938
30939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30942  # "foo.exe" is OK but "foo" is an error.
30943  #
30944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30945  # It is also a way to make sure we got the proper file name for the real test later on.
30946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30947  if test "x$test_shortpath" = x; then
30948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30949$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30950    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30951  fi
30952
30953  # Call helper function which possibly converts this using DOS-style short mode.
30954  # If so, the updated path is stored in $new_path.
30955
30956  input_path="$new_path"
30957  # Check if we need to convert this using DOS-style short mode. If the path
30958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30959  # take no chances and rewrite it.
30960  # Note: m4 eats our [], so we need to use [ and ] instead.
30961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30962  if test "x$has_forbidden_chars" != x; then
30963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30967      # Going to short mode and back again did indeed matter. Since short mode is
30968      # case insensitive, let's make it lowercase to improve readability.
30969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30970      # Now convert it back to Unix-stile (cygpath)
30971      input_path=`$CYGPATH -u "$shortmode_path"`
30972      new_path="$input_path"
30973    fi
30974  fi
30975
30976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30977  if test "x$test_cygdrive_prefix" = x; then
30978    # As a simple fix, exclude /usr/bin since it's not a real path.
30979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30981      # a path prefixed by /cygdrive for fixpath to work.
30982      new_path="$CYGWIN_ROOT_PATH$input_path"
30983    fi
30984  fi
30985
30986
30987  if test "x$path" != "x$new_path"; then
30988    with_freetype="$new_path"
30989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30990$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30991  fi
30992
30993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30994
30995  path="$with_freetype"
30996  has_colon=`$ECHO $path | $GREP ^.:`
30997  new_path="$path"
30998  if test "x$has_colon" = x; then
30999    # Not in mixed or Windows style, start by that.
31000    new_path=`cmd //c echo $path`
31001  fi
31002
31003
31004  input_path="$new_path"
31005  # Check if we need to convert this using DOS-style short mode. If the path
31006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31007  # take no chances and rewrite it.
31008  # Note: m4 eats our [], so we need to use [ and ] instead.
31009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31010  if test "x$has_forbidden_chars" != x; then
31011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31013  fi
31014
31015
31016  windows_path="$new_path"
31017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31018    unix_path=`$CYGPATH -u "$windows_path"`
31019    new_path="$unix_path"
31020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31022    new_path="$unix_path"
31023  fi
31024
31025  if test "x$path" != "x$new_path"; then
31026    with_freetype="$new_path"
31027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31028$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31029  fi
31030
31031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31033
31034  else
31035    # We're on a posix platform. Hooray! :)
31036    path="$with_freetype"
31037    has_space=`$ECHO "$path" | $GREP " "`
31038    if test "x$has_space" != x; then
31039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31040$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31041      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31042    fi
31043
31044    # Use eval to expand a potential ~
31045    eval path="$path"
31046    if test ! -f "$path" && test ! -d "$path"; then
31047      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31048    fi
31049
31050    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31051  fi
31052
31053	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31054            FREETYPE2_LIB_PATH="$with_freetype/lib"
31055            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31056                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31057                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31058            fi
31059            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31060                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31061            fi
31062	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31063            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31064                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31065            fi
31066 	    FREETYPE2_FOUND=yes
31067   	    if test "x$FREETYPE2_FOUND" = xyes; then
31068	        # Verify that the directories exist
31069                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31070		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31071		fi
31072	        # List the contents of the lib.
31073		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31074                if test "x$FREETYPELIB" = x; then
31075		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31076		fi
31077	        # Check one h-file
31078                if ! test -s "$with_freetype/include/ft2build.h"; then
31079		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31080		fi
31081            fi
31082        fi
31083	if test "x$FREETYPE2_FOUND" = xno; then
31084
31085
31086    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31087        # Source the builddeps file again, to make sure it uses the latest variables!
31088        . $builddepsfile
31089        # Look for a target and build machine specific resource!
31090        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31091        if test "x$resource" = x; then
31092            # Ok, lets instead look for a target specific resource
31093            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31094        fi
31095        if test "x$resource" = x; then
31096            # Ok, lets instead look for a build specific resource
31097            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31098        fi
31099        if test "x$resource" = x; then
31100            # Ok, lets instead look for a generic resource
31101            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31102            resource=${builddep_freetype2}
31103        fi
31104        if test "x$resource" != x; then
31105            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31106$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31107	    # If the resource in the builddeps.conf file is an existing directory,
31108	    # for example /java/linux/cups
31109	    if test -d ${resource}; then
31110	       depdir=${resource}
31111	    else
31112
31113# freetype2 is for example mymodule
31114# $resource is for example libs/general/libmymod_1_2_3.zip
31115# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31116# $with_builddeps_dir is for example /localhome/builddeps
31117# depdir is the name of the variable into which we store the depdir, eg MYMOD
31118# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31119# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31120    filename=`basename $resource`
31121    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31122    filebase=${filename%%.*}
31123    extension=${filename#*.}
31124    installdir=$with_builddeps_dir/$filebase
31125    if test ! -f $installdir/$filename.unpacked; then
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31127$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31128        if test ! -d $installdir; then
31129            mkdir -p $installdir
31130        fi
31131        if test ! -d $installdir; then
31132            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31133        fi
31134        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31135        touch $tmpfile
31136        if test ! -f $tmpfile; then
31137            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31138        fi
31139
31140    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31141    # $tmpfile is the local file name for the downloaded file.
31142    VALID_TOOL=no
31143    if test "x$BDEPS_FTP" = xwget; then
31144       VALID_TOOL=yes
31145       wget -O $tmpfile $with_builddeps_server/$resource
31146    fi
31147    if test "x$BDEPS_FTP" = xlftp; then
31148       VALID_TOOL=yes
31149       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31150    fi
31151    if test "x$BDEPS_FTP" = xftp; then
31152        VALID_TOOL=yes
31153        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31154        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31155        FTPUSERPWD=${FTPSERVER%%@*}
31156        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31157            FTPUSER=${userpwd%%:*}
31158            FTPPWD=${userpwd#*@}
31159            FTPSERVER=${FTPSERVER#*@}
31160        else
31161            FTPUSER=ftp
31162            FTPPWD=ftp
31163        fi
31164        # the "pass" command does not work on some
31165        # ftp clients (read ftp.exe) but if it works,
31166        # passive mode is better!
31167        (\
31168            echo "user $FTPUSER $FTPPWD"        ;\
31169            echo "pass"                         ;\
31170            echo "bin"                          ;\
31171            echo "get $FTPPATH $tmpfile"              ;\
31172        ) | ftp -in $FTPSERVER
31173    fi
31174    if test "x$VALID_TOOL" != xyes; then
31175       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31176    fi
31177
31178        mv $tmpfile $installdir/$filename
31179        if test ! -s $installdir/$filename; then
31180            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31181        fi
31182        case "$extension" in
31183            zip)  echo "Unzipping $installdir/$filename..."
31184               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31185            ;;
31186            tar.gz) echo "Untaring $installdir/$filename..."
31187               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31188            ;;
31189            tgz) echo "Untaring $installdir/$filename..."
31190               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31191            ;;
31192            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31193            ;;
31194        esac
31195    fi
31196    if test -f $installdir/$filename.unpacked; then
31197        depdir=$installdir
31198    fi
31199
31200	    fi
31201            # Source the builddeps file again, because in the previous command, the depdir
31202            # was updated to point at the current build dependency install directory.
31203            . $builddepsfile
31204            # Now extract variables from the builddeps.conf files.
31205            theroot=${builddep_freetype2_ROOT}
31206            thecflags=${builddep_freetype2_CFLAGS}
31207            thelibs=${builddep_freetype2_LIBS}
31208            if test "x$depdir" = x; then
31209                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31210            fi
31211            FREETYPE2=$depdir
31212            if test "x$theroot" != x; then
31213               FREETYPE2="$theroot"
31214            fi
31215            if test "x$thecflags" != x; then
31216               FREETYPE2_CFLAGS="$thecflags"
31217            fi
31218            if test "x$thelibs" != x; then
31219               FREETYPE2_LIBS="$thelibs"
31220            fi
31221            FREETYPE2_FOUND=yes
31222            else FREETYPE2_FOUND=no
31223
31224        fi
31225        else FREETYPE2_FOUND=no
31226
31227    fi
31228
31229            USING_SYSTEM_FT_LIB=true
31230	fi
31231	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31232            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31233
31234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31235
31236  # Input might be given as Windows format, start by converting to
31237  # unix format.
31238  path="$FREETYPELOCATION"
31239  new_path=`$CYGPATH -u "$path"`
31240
31241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31244  # "foo.exe" is OK but "foo" is an error.
31245  #
31246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31247  # It is also a way to make sure we got the proper file name for the real test later on.
31248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31249  if test "x$test_shortpath" = x; then
31250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31251$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31252    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31253  fi
31254
31255  # Call helper function which possibly converts this using DOS-style short mode.
31256  # If so, the updated path is stored in $new_path.
31257
31258  input_path="$new_path"
31259  # Check if we need to convert this using DOS-style short mode. If the path
31260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31261  # take no chances and rewrite it.
31262  # Note: m4 eats our [], so we need to use [ and ] instead.
31263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31264  if test "x$has_forbidden_chars" != x; then
31265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31269      # Going to short mode and back again did indeed matter. Since short mode is
31270      # case insensitive, let's make it lowercase to improve readability.
31271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31272      # Now convert it back to Unix-stile (cygpath)
31273      input_path=`$CYGPATH -u "$shortmode_path"`
31274      new_path="$input_path"
31275    fi
31276  fi
31277
31278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31279  if test "x$test_cygdrive_prefix" = x; then
31280    # As a simple fix, exclude /usr/bin since it's not a real path.
31281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31283      # a path prefixed by /cygdrive for fixpath to work.
31284      new_path="$CYGWIN_ROOT_PATH$input_path"
31285    fi
31286  fi
31287
31288
31289  if test "x$path" != "x$new_path"; then
31290    FREETYPELOCATION="$new_path"
31291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31292$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31293  fi
31294
31295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31296
31297  path="$FREETYPELOCATION"
31298  has_colon=`$ECHO $path | $GREP ^.:`
31299  new_path="$path"
31300  if test "x$has_colon" = x; then
31301    # Not in mixed or Windows style, start by that.
31302    new_path=`cmd //c echo $path`
31303  fi
31304
31305
31306  input_path="$new_path"
31307  # Check if we need to convert this using DOS-style short mode. If the path
31308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31309  # take no chances and rewrite it.
31310  # Note: m4 eats our [], so we need to use [ and ] instead.
31311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31312  if test "x$has_forbidden_chars" != x; then
31313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31315  fi
31316
31317
31318  windows_path="$new_path"
31319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31320    unix_path=`$CYGPATH -u "$windows_path"`
31321    new_path="$unix_path"
31322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31324    new_path="$unix_path"
31325  fi
31326
31327  if test "x$path" != "x$new_path"; then
31328    FREETYPELOCATION="$new_path"
31329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31330$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31331  fi
31332
31333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31335
31336  else
31337    # We're on a posix platform. Hooray! :)
31338    path="$FREETYPELOCATION"
31339    has_space=`$ECHO "$path" | $GREP " "`
31340    if test "x$has_space" != x; then
31341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31342$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31343      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31344    fi
31345
31346    # Use eval to expand a potential ~
31347    eval path="$path"
31348    if test ! -f "$path" && test ! -d "$path"; then
31349      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31350    fi
31351
31352    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31353  fi
31354
31355	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31356$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31357	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31358	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31359	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31360 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31361                if ! test -s "$FREETYPE2_LIBS"; then
31362		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31363		fi
31364                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31365		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31366		fi
31367                USING_SYSTEM_FT_LIB=true
31368                FREETYPE2_FOUND=yes
31369	    fi
31370	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31371$as_echo "$FREETYPE2_FOUND" >&6; }
31372        fi
31373	if test "x$FREETYPE2_FOUND" = xno; then
31374
31375pkg_failed=no
31376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31377$as_echo_n "checking for FREETYPE2... " >&6; }
31378
31379if test -n "$FREETYPE2_CFLAGS"; then
31380    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31381 elif test -n "$PKG_CONFIG"; then
31382    if test -n "$PKG_CONFIG" && \
31383    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31384  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31385  ac_status=$?
31386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31387  test $ac_status = 0; }; then
31388  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31389else
31390  pkg_failed=yes
31391fi
31392 else
31393    pkg_failed=untried
31394fi
31395if test -n "$FREETYPE2_LIBS"; then
31396    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31397 elif test -n "$PKG_CONFIG"; then
31398    if test -n "$PKG_CONFIG" && \
31399    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31400  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31401  ac_status=$?
31402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31403  test $ac_status = 0; }; then
31404  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31405else
31406  pkg_failed=yes
31407fi
31408 else
31409    pkg_failed=untried
31410fi
31411
31412
31413
31414if test $pkg_failed = yes; then
31415
31416if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31417        _pkg_short_errors_supported=yes
31418else
31419        _pkg_short_errors_supported=no
31420fi
31421        if test $_pkg_short_errors_supported = yes; then
31422	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31423        else
31424	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31425        fi
31426	# Put the nasty error message in config.log where it belongs
31427	echo "$FREETYPE2_PKG_ERRORS" >&5
31428
31429	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31430$as_echo "no" >&6; }
31431                FREETYPE2_FOUND=no
31432elif test $pkg_failed = untried; then
31433	FREETYPE2_FOUND=no
31434else
31435	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31436	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31438$as_echo "yes" >&6; }
31439	FREETYPE2_FOUND=yes
31440fi
31441            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31442            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31443            USING_SYSTEM_FT_LIB=true
31444            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31445            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31446              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31447            fi
31448	fi
31449	if test "x$FREETYPE2_FOUND" = xno; then
31450	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31451$as_echo_n "checking for freetype in some standard locations... " >&6; }
31452
31453	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31454	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31455	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31456	    fi
31457	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31458	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31459	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31460	    fi
31461
31462	    PREV_CXXCFLAGS="$CXXFLAGS"
31463	    PREV_LDFLAGS="$LDFLAGS"
31464	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31465	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31466	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31467/* end confdefs.h.  */
31468#include<ft2build.h>
31469	                    #include FT_FREETYPE_H
31470	                   int main() { return 0; }
31471
31472_ACEOF
31473if ac_fn_cxx_try_link "$LINENO"; then :
31474
31475	                      # Yes, the default cflags and libs did the trick.
31476	                      FREETYPE2_FOUND=yes
31477	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31478	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31479
31480else
31481
31482	                      FREETYPE2_FOUND=no
31483
31484fi
31485rm -f core conftest.err conftest.$ac_objext \
31486    conftest$ac_exeext conftest.$ac_ext
31487            CXXCFLAGS="$PREV_CXXFLAGS"
31488	    LDFLAGS="$PREV_LDFLAGS"
31489	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31490$as_echo "$FREETYPE2_FOUND" >&6; }
31491            USING_SYSTEM_FT_LIB=true
31492	fi
31493	if test "x$FREETYPE2_FOUND" = xno; then
31494
31495    # Print a helpful message on how to acquire the necessary build dependency.
31496    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31497    MISSING_DEPENDENCY=freetype2
31498    PKGHANDLER_COMMAND=
31499
31500    case $PKGHANDLER in
31501	apt-get)
31502                apt_help     $MISSING_DEPENDENCY ;;
31503    yum)
31504                yum_help     $MISSING_DEPENDENCY ;;
31505	port)
31506                port_help    $MISSING_DEPENDENCY ;;
31507	pkgutil)
31508                pkgutil_help $MISSING_DEPENDENCY ;;
31509	pkgadd)
31510                pkgadd_help  $MISSING_DEPENDENCY ;;
31511    * )
31512      break ;;
31513    esac
31514
31515    if test "x$PKGHANDLER_COMMAND" != x; then
31516        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31517    fi
31518
31519		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31520	fi
31521
31522        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31523            # AC_CHECK_LIB does not support use of cl.exe
31524            PREV_LDFLAGS="$LDFLAGS"
31525            LDFLAGS="$FREETYPE2_LIBS"
31526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31527$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31528if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31529  $as_echo_n "(cached) " >&6
31530else
31531  ac_check_lib_save_LIBS=$LIBS
31532LIBS="-lfreetype  $LIBS"
31533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31534/* end confdefs.h.  */
31535
31536/* Override any GCC internal prototype to avoid an error.
31537   Use char because int might match the return type of a GCC
31538   builtin and then its argument prototype would still apply.  */
31539#ifdef __cplusplus
31540extern "C"
31541#endif
31542char FT_Init_FreeType ();
31543int
31544main ()
31545{
31546return FT_Init_FreeType ();
31547  ;
31548  return 0;
31549}
31550_ACEOF
31551if ac_fn_cxx_try_link "$LINENO"; then :
31552  ac_cv_lib_freetype_FT_Init_FreeType=yes
31553else
31554  ac_cv_lib_freetype_FT_Init_FreeType=no
31555fi
31556rm -f core conftest.err conftest.$ac_objext \
31557    conftest$ac_exeext conftest.$ac_ext
31558LIBS=$ac_check_lib_save_LIBS
31559fi
31560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31561$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31562if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31563  FREETYPE2_FOUND=true
31564else
31565  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31566fi
31567
31568            LDFLAGS="$PREV_LDFLAGS"
31569        fi
31570fi
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580###############################################################################
31581#
31582# Check for alsa headers and libraries. Used on Linux/GNU systems.
31583#
31584
31585# Check whether --with-alsa was given.
31586if test "${with_alsa+set}" = set; then :
31587  withval=$with_alsa;
31588fi
31589
31590
31591# Check whether --with-alsa-include was given.
31592if test "${with_alsa_include+set}" = set; then :
31593  withval=$with_alsa_include;
31594fi
31595
31596
31597# Check whether --with-alsa-lib was given.
31598if test "${with_alsa_lib+set}" = set; then :
31599  withval=$with_alsa_lib;
31600fi
31601
31602
31603if test "x$ALSA_NOT_NEEDED" = xyes; then
31604	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31605		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31606$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31607	fi
31608	ALSA_CFLAGS=
31609	ALSA_LIBS=
31610else
31611	ALSA_FOUND=no
31612
31613	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31614	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31615	fi
31616
31617	if test "x${with_alsa}" != x; then
31618	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31619	    ALSA_CFLAGS="-I${with_alsa}/include"
31620	    ALSA_FOUND=yes
31621	fi
31622	if test "x${with_alsa_include}" != x; then
31623	    ALSA_CFLAGS="-I${with_alsa_include}"
31624	    ALSA_FOUND=yes
31625	fi
31626	if test "x${with_alsa_lib}" != x; then
31627	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31628	    ALSA_FOUND=yes
31629	fi
31630	if test "x$ALSA_FOUND" = xno; then
31631
31632
31633    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31634        # Source the builddeps file again, to make sure it uses the latest variables!
31635        . $builddepsfile
31636        # Look for a target and build machine specific resource!
31637        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31638        if test "x$resource" = x; then
31639            # Ok, lets instead look for a target specific resource
31640            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31641        fi
31642        if test "x$resource" = x; then
31643            # Ok, lets instead look for a build specific resource
31644            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31645        fi
31646        if test "x$resource" = x; then
31647            # Ok, lets instead look for a generic resource
31648            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31649            resource=${builddep_alsa}
31650        fi
31651        if test "x$resource" != x; then
31652            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31653$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31654	    # If the resource in the builddeps.conf file is an existing directory,
31655	    # for example /java/linux/cups
31656	    if test -d ${resource}; then
31657	       depdir=${resource}
31658	    else
31659
31660# alsa is for example mymodule
31661# $resource is for example libs/general/libmymod_1_2_3.zip
31662# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31663# $with_builddeps_dir is for example /localhome/builddeps
31664# depdir is the name of the variable into which we store the depdir, eg MYMOD
31665# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31666# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31667    filename=`basename $resource`
31668    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31669    filebase=${filename%%.*}
31670    extension=${filename#*.}
31671    installdir=$with_builddeps_dir/$filebase
31672    if test ! -f $installdir/$filename.unpacked; then
31673        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31674$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31675        if test ! -d $installdir; then
31676            mkdir -p $installdir
31677        fi
31678        if test ! -d $installdir; then
31679            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31680        fi
31681        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31682        touch $tmpfile
31683        if test ! -f $tmpfile; then
31684            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31685        fi
31686
31687    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31688    # $tmpfile is the local file name for the downloaded file.
31689    VALID_TOOL=no
31690    if test "x$BDEPS_FTP" = xwget; then
31691       VALID_TOOL=yes
31692       wget -O $tmpfile $with_builddeps_server/$resource
31693    fi
31694    if test "x$BDEPS_FTP" = xlftp; then
31695       VALID_TOOL=yes
31696       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31697    fi
31698    if test "x$BDEPS_FTP" = xftp; then
31699        VALID_TOOL=yes
31700        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31701        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31702        FTPUSERPWD=${FTPSERVER%%@*}
31703        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31704            FTPUSER=${userpwd%%:*}
31705            FTPPWD=${userpwd#*@}
31706            FTPSERVER=${FTPSERVER#*@}
31707        else
31708            FTPUSER=ftp
31709            FTPPWD=ftp
31710        fi
31711        # the "pass" command does not work on some
31712        # ftp clients (read ftp.exe) but if it works,
31713        # passive mode is better!
31714        (\
31715            echo "user $FTPUSER $FTPPWD"        ;\
31716            echo "pass"                         ;\
31717            echo "bin"                          ;\
31718            echo "get $FTPPATH $tmpfile"              ;\
31719        ) | ftp -in $FTPSERVER
31720    fi
31721    if test "x$VALID_TOOL" != xyes; then
31722       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31723    fi
31724
31725        mv $tmpfile $installdir/$filename
31726        if test ! -s $installdir/$filename; then
31727            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31728        fi
31729        case "$extension" in
31730            zip)  echo "Unzipping $installdir/$filename..."
31731               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31732            ;;
31733            tar.gz) echo "Untaring $installdir/$filename..."
31734               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31735            ;;
31736            tgz) echo "Untaring $installdir/$filename..."
31737               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31738            ;;
31739            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31740            ;;
31741        esac
31742    fi
31743    if test -f $installdir/$filename.unpacked; then
31744        depdir=$installdir
31745    fi
31746
31747	    fi
31748            # Source the builddeps file again, because in the previous command, the depdir
31749            # was updated to point at the current build dependency install directory.
31750            . $builddepsfile
31751            # Now extract variables from the builddeps.conf files.
31752            theroot=${builddep_alsa_ROOT}
31753            thecflags=${builddep_alsa_CFLAGS}
31754            thelibs=${builddep_alsa_LIBS}
31755            if test "x$depdir" = x; then
31756                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31757            fi
31758            ALSA=$depdir
31759            if test "x$theroot" != x; then
31760               ALSA="$theroot"
31761            fi
31762            if test "x$thecflags" != x; then
31763               ALSA_CFLAGS="$thecflags"
31764            fi
31765            if test "x$thelibs" != x; then
31766               ALSA_LIBS="$thelibs"
31767            fi
31768            ALSA_FOUND=yes
31769            else ALSA_FOUND=no
31770
31771        fi
31772        else ALSA_FOUND=no
31773
31774    fi
31775
31776	fi
31777	if test "x$ALSA_FOUND" = xno; then
31778
31779pkg_failed=no
31780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31781$as_echo_n "checking for ALSA... " >&6; }
31782
31783if test -n "$ALSA_CFLAGS"; then
31784    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31785 elif test -n "$PKG_CONFIG"; then
31786    if test -n "$PKG_CONFIG" && \
31787    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31788  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31789  ac_status=$?
31790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31791  test $ac_status = 0; }; then
31792  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31793else
31794  pkg_failed=yes
31795fi
31796 else
31797    pkg_failed=untried
31798fi
31799if test -n "$ALSA_LIBS"; then
31800    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31801 elif test -n "$PKG_CONFIG"; then
31802    if test -n "$PKG_CONFIG" && \
31803    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31804  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31805  ac_status=$?
31806  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31807  test $ac_status = 0; }; then
31808  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31809else
31810  pkg_failed=yes
31811fi
31812 else
31813    pkg_failed=untried
31814fi
31815
31816
31817
31818if test $pkg_failed = yes; then
31819
31820if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31821        _pkg_short_errors_supported=yes
31822else
31823        _pkg_short_errors_supported=no
31824fi
31825        if test $_pkg_short_errors_supported = yes; then
31826	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31827        else
31828	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31829        fi
31830	# Put the nasty error message in config.log where it belongs
31831	echo "$ALSA_PKG_ERRORS" >&5
31832
31833	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31834$as_echo "no" >&6; }
31835                ALSA_FOUND=no
31836elif test $pkg_failed = untried; then
31837	ALSA_FOUND=no
31838else
31839	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31840	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31842$as_echo "yes" >&6; }
31843	ALSA_FOUND=yes
31844fi
31845	fi
31846	if test "x$ALSA_FOUND" = xno; then
31847	    for ac_header in alsa/asoundlib.h
31848do :
31849  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31850if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31851  cat >>confdefs.h <<_ACEOF
31852#define HAVE_ALSA_ASOUNDLIB_H 1
31853_ACEOF
31854 ALSA_FOUND=yes
31855	                      ALSA_CFLAGS=-Iignoreme
31856	                      ALSA_LIBS=-lasound
31857	                      DEFAULT_ALSA=yes
31858else
31859  ALSA_FOUND=no
31860fi
31861
31862done
31863
31864	fi
31865	if test "x$ALSA_FOUND" = xno; then
31866
31867    # Print a helpful message on how to acquire the necessary build dependency.
31868    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31869    MISSING_DEPENDENCY=alsa
31870    PKGHANDLER_COMMAND=
31871
31872    case $PKGHANDLER in
31873	apt-get)
31874                apt_help     $MISSING_DEPENDENCY ;;
31875    yum)
31876                yum_help     $MISSING_DEPENDENCY ;;
31877	port)
31878                port_help    $MISSING_DEPENDENCY ;;
31879	pkgutil)
31880                pkgutil_help $MISSING_DEPENDENCY ;;
31881	pkgadd)
31882                pkgadd_help  $MISSING_DEPENDENCY ;;
31883    * )
31884      break ;;
31885    esac
31886
31887    if test "x$PKGHANDLER_COMMAND" != x; then
31888        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31889    fi
31890
31891	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31892	fi
31893fi
31894
31895
31896
31897
31898
31899
31900
31901###############################################################################
31902#
31903# Check for the jpeg library
31904#
31905
31906USE_EXTERNAL_LIBJPEG=true
31907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31908$as_echo_n "checking for main in -ljpeg... " >&6; }
31909if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31910  $as_echo_n "(cached) " >&6
31911else
31912  ac_check_lib_save_LIBS=$LIBS
31913LIBS="-ljpeg  $LIBS"
31914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31915/* end confdefs.h.  */
31916
31917
31918int
31919main ()
31920{
31921return main ();
31922  ;
31923  return 0;
31924}
31925_ACEOF
31926if ac_fn_cxx_try_link "$LINENO"; then :
31927  ac_cv_lib_jpeg_main=yes
31928else
31929  ac_cv_lib_jpeg_main=no
31930fi
31931rm -f core conftest.err conftest.$ac_objext \
31932    conftest$ac_exeext conftest.$ac_ext
31933LIBS=$ac_check_lib_save_LIBS
31934fi
31935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31936$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31937if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31938  cat >>confdefs.h <<_ACEOF
31939#define HAVE_LIBJPEG 1
31940_ACEOF
31941
31942  LIBS="-ljpeg $LIBS"
31943
31944else
31945   USE_EXTERNAL_LIBJPEG=false
31946               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31947$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31948
31949fi
31950
31951
31952
31953###############################################################################
31954#
31955# Check for the gif library
31956#
31957
31958
31959# Check whether --with-giflib was given.
31960if test "${with_giflib+set}" = set; then :
31961  withval=$with_giflib;
31962fi
31963
31964
31965
31966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31967$as_echo_n "checking for which giflib to use... " >&6; }
31968
31969# default is bundled
31970DEFAULT_GIFLIB=bundled
31971
31972#
31973# if user didn't specify, use DEFAULT_GIFLIB
31974#
31975if test "x${with_giflib}" = "x"; then
31976    with_giflib=${DEFAULT_GIFLIB}
31977fi
31978
31979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31980$as_echo "${with_giflib}" >&6; }
31981
31982if test "x${with_giflib}" = "xbundled"; then
31983    USE_EXTERNAL_LIBGIF=false
31984elif test "x${with_giflib}" = "xsystem"; then
31985    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31986if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31987
31988else
31989   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31990fi
31991
31992
31993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31994$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31995if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31996  $as_echo_n "(cached) " >&6
31997else
31998  ac_check_lib_save_LIBS=$LIBS
31999LIBS="-lgif  $LIBS"
32000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32001/* end confdefs.h.  */
32002
32003/* Override any GCC internal prototype to avoid an error.
32004   Use char because int might match the return type of a GCC
32005   builtin and then its argument prototype would still apply.  */
32006#ifdef __cplusplus
32007extern "C"
32008#endif
32009char DGifGetCode ();
32010int
32011main ()
32012{
32013return DGifGetCode ();
32014  ;
32015  return 0;
32016}
32017_ACEOF
32018if ac_fn_cxx_try_link "$LINENO"; then :
32019  ac_cv_lib_gif_DGifGetCode=yes
32020else
32021  ac_cv_lib_gif_DGifGetCode=no
32022fi
32023rm -f core conftest.err conftest.$ac_objext \
32024    conftest$ac_exeext conftest.$ac_ext
32025LIBS=$ac_check_lib_save_LIBS
32026fi
32027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32028$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32029if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32030  cat >>confdefs.h <<_ACEOF
32031#define HAVE_LIBGIF 1
32032_ACEOF
32033
32034  LIBS="-lgif $LIBS"
32035
32036else
32037   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32038fi
32039
32040
32041    USE_EXTERNAL_LIBGIF=true
32042else
32043    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32044fi
32045
32046
32047###############################################################################
32048#
32049# Check for the zlib library
32050#
32051
32052
32053# Check whether --with-zlib was given.
32054if test "${with_zlib+set}" = set; then :
32055  withval=$with_zlib;
32056fi
32057
32058
32059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32060$as_echo_n "checking for compress in -lz... " >&6; }
32061if test "${ac_cv_lib_z_compress+set}" = set; then :
32062  $as_echo_n "(cached) " >&6
32063else
32064  ac_check_lib_save_LIBS=$LIBS
32065LIBS="-lz  $LIBS"
32066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32067/* end confdefs.h.  */
32068
32069/* Override any GCC internal prototype to avoid an error.
32070   Use char because int might match the return type of a GCC
32071   builtin and then its argument prototype would still apply.  */
32072#ifdef __cplusplus
32073extern "C"
32074#endif
32075char compress ();
32076int
32077main ()
32078{
32079return compress ();
32080  ;
32081  return 0;
32082}
32083_ACEOF
32084if ac_fn_cxx_try_link "$LINENO"; then :
32085  ac_cv_lib_z_compress=yes
32086else
32087  ac_cv_lib_z_compress=no
32088fi
32089rm -f core conftest.err conftest.$ac_objext \
32090    conftest$ac_exeext conftest.$ac_ext
32091LIBS=$ac_check_lib_save_LIBS
32092fi
32093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32094$as_echo "$ac_cv_lib_z_compress" >&6; }
32095if test "x$ac_cv_lib_z_compress" = x""yes; then :
32096   ZLIB_FOUND=yes
32097else
32098   ZLIB_FOUND=no
32099fi
32100
32101
32102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32103$as_echo_n "checking for which zlib to use... " >&6; }
32104
32105DEFAULT_ZLIB=bundled
32106if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32107#
32108# On macosx default is system...on others default is
32109#
32110    DEFAULT_ZLIB=system
32111fi
32112
32113if test "x${ZLIB_FOUND}" != "xyes"; then
32114#
32115# If we don't find any system...set default to bundled
32116#
32117    DEFAULT_ZLIB=bundled
32118fi
32119
32120#
32121# If user didn't specify, use DEFAULT_ZLIB
32122#
32123if test "x${with_zlib}" = "x"; then
32124    with_zlib=${DEFAULT_ZLIB}
32125fi
32126
32127if test "x${with_zlib}" = "xbundled"; then
32128    USE_EXTERNAL_LIBZ=false
32129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32130$as_echo "bundled" >&6; }
32131elif test "x${with_zlib}" = "xsystem"; then
32132    if test "x${ZLIB_FOUND}" = "xyes"; then
32133        USE_EXTERNAL_LIBZ=true
32134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32135$as_echo "system" >&6; }
32136    else
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32138$as_echo "system not found" >&6; }
32139        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32140    fi
32141else
32142    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32143fi
32144
32145
32146
32147###############################################################################
32148LIBZIP_CAN_USE_MMAP=true
32149
32150
32151
32152###############################################################################
32153#
32154# Check if altzone exists in time.h
32155#
32156
32157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32158/* end confdefs.h.  */
32159#include <time.h>
32160int
32161main ()
32162{
32163return (int)altzone;
32164  ;
32165  return 0;
32166}
32167_ACEOF
32168if ac_fn_cxx_try_link "$LINENO"; then :
32169  has_altzone=yes
32170else
32171  has_altzone=no
32172fi
32173rm -f core conftest.err conftest.$ac_objext \
32174    conftest$ac_exeext conftest.$ac_ext
32175if test "x$has_altzone" = xyes; then
32176
32177$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32178
32179fi
32180
32181###############################################################################
32182#
32183# Check the maths library
32184#
32185
32186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32187$as_echo_n "checking for cos in -lm... " >&6; }
32188if test "${ac_cv_lib_m_cos+set}" = set; then :
32189  $as_echo_n "(cached) " >&6
32190else
32191  ac_check_lib_save_LIBS=$LIBS
32192LIBS="-lm  $LIBS"
32193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32194/* end confdefs.h.  */
32195
32196/* Override any GCC internal prototype to avoid an error.
32197   Use char because int might match the return type of a GCC
32198   builtin and then its argument prototype would still apply.  */
32199#ifdef __cplusplus
32200extern "C"
32201#endif
32202char cos ();
32203int
32204main ()
32205{
32206return cos ();
32207  ;
32208  return 0;
32209}
32210_ACEOF
32211if ac_fn_cxx_try_link "$LINENO"; then :
32212  ac_cv_lib_m_cos=yes
32213else
32214  ac_cv_lib_m_cos=no
32215fi
32216rm -f core conftest.err conftest.$ac_objext \
32217    conftest$ac_exeext conftest.$ac_ext
32218LIBS=$ac_check_lib_save_LIBS
32219fi
32220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32221$as_echo "$ac_cv_lib_m_cos" >&6; }
32222if test "x$ac_cv_lib_m_cos" = x""yes; then :
32223  cat >>confdefs.h <<_ACEOF
32224#define HAVE_LIBM 1
32225_ACEOF
32226
32227  LIBS="-lm $LIBS"
32228
32229else
32230
32231                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32232$as_echo "$as_me: Maths library was not found" >&6;}
32233
32234fi
32235
32236
32237
32238###############################################################################
32239#
32240# Check for libdl.so
32241
32242save_LIBS="$LIBS"
32243LIBS=""
32244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32245$as_echo_n "checking for dlopen in -ldl... " >&6; }
32246if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32247  $as_echo_n "(cached) " >&6
32248else
32249  ac_check_lib_save_LIBS=$LIBS
32250LIBS="-ldl  $LIBS"
32251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32252/* end confdefs.h.  */
32253
32254/* Override any GCC internal prototype to avoid an error.
32255   Use char because int might match the return type of a GCC
32256   builtin and then its argument prototype would still apply.  */
32257#ifdef __cplusplus
32258extern "C"
32259#endif
32260char dlopen ();
32261int
32262main ()
32263{
32264return dlopen ();
32265  ;
32266  return 0;
32267}
32268_ACEOF
32269if ac_fn_cxx_try_link "$LINENO"; then :
32270  ac_cv_lib_dl_dlopen=yes
32271else
32272  ac_cv_lib_dl_dlopen=no
32273fi
32274rm -f core conftest.err conftest.$ac_objext \
32275    conftest$ac_exeext conftest.$ac_ext
32276LIBS=$ac_check_lib_save_LIBS
32277fi
32278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32279$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32280if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32281  cat >>confdefs.h <<_ACEOF
32282#define HAVE_LIBDL 1
32283_ACEOF
32284
32285  LIBS="-ldl $LIBS"
32286
32287fi
32288
32289LIBDL="$LIBS"
32290
32291LIBS="$save_LIBS"
32292
32293
32294
32295###############################################################################
32296#
32297# statically link libstdc++ before C++ ABI is stablized on Linux unless
32298# dynamic build is configured on command line.
32299#
32300
32301# Check whether --with-stdc++lib was given.
32302if test "${with_stdc__lib+set}" = set; then :
32303  withval=$with_stdc__lib;
32304    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32305        && test "x$with_stdc__lib" != xdefault; then
32306      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32307    fi
32308
32309else
32310  with_stdc__lib=default
32311
32312fi
32313
32314
32315if test "x$OPENJDK_TARGET_OS" = xlinux; then
32316    # Test if -lstdc++ works.
32317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32318$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32319    ac_ext=cpp
32320ac_cpp='$CXXCPP $CPPFLAGS'
32321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32324
32325    OLD_CXXFLAGS="$CXXFLAGS"
32326    CXXFLAGS="$CXXFLAGS -lstdc++"
32327    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32328/* end confdefs.h.  */
32329
32330int
32331main ()
32332{
32333return 0;
32334  ;
32335  return 0;
32336}
32337_ACEOF
32338if ac_fn_cxx_try_link "$LINENO"; then :
32339  has_dynamic_libstdcxx=yes
32340else
32341  has_dynamic_libstdcxx=no
32342fi
32343rm -f core conftest.err conftest.$ac_objext \
32344    conftest$ac_exeext conftest.$ac_ext
32345    CXXFLAGS="$OLD_CXXFLAGS"
32346    ac_ext=cpp
32347ac_cpp='$CXXCPP $CPPFLAGS'
32348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32351
32352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32353$as_echo "$has_dynamic_libstdcxx" >&6; }
32354
32355    # Test if stdc++ can be linked statically.
32356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32357$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32358    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32359    ac_ext=cpp
32360ac_cpp='$CXXCPP $CPPFLAGS'
32361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32364
32365    OLD_LIBS="$LIBS"
32366    OLD_CXX="$CXX"
32367    LIBS="$STATIC_STDCXX_FLAGS"
32368    CXX="$CC"
32369    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32370/* end confdefs.h.  */
32371
32372int
32373main ()
32374{
32375return 0;
32376  ;
32377  return 0;
32378}
32379_ACEOF
32380if ac_fn_cxx_try_link "$LINENO"; then :
32381  has_static_libstdcxx=yes
32382else
32383  has_static_libstdcxx=no
32384fi
32385rm -f core conftest.err conftest.$ac_objext \
32386    conftest$ac_exeext conftest.$ac_ext
32387    LIBS="$OLD_LIBS"
32388    CXX="$OLD_CXX"
32389    ac_ext=cpp
32390ac_cpp='$CXXCPP $CPPFLAGS'
32391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32394
32395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32396$as_echo "$has_static_libstdcxx" >&6; }
32397
32398    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32399        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32400    fi
32401
32402    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32403        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32404    fi
32405
32406    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32407        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32408    fi
32409
32410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32411$as_echo_n "checking how to link with libstdc++... " >&6; }
32412    # If dynamic was requested, it's available since it would fail above otherwise.
32413    # If dynamic wasn't requested, go with static unless it isn't available.
32414    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32415        LIBCXX="$LIBCXX -lstdc++"
32416        LDCXX="$CXX"
32417        STATIC_CXX_SETTING="STATIC_CXX=false"
32418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32419$as_echo "dynamic" >&6; }
32420    else
32421        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32422        LDCXX="$CC"
32423        STATIC_CXX_SETTING="STATIC_CXX=true"
32424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32425$as_echo "static" >&6; }
32426    fi
32427fi
32428
32429
32430if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32431    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32432
32433pkg_failed=no
32434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32435$as_echo_n "checking for LIBFFI... " >&6; }
32436
32437if test -n "$LIBFFI_CFLAGS"; then
32438    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32439 elif test -n "$PKG_CONFIG"; then
32440    if test -n "$PKG_CONFIG" && \
32441    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32442  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32443  ac_status=$?
32444  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32445  test $ac_status = 0; }; then
32446  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32447else
32448  pkg_failed=yes
32449fi
32450 else
32451    pkg_failed=untried
32452fi
32453if test -n "$LIBFFI_LIBS"; then
32454    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32455 elif test -n "$PKG_CONFIG"; then
32456    if test -n "$PKG_CONFIG" && \
32457    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32458  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32459  ac_status=$?
32460  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32461  test $ac_status = 0; }; then
32462  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32463else
32464  pkg_failed=yes
32465fi
32466 else
32467    pkg_failed=untried
32468fi
32469
32470
32471
32472if test $pkg_failed = yes; then
32473
32474if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32475        _pkg_short_errors_supported=yes
32476else
32477        _pkg_short_errors_supported=no
32478fi
32479        if test $_pkg_short_errors_supported = yes; then
32480	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32481        else
32482	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32483        fi
32484	# Put the nasty error message in config.log where it belongs
32485	echo "$LIBFFI_PKG_ERRORS" >&5
32486
32487	as_fn_error $? "Package requirements (libffi) were not met:
32488
32489$LIBFFI_PKG_ERRORS
32490
32491Consider adjusting the PKG_CONFIG_PATH environment variable if you
32492installed software in a non-standard prefix.
32493
32494Alternatively, you may set the environment variables LIBFFI_CFLAGS
32495and LIBFFI_LIBS to avoid the need to call pkg-config.
32496See the pkg-config man page for more details.
32497" "$LINENO" 5
32498elif test $pkg_failed = untried; then
32499	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32501as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32502is in your PATH or set the PKG_CONFIG environment variable to the full
32503path to pkg-config.
32504
32505Alternatively, you may set the environment variables LIBFFI_CFLAGS
32506and LIBFFI_LIBS to avoid the need to call pkg-config.
32507See the pkg-config man page for more details.
32508
32509To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32510See \`config.log' for more details" "$LINENO" 5 ; }
32511else
32512	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32513	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32515$as_echo "yes" >&6; }
32516	:
32517fi
32518
32519fi
32520
32521if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32522    # Extract the first word of "llvm-config", so it can be a program name with args.
32523set dummy llvm-config; ac_word=$2
32524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32525$as_echo_n "checking for $ac_word... " >&6; }
32526if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32527  $as_echo_n "(cached) " >&6
32528else
32529  if test -n "$LLVM_CONFIG"; then
32530  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32531else
32532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32533for as_dir in $PATH
32534do
32535  IFS=$as_save_IFS
32536  test -z "$as_dir" && as_dir=.
32537    for ac_exec_ext in '' $ac_executable_extensions; do
32538  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32539    ac_cv_prog_LLVM_CONFIG="llvm-config"
32540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32541    break 2
32542  fi
32543done
32544  done
32545IFS=$as_save_IFS
32546
32547fi
32548fi
32549LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32550if test -n "$LLVM_CONFIG"; then
32551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32552$as_echo "$LLVM_CONFIG" >&6; }
32553else
32554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32555$as_echo "no" >&6; }
32556fi
32557
32558
32559
32560    if test "x$LLVM_CONFIG" != xllvm-config; then
32561        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32562    fi
32563
32564    llvm_components="jit mcjit engine nativecodegen native"
32565    unset LLVM_CFLAGS
32566    for flag in $("$LLVM_CONFIG" --cxxflags); do
32567      if echo "${flag}" | grep -q '^-[ID]'; then
32568        if test "${flag}" != "-D_DEBUG" ; then
32569          if test "${LLVM_CFLAGS}" != "" ; then
32570            LLVM_CFLAGS="${LLVM_CFLAGS} "
32571          fi
32572          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32573        fi
32574      fi
32575    done
32576    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32577    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32578
32579    unset LLVM_LDFLAGS
32580    for flag in $("${LLVM_CONFIG}" --ldflags); do
32581      if echo "${flag}" | grep -q '^-L'; then
32582        if test "${LLVM_LDFLAGS}" != ""; then
32583          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32584        fi
32585        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32586      fi
32587    done
32588
32589    unset LLVM_LIBS
32590    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32591      if echo "${flag}" | grep -q '^-l'; then
32592        if test "${LLVM_LIBS}" != ""; then
32593          LLVM_LIBS="${LLVM_LIBS} "
32594        fi
32595        LLVM_LIBS="${LLVM_LIBS}${flag}"
32596      fi
32597    done
32598
32599
32600
32601
32602fi
32603
32604# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32605if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32606    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32607fi
32608
32609# TODO better (platform agnostic) test
32610if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32611    LIBCXX="-lstdc++"
32612fi
32613
32614
32615
32616
32617
32618# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32619
32620# When using cygwin or msys, we need a wrapper binary that renames
32621# /cygdrive/c/ arguments into c:/ arguments and peeks into
32622# @files and rewrites these too! This wrapper binary is
32623# called fixpath.
32624FIXPATH=
32625if test "x$OPENJDK_BUILD_OS" = xwindows; then
32626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32627$as_echo_n "checking if fixpath can be created... " >&6; }
32628    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32629    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32630    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32631      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32632      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32633      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32634      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32635    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32636      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32637      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32638
32639      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32640      # @ was chosen as separator to minimize risk of other tools messing around with it
32641      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32642      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32643
32644      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32645    fi
32646    rm -f $OUTPUT_ROOT/fixpath*
32647    cd $OUTPUT_ROOT
32648    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32649    cd $CURDIR
32650
32651    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32653$as_echo "no" >&6; }
32654        cat $OUTPUT_ROOT/fixpath1.log
32655        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32656    fi
32657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32658$as_echo "yes" >&6; }
32659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32660$as_echo_n "checking if fixpath.exe works... " >&6; }
32661    cd $OUTPUT_ROOT
32662    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32663    cd $CURDIR
32664    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32666$as_echo "no" >&6; }
32667        cat $OUTPUT_ROOT/fixpath2.log
32668        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32669    fi
32670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32671$as_echo "yes" >&6; }
32672    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32673fi
32674
32675
32676
32677
32678###############################################################################
32679#
32680# We need to do some final tweaking, when everything else is done.
32681#
32682###############################################################################
32683
32684
32685HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32686
32687
32688# The name of the Service Agent jar.
32689SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32690if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32691  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32692fi
32693
32694
32695
32696
32697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32698$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32699
32700if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32701    ENABLE_INTREE_EC=yes
32702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32703$as_echo "yes" >&6; }
32704else
32705    ENABLE_INTREE_EC=no
32706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32707$as_echo "no" >&6; }
32708fi
32709
32710
32711
32712
32713###############################################################################
32714#
32715# Configure parts of the build that only affect the build performance,
32716# not the result.
32717#
32718###############################################################################
32719
32720
32721  # How many cores do we have on this build system?
32722
32723# Check whether --with-num-cores was given.
32724if test "${with_num_cores+set}" = set; then :
32725  withval=$with_num_cores;
32726fi
32727
32728  if test "x$with_num_cores" = x; then
32729    # The number of cores were not specified, try to probe them.
32730
32731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32732$as_echo_n "checking for number of cores... " >&6; }
32733    NUM_CORES=1
32734    FOUND_CORES=no
32735
32736    if test -f /proc/cpuinfo; then
32737        # Looks like a Linux (or cygwin) system
32738        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32739        FOUND_CORES=yes
32740    elif test -x /usr/sbin/psrinfo; then
32741        # Looks like a Solaris system
32742        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32743        FOUND_CORES=yes
32744    elif test -x /usr/sbin/system_profiler; then
32745        # Looks like a MacOSX system
32746        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32747        FOUND_CORES=yes
32748    elif test -n "$NUMBER_OF_PROCESSORS"; then
32749        # On windows, look in the env
32750        NUM_CORES=$NUMBER_OF_PROCESSORS
32751        FOUND_CORES=yes
32752    fi
32753
32754    if test "x$FOUND_CORES" = xyes; then
32755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32756$as_echo "$NUM_CORES" >&6; }
32757    else
32758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32759$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32761$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32762    fi
32763
32764
32765  else
32766    NUM_CORES=$with_num_cores
32767  fi
32768
32769
32770
32771  # How much memory do we have on this build system?
32772
32773# Check whether --with-memory-size was given.
32774if test "${with_memory_size+set}" = set; then :
32775  withval=$with_memory_size;
32776fi
32777
32778  if test "x$with_memory_size" = x; then
32779    # The memory size was not specified, try to probe it.
32780
32781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32782$as_echo_n "checking for memory size... " >&6; }
32783    # Default to 1024 MB
32784    MEMORY_SIZE=1024
32785    FOUND_MEM=no
32786
32787    if test -f /proc/meminfo; then
32788        # Looks like a Linux (or cygwin) system
32789        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32790        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32791        FOUND_MEM=yes
32792    elif test -x /usr/sbin/prtconf; then
32793        # Looks like a Solaris system
32794        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32795        FOUND_MEM=yes
32796    elif test -x /usr/sbin/system_profiler; then
32797        # Looks like a MacOSX system
32798        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32799        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32800        FOUND_MEM=yes
32801    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32802        # Windows, but without cygwin
32803        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32804        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32805        FOUND_MEM=yes
32806    fi
32807
32808    if test "x$FOUND_MEM" = xyes; then
32809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32810$as_echo "$MEMORY_SIZE MB" >&6; }
32811    else
32812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32813$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32815$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32816    fi
32817
32818  else
32819    MEMORY_SIZE=$with_memory_size
32820  fi
32821
32822
32823
32824  # Provide a decent default number of parallel jobs for make depending on
32825  # number of cores, amount of memory and machine architecture.
32826
32827# Check whether --with-jobs was given.
32828if test "${with_jobs+set}" = set; then :
32829  withval=$with_jobs;
32830fi
32831
32832  if test "x$with_jobs" = x; then
32833    # Number of jobs was not specified, calculate.
32834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32835$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32836    # Approximate memory in GB, rounding up a bit.
32837    memory_gb=`expr $MEMORY_SIZE / 1100`
32838    # Pick the lowest of memory in gb and number of cores.
32839    if test "$memory_gb" -lt "$NUM_CORES"; then
32840      JOBS="$memory_gb"
32841    else
32842      JOBS="$NUM_CORES"
32843      # On bigger machines, leave some room for other processes to run
32844      if test "$JOBS" -gt "4"; then
32845        JOBS=`expr $JOBS '*' 90 / 100`
32846      fi
32847    fi
32848    # Cap number of jobs to 16
32849    if test "$JOBS" -gt "16"; then
32850      JOBS=16
32851    fi
32852    if test "$JOBS" -eq "0"; then
32853      JOBS=1
32854    fi
32855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32856$as_echo "$JOBS" >&6; }
32857  else
32858    JOBS=$with_jobs
32859  fi
32860
32861
32862
32863# Setup smart javac (after cores and memory have been setup)
32864
32865
32866# Check whether --with-sjavac-server-java was given.
32867if test "${with_sjavac_server_java+set}" = set; then :
32868  withval=$with_sjavac_server_java;
32869fi
32870
32871
32872if test "x$with_sjavac_server_java" != x; then
32873    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32874    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32875    if test "x$FOUND_VERSION" = x; then
32876        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32877    fi
32878else
32879    SJAVAC_SERVER_JAVA=""
32880    # Hotspot specific options.
32881
32882    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32883    $ECHO "Command: $JAVA -verbosegc -version" >&5
32884    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32885    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32886    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32887    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32888        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32889	JVM_ARG_OK=true
32890    else
32891	$ECHO "Arg failed:" >&5
32892	$ECHO "$OUTPUT" >&5
32893	JVM_ARG_OK=false
32894    fi
32895
32896    # JRockit specific options.
32897
32898    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32899    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32900    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32901    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32902    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32903    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32904        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32905	JVM_ARG_OK=true
32906    else
32907	$ECHO "Arg failed:" >&5
32908	$ECHO "$OUTPUT" >&5
32909	JVM_ARG_OK=false
32910    fi
32911
32912    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32913fi
32914
32915
32916if test "$MEMORY_SIZE" -gt "2500"; then
32917
32918    $ECHO "Check if jvm arg is ok: -d64" >&5
32919    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32920    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32921    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32922    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32923    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32924        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32925	JVM_ARG_OK=true
32926    else
32927	$ECHO "Arg failed:" >&5
32928	$ECHO "$OUTPUT" >&5
32929	JVM_ARG_OK=false
32930    fi
32931
32932    if test "$JVM_ARG_OK" = true; then
32933        JVM_64BIT=true
32934	JVM_ARG_OK=false
32935    fi
32936    fi
32937
32938if test "$JVM_64BIT" = true; then
32939    if test "$MEMORY_SIZE" -gt "17000"; then
32940
32941    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32942    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32943    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32944    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32945    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32946    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32947        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32948	JVM_ARG_OK=true
32949    else
32950	$ECHO "Arg failed:" >&5
32951	$ECHO "$OUTPUT" >&5
32952	JVM_ARG_OK=false
32953    fi
32954
32955    fi
32956    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32957
32958    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32959    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32960    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32961    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32962    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32963    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32964        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32965	JVM_ARG_OK=true
32966    else
32967	$ECHO "Arg failed:" >&5
32968	$ECHO "$OUTPUT" >&5
32969	JVM_ARG_OK=false
32970    fi
32971
32972    fi
32973    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32974
32975    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32976    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32977    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32978    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32979    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32980    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32981        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32982	JVM_ARG_OK=true
32983    else
32984	$ECHO "Arg failed:" >&5
32985	$ECHO "$OUTPUT" >&5
32986	JVM_ARG_OK=false
32987    fi
32988
32989    fi
32990    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32991
32992    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32993    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32994    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32995    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32996    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32997    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32998        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32999	JVM_ARG_OK=true
33000    else
33001	$ECHO "Arg failed:" >&5
33002	$ECHO "$OUTPUT" >&5
33003	JVM_ARG_OK=false
33004    fi
33005
33006    fi
33007fi
33008if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33009
33010    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33011    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33012    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33013    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33014    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33015    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33016        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33017	JVM_ARG_OK=true
33018    else
33019	$ECHO "Arg failed:" >&5
33020	$ECHO "$OUTPUT" >&5
33021	JVM_ARG_OK=false
33022    fi
33023
33024fi
33025if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33026
33027    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33028    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33029    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33030    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33031    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33032    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33033        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33034	JVM_ARG_OK=true
33035    else
33036	$ECHO "Arg failed:" >&5
33037	$ECHO "$OUTPUT" >&5
33038	JVM_ARG_OK=false
33039    fi
33040
33041fi
33042if test "$JVM_ARG_OK" = false; then
33043
33044    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33045    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33046    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33047    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33048    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33049    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33050        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33051	JVM_ARG_OK=true
33052    else
33053	$ECHO "Arg failed:" >&5
33054	$ECHO "$OUTPUT" >&5
33055	JVM_ARG_OK=false
33056    fi
33057
33058fi
33059
33060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33061$as_echo_n "checking whether to use sjavac... " >&6; }
33062# Check whether --enable-sjavac was given.
33063if test "${enable_sjavac+set}" = set; then :
33064  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33065else
33066  ENABLE_SJAVAC='no'
33067fi
33068
33069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33070$as_echo "$ENABLE_SJAVAC" >&6; }
33071
33072
33073if test "x$ENABLE_SJAVAC" = xyes; then
33074    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33075else
33076    SJAVAC_SERVER_DIR=
33077fi
33078
33079
33080
33081
33082# Can the C/C++ compiler use precompiled headers?
33083
33084
33085###############################################################################
33086#
33087# Can the C/C++ compiler use precompiled headers?
33088#
33089# Check whether --enable-precompiled-headers was given.
33090if test "${enable_precompiled_headers+set}" = set; then :
33091  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33092else
33093  ENABLE_PRECOMPH=yes
33094fi
33095
33096
33097USE_PRECOMPILED_HEADER=1
33098if test "x$ENABLE_PRECOMPH" = xno; then
33099    USE_PRECOMPILED_HEADER=0
33100fi
33101
33102if test "x$ENABLE_PRECOMPH" = xyes; then
33103    # Check that the compiler actually supports precomp headers.
33104    if test "x$GCC" = xyes; then
33105         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33106$as_echo_n "checking that precompiled headers work... " >&6; }
33107         echo "int alfa();" > conftest.h
33108         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33109         if test ! -f conftest.hpp.gch; then
33110             USE_PRECOMPILED_HEADER=0
33111             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33112$as_echo "no" >&6; }
33113         else
33114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33115$as_echo "yes" >&6; }
33116         fi
33117         rm -f conftest.h conftest.hpp.gch
33118    fi
33119fi
33120
33121
33122
33123
33124# Setup use of ccache, if available
33125
33126    # Check whether --enable-ccache was given.
33127if test "${enable_ccache+set}" = set; then :
33128  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33129else
33130  ENABLE_CCACHE=yes
33131fi
33132
33133    if test "x$ENABLE_CCACHE" = xyes; then
33134        # Extract the first word of "ccache", so it can be a program name with args.
33135set dummy ccache; ac_word=$2
33136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33137$as_echo_n "checking for $ac_word... " >&6; }
33138if test "${ac_cv_path_CCACHE+set}" = set; then :
33139  $as_echo_n "(cached) " >&6
33140else
33141  case $CCACHE in
33142  [\\/]* | ?:[\\/]*)
33143  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33144  ;;
33145  *)
33146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33147for as_dir in $PATH
33148do
33149  IFS=$as_save_IFS
33150  test -z "$as_dir" && as_dir=.
33151    for ac_exec_ext in '' $ac_executable_extensions; do
33152  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33153    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33155    break 2
33156  fi
33157done
33158  done
33159IFS=$as_save_IFS
33160
33161  ;;
33162esac
33163fi
33164CCACHE=$ac_cv_path_CCACHE
33165if test -n "$CCACHE"; then
33166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33167$as_echo "$CCACHE" >&6; }
33168else
33169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33170$as_echo "no" >&6; }
33171fi
33172
33173
33174    else
33175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33176$as_echo_n "checking for ccache... " >&6; }
33177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33178$as_echo "explicitly disabled" >&6; }
33179        CCACHE=
33180    fi
33181
33182
33183
33184# Check whether --with-ccache-dir was given.
33185if test "${with_ccache_dir+set}" = set; then :
33186  withval=$with_ccache_dir;
33187fi
33188
33189
33190    if test "x$with_ccache_dir" != x; then
33191        # When using a non home ccache directory, assume the use is to share ccache files
33192        # with other users. Thus change the umask.
33193        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33194    fi
33195    CCACHE_FOUND=""
33196    if test "x$CCACHE" != x; then
33197
33198    if test "x$CCACHE" != x; then
33199        CCACHE_FOUND="true"
33200        # Only use ccache if it is 3.1.4 or later, which supports
33201        # precompiled headers.
33202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33203$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33204        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33205        if test "x$HAS_GOOD_CCACHE" = x; then
33206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33207$as_echo "no, disabling ccache" >&6; }
33208            CCACHE=
33209        else
33210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33211$as_echo "yes" >&6; }
33212            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33213$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33214            PUSHED_FLAGS="$CXXFLAGS"
33215            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33216            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33217/* end confdefs.h.  */
33218
33219int
33220main ()
33221{
33222
33223  ;
33224  return 0;
33225}
33226_ACEOF
33227if ac_fn_cxx_try_compile "$LINENO"; then :
33228  CC_KNOWS_CCACHE_TRICK=yes
33229else
33230  CC_KNOWS_CCACHE_TRICK=no
33231fi
33232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33233            CXXFLAGS="$PUSHED_FLAGS"
33234            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33235                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33236$as_echo "yes" >&6; }
33237            else
33238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33239$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33240                CCACHE=
33241            fi
33242        fi
33243    fi
33244
33245    if test "x$CCACHE" != x; then
33246        CCACHE_SLOPPINESS=time_macros
33247        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33248        CCACHE_FLAGS=-fpch-preprocess
33249
33250        if test "x$SET_CCACHE_DIR" != x; then
33251            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33252	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33253        fi
33254    fi
33255
33256    fi
33257
33258
33259###############################################################################
33260#
33261# And now the finish...
33262#
33263###############################################################################
33264
33265# Check for some common pitfalls
33266
33267  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33268    file_to_test="$SRC_ROOT/LICENSE"
33269    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33270      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
33271    fi
33272  fi
33273
33274
33275
33276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33277$as_echo_n "checking if build directory is on local disk... " >&6; }
33278
33279	# df -l lists only local disks; if the given directory is not found then
33280	# a non-zero exit code is given
33281  if test "x$DF" = x; then
33282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33283      # msys does not have df; use Windows "net use" instead.
33284      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33285      if test "x$IS_NETWORK_DISK" = x; then
33286        OUTPUT_DIR_IS_LOCAL="yes"
33287      else
33288        OUTPUT_DIR_IS_LOCAL="no"
33289      fi
33290    else
33291      # No df here, say it's local
33292      OUTPUT_DIR_IS_LOCAL="yes"
33293    fi
33294  else
33295    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33296      OUTPUT_DIR_IS_LOCAL="yes"
33297    else
33298      OUTPUT_DIR_IS_LOCAL="no"
33299    fi
33300  fi
33301
33302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33303$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33304
33305
33306
33307# Check if the user has any old-style ALT_ variables set.
33308FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33309
33310# Before generating output files, test if they exist. If they do, this is a reconfigure.
33311# Since we can't properly handle the dependencies for this, warn the user about the situation
33312if test -e $OUTPUT_ROOT/spec.gmk; then
33313  IS_RECONFIGURE=yes
33314else
33315  IS_RECONFIGURE=no
33316fi
33317
33318if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33319  HIDE_PERFORMANCE_HINTS=yes
33320else
33321  HIDE_PERFORMANCE_HINTS=no
33322  # Hide it the next time around...
33323  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33324fi
33325
33326
33327
33328# At the end, call the custom hook. (Dummy macro if no custom sources available)
33329
33330
33331# We're messing a bit with internal autoconf variables to put the config.status
33332# in the output directory instead of the current directory.
33333CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33334# Create the actual output files. Now the main work of configure is done.
33335cat >confcache <<\_ACEOF
33336# This file is a shell script that caches the results of configure
33337# tests run on this system so they can be shared between configure
33338# scripts and configure runs, see configure's option --config-cache.
33339# It is not useful on other systems.  If it contains results you don't
33340# want to keep, you may remove or edit it.
33341#
33342# config.status only pays attention to the cache file if you give it
33343# the --recheck option to rerun configure.
33344#
33345# `ac_cv_env_foo' variables (set or unset) will be overridden when
33346# loading this file, other *unset* `ac_cv_foo' will be assigned the
33347# following values.
33348
33349_ACEOF
33350
33351# The following way of writing the cache mishandles newlines in values,
33352# but we know of no workaround that is simple, portable, and efficient.
33353# So, we kill variables containing newlines.
33354# Ultrix sh set writes to stderr and can't be redirected directly,
33355# and sets the high bit in the cache file unless we assign to the vars.
33356(
33357  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33358    eval ac_val=\$$ac_var
33359    case $ac_val in #(
33360    *${as_nl}*)
33361      case $ac_var in #(
33362      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33363$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33364      esac
33365      case $ac_var in #(
33366      _ | IFS | as_nl) ;; #(
33367      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33368      *) { eval $ac_var=; unset $ac_var;} ;;
33369      esac ;;
33370    esac
33371  done
33372
33373  (set) 2>&1 |
33374    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33375    *${as_nl}ac_space=\ *)
33376      # `set' does not quote correctly, so add quotes: double-quote
33377      # substitution turns \\\\ into \\, and sed turns \\ into \.
33378      sed -n \
33379	"s/'/'\\\\''/g;
33380	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33381      ;; #(
33382    *)
33383      # `set' quotes correctly as required by POSIX, so do not add quotes.
33384      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33385      ;;
33386    esac |
33387    sort
33388) |
33389  sed '
33390     /^ac_cv_env_/b end
33391     t clear
33392     :clear
33393     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33394     t end
33395     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33396     :end' >>confcache
33397if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33398  if test -w "$cache_file"; then
33399    test "x$cache_file" != "x/dev/null" &&
33400      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33401$as_echo "$as_me: updating cache $cache_file" >&6;}
33402    cat confcache >$cache_file
33403  else
33404    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33405$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33406  fi
33407fi
33408rm -f confcache
33409
33410test "x$prefix" = xNONE && prefix=$ac_default_prefix
33411# Let make expand exec_prefix.
33412test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33413
33414DEFS=-DHAVE_CONFIG_H
33415
33416ac_libobjs=
33417ac_ltlibobjs=
33418U=
33419for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33420  # 1. Remove the extension, and $U if already installed.
33421  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33422  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33423  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33424  #    will be set to the directory where LIBOBJS objects are built.
33425  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33426  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33427done
33428LIBOBJS=$ac_libobjs
33429
33430LTLIBOBJS=$ac_ltlibobjs
33431
33432
33433
33434: ${CONFIG_STATUS=./config.status}
33435ac_write_fail=0
33436ac_clean_files_save=$ac_clean_files
33437ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33438{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33439$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33440as_write_fail=0
33441cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33442#! $SHELL
33443# Generated by $as_me.
33444# Run this file to recreate the current configuration.
33445# Compiler output produced by configure, useful for debugging
33446# configure, is in config.log if it exists.
33447
33448debug=false
33449ac_cs_recheck=false
33450ac_cs_silent=false
33451
33452SHELL=\${CONFIG_SHELL-$SHELL}
33453export SHELL
33454_ASEOF
33455cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33456## -------------------- ##
33457## M4sh Initialization. ##
33458## -------------------- ##
33459
33460# Be more Bourne compatible
33461DUALCASE=1; export DUALCASE # for MKS sh
33462if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33463  emulate sh
33464  NULLCMD=:
33465  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33466  # is contrary to our usage.  Disable this feature.
33467  alias -g '${1+"$@"}'='"$@"'
33468  setopt NO_GLOB_SUBST
33469else
33470  case `(set -o) 2>/dev/null` in #(
33471  *posix*) :
33472    set -o posix ;; #(
33473  *) :
33474     ;;
33475esac
33476fi
33477
33478
33479as_nl='
33480'
33481export as_nl
33482# Printing a long string crashes Solaris 7 /usr/bin/printf.
33483as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33484as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33485as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33486# Prefer a ksh shell builtin over an external printf program on Solaris,
33487# but without wasting forks for bash or zsh.
33488if test -z "$BASH_VERSION$ZSH_VERSION" \
33489    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33490  as_echo='print -r --'
33491  as_echo_n='print -rn --'
33492elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33493  as_echo='printf %s\n'
33494  as_echo_n='printf %s'
33495else
33496  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33497    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33498    as_echo_n='/usr/ucb/echo -n'
33499  else
33500    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33501    as_echo_n_body='eval
33502      arg=$1;
33503      case $arg in #(
33504      *"$as_nl"*)
33505	expr "X$arg" : "X\\(.*\\)$as_nl";
33506	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33507      esac;
33508      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33509    '
33510    export as_echo_n_body
33511    as_echo_n='sh -c $as_echo_n_body as_echo'
33512  fi
33513  export as_echo_body
33514  as_echo='sh -c $as_echo_body as_echo'
33515fi
33516
33517# The user is always right.
33518if test "${PATH_SEPARATOR+set}" != set; then
33519  PATH_SEPARATOR=:
33520  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33521    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33522      PATH_SEPARATOR=';'
33523  }
33524fi
33525
33526
33527# IFS
33528# We need space, tab and new line, in precisely that order.  Quoting is
33529# there to prevent editors from complaining about space-tab.
33530# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33531# splitting by setting IFS to empty value.)
33532IFS=" ""	$as_nl"
33533
33534# Find who we are.  Look in the path if we contain no directory separator.
33535case $0 in #((
33536  *[\\/]* ) as_myself=$0 ;;
33537  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33538for as_dir in $PATH
33539do
33540  IFS=$as_save_IFS
33541  test -z "$as_dir" && as_dir=.
33542    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33543  done
33544IFS=$as_save_IFS
33545
33546     ;;
33547esac
33548# We did not find ourselves, most probably we were run as `sh COMMAND'
33549# in which case we are not to be found in the path.
33550if test "x$as_myself" = x; then
33551  as_myself=$0
33552fi
33553if test ! -f "$as_myself"; then
33554  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33555  exit 1
33556fi
33557
33558# Unset variables that we do not need and which cause bugs (e.g. in
33559# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33560# suppresses any "Segmentation fault" message there.  '((' could
33561# trigger a bug in pdksh 5.2.14.
33562for as_var in BASH_ENV ENV MAIL MAILPATH
33563do eval test x\${$as_var+set} = xset \
33564  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33565done
33566PS1='$ '
33567PS2='> '
33568PS4='+ '
33569
33570# NLS nuisances.
33571LC_ALL=C
33572export LC_ALL
33573LANGUAGE=C
33574export LANGUAGE
33575
33576# CDPATH.
33577(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33578
33579
33580# as_fn_error STATUS ERROR [LINENO LOG_FD]
33581# ----------------------------------------
33582# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33583# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33584# script with STATUS, using 1 if that was 0.
33585as_fn_error ()
33586{
33587  as_status=$1; test $as_status -eq 0 && as_status=1
33588  if test "$4"; then
33589    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33590    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33591  fi
33592  $as_echo "$as_me: error: $2" >&2
33593  as_fn_exit $as_status
33594} # as_fn_error
33595
33596
33597# as_fn_set_status STATUS
33598# -----------------------
33599# Set $? to STATUS, without forking.
33600as_fn_set_status ()
33601{
33602  return $1
33603} # as_fn_set_status
33604
33605# as_fn_exit STATUS
33606# -----------------
33607# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33608as_fn_exit ()
33609{
33610  set +e
33611  as_fn_set_status $1
33612  exit $1
33613} # as_fn_exit
33614
33615# as_fn_unset VAR
33616# ---------------
33617# Portably unset VAR.
33618as_fn_unset ()
33619{
33620  { eval $1=; unset $1;}
33621}
33622as_unset=as_fn_unset
33623# as_fn_append VAR VALUE
33624# ----------------------
33625# Append the text in VALUE to the end of the definition contained in VAR. Take
33626# advantage of any shell optimizations that allow amortized linear growth over
33627# repeated appends, instead of the typical quadratic growth present in naive
33628# implementations.
33629if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33630  eval 'as_fn_append ()
33631  {
33632    eval $1+=\$2
33633  }'
33634else
33635  as_fn_append ()
33636  {
33637    eval $1=\$$1\$2
33638  }
33639fi # as_fn_append
33640
33641# as_fn_arith ARG...
33642# ------------------
33643# Perform arithmetic evaluation on the ARGs, and store the result in the
33644# global $as_val. Take advantage of shells that can avoid forks. The arguments
33645# must be portable across $(()) and expr.
33646if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33647  eval 'as_fn_arith ()
33648  {
33649    as_val=$(( $* ))
33650  }'
33651else
33652  as_fn_arith ()
33653  {
33654    as_val=`expr "$@" || test $? -eq 1`
33655  }
33656fi # as_fn_arith
33657
33658
33659if expr a : '\(a\)' >/dev/null 2>&1 &&
33660   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33661  as_expr=expr
33662else
33663  as_expr=false
33664fi
33665
33666if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33667  as_basename=basename
33668else
33669  as_basename=false
33670fi
33671
33672if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33673  as_dirname=dirname
33674else
33675  as_dirname=false
33676fi
33677
33678as_me=`$as_basename -- "$0" ||
33679$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33680	 X"$0" : 'X\(//\)$' \| \
33681	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33682$as_echo X/"$0" |
33683    sed '/^.*\/\([^/][^/]*\)\/*$/{
33684	    s//\1/
33685	    q
33686	  }
33687	  /^X\/\(\/\/\)$/{
33688	    s//\1/
33689	    q
33690	  }
33691	  /^X\/\(\/\).*/{
33692	    s//\1/
33693	    q
33694	  }
33695	  s/.*/./; q'`
33696
33697# Avoid depending upon Character Ranges.
33698as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33699as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33700as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33701as_cr_digits='0123456789'
33702as_cr_alnum=$as_cr_Letters$as_cr_digits
33703
33704ECHO_C= ECHO_N= ECHO_T=
33705case `echo -n x` in #(((((
33706-n*)
33707  case `echo 'xy\c'` in
33708  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33709  xy)  ECHO_C='\c';;
33710  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33711       ECHO_T='	';;
33712  esac;;
33713*)
33714  ECHO_N='-n';;
33715esac
33716
33717rm -f conf$$ conf$$.exe conf$$.file
33718if test -d conf$$.dir; then
33719  rm -f conf$$.dir/conf$$.file
33720else
33721  rm -f conf$$.dir
33722  mkdir conf$$.dir 2>/dev/null
33723fi
33724if (echo >conf$$.file) 2>/dev/null; then
33725  if ln -s conf$$.file conf$$ 2>/dev/null; then
33726    as_ln_s='ln -s'
33727    # ... but there are two gotchas:
33728    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33729    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33730    # In both cases, we have to default to `cp -p'.
33731    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33732      as_ln_s='cp -p'
33733  elif ln conf$$.file conf$$ 2>/dev/null; then
33734    as_ln_s=ln
33735  else
33736    as_ln_s='cp -p'
33737  fi
33738else
33739  as_ln_s='cp -p'
33740fi
33741rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33742rmdir conf$$.dir 2>/dev/null
33743
33744
33745# as_fn_mkdir_p
33746# -------------
33747# Create "$as_dir" as a directory, including parents if necessary.
33748as_fn_mkdir_p ()
33749{
33750
33751  case $as_dir in #(
33752  -*) as_dir=./$as_dir;;
33753  esac
33754  test -d "$as_dir" || eval $as_mkdir_p || {
33755    as_dirs=
33756    while :; do
33757      case $as_dir in #(
33758      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33759      *) as_qdir=$as_dir;;
33760      esac
33761      as_dirs="'$as_qdir' $as_dirs"
33762      as_dir=`$as_dirname -- "$as_dir" ||
33763$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33764	 X"$as_dir" : 'X\(//\)[^/]' \| \
33765	 X"$as_dir" : 'X\(//\)$' \| \
33766	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33767$as_echo X"$as_dir" |
33768    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33769	    s//\1/
33770	    q
33771	  }
33772	  /^X\(\/\/\)[^/].*/{
33773	    s//\1/
33774	    q
33775	  }
33776	  /^X\(\/\/\)$/{
33777	    s//\1/
33778	    q
33779	  }
33780	  /^X\(\/\).*/{
33781	    s//\1/
33782	    q
33783	  }
33784	  s/.*/./; q'`
33785      test -d "$as_dir" && break
33786    done
33787    test -z "$as_dirs" || eval "mkdir $as_dirs"
33788  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33789
33790
33791} # as_fn_mkdir_p
33792if mkdir -p . 2>/dev/null; then
33793  as_mkdir_p='mkdir -p "$as_dir"'
33794else
33795  test -d ./-p && rmdir ./-p
33796  as_mkdir_p=false
33797fi
33798
33799if test -x / >/dev/null 2>&1; then
33800  as_test_x='test -x'
33801else
33802  if ls -dL / >/dev/null 2>&1; then
33803    as_ls_L_option=L
33804  else
33805    as_ls_L_option=
33806  fi
33807  as_test_x='
33808    eval sh -c '\''
33809      if test -d "$1"; then
33810	test -d "$1/.";
33811      else
33812	case $1 in #(
33813	-*)set "./$1";;
33814	esac;
33815	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33816	???[sx]*):;;*)false;;esac;fi
33817    '\'' sh
33818  '
33819fi
33820as_executable_p=$as_test_x
33821
33822# Sed expression to map a string onto a valid CPP name.
33823as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33824
33825# Sed expression to map a string onto a valid variable name.
33826as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33827
33828
33829exec 6>&1
33830## ----------------------------------- ##
33831## Main body of $CONFIG_STATUS script. ##
33832## ----------------------------------- ##
33833_ASEOF
33834test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33835
33836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33837# Save the log message, to keep $0 and so on meaningful, and to
33838# report actual input values of CONFIG_FILES etc. instead of their
33839# values after options handling.
33840ac_log="
33841This file was extended by OpenJDK $as_me jdk8, which was
33842generated by GNU Autoconf 2.67.  Invocation command line was
33843
33844  CONFIG_FILES    = $CONFIG_FILES
33845  CONFIG_HEADERS  = $CONFIG_HEADERS
33846  CONFIG_LINKS    = $CONFIG_LINKS
33847  CONFIG_COMMANDS = $CONFIG_COMMANDS
33848  $ $0 $@
33849
33850on `(hostname || uname -n) 2>/dev/null | sed 1q`
33851"
33852
33853_ACEOF
33854
33855case $ac_config_files in *"
33856"*) set x $ac_config_files; shift; ac_config_files=$*;;
33857esac
33858
33859case $ac_config_headers in *"
33860"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33861esac
33862
33863
33864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33865# Files that config.status was made for.
33866config_files="$ac_config_files"
33867config_headers="$ac_config_headers"
33868
33869_ACEOF
33870
33871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33872ac_cs_usage="\
33873\`$as_me' instantiates files and other configuration actions
33874from templates according to the current configuration.  Unless the files
33875and actions are specified as TAGs, all are instantiated by default.
33876
33877Usage: $0 [OPTION]... [TAG]...
33878
33879  -h, --help       print this help, then exit
33880  -V, --version    print version number and configuration settings, then exit
33881      --config     print configuration, then exit
33882  -q, --quiet, --silent
33883                   do not print progress messages
33884  -d, --debug      don't remove temporary files
33885      --recheck    update $as_me by reconfiguring in the same conditions
33886      --file=FILE[:TEMPLATE]
33887                   instantiate the configuration file FILE
33888      --header=FILE[:TEMPLATE]
33889                   instantiate the configuration header FILE
33890
33891Configuration files:
33892$config_files
33893
33894Configuration headers:
33895$config_headers
33896
33897Report bugs to <build-dev@openjdk.java.net>.
33898OpenJDK home page: <http://openjdk.java.net>."
33899
33900_ACEOF
33901cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33902ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33903ac_cs_version="\\
33904OpenJDK config.status jdk8
33905configured by $0, generated by GNU Autoconf 2.67,
33906  with options \\"\$ac_cs_config\\"
33907
33908Copyright (C) 2010 Free Software Foundation, Inc.
33909This config.status script is free software; the Free Software Foundation
33910gives unlimited permission to copy, distribute and modify it."
33911
33912ac_pwd='$ac_pwd'
33913srcdir='$srcdir'
33914AWK='$AWK'
33915test -n "\$AWK" || AWK=awk
33916_ACEOF
33917
33918cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33919# The default lists apply if the user does not specify any file.
33920ac_need_defaults=:
33921while test $# != 0
33922do
33923  case $1 in
33924  --*=?*)
33925    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33926    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33927    ac_shift=:
33928    ;;
33929  --*=)
33930    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33931    ac_optarg=
33932    ac_shift=:
33933    ;;
33934  *)
33935    ac_option=$1
33936    ac_optarg=$2
33937    ac_shift=shift
33938    ;;
33939  esac
33940
33941  case $ac_option in
33942  # Handling of the options.
33943  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33944    ac_cs_recheck=: ;;
33945  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33946    $as_echo "$ac_cs_version"; exit ;;
33947  --config | --confi | --conf | --con | --co | --c )
33948    $as_echo "$ac_cs_config"; exit ;;
33949  --debug | --debu | --deb | --de | --d | -d )
33950    debug=: ;;
33951  --file | --fil | --fi | --f )
33952    $ac_shift
33953    case $ac_optarg in
33954    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33955    '') as_fn_error $? "missing file argument" ;;
33956    esac
33957    as_fn_append CONFIG_FILES " '$ac_optarg'"
33958    ac_need_defaults=false;;
33959  --header | --heade | --head | --hea )
33960    $ac_shift
33961    case $ac_optarg in
33962    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33963    esac
33964    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33965    ac_need_defaults=false;;
33966  --he | --h)
33967    # Conflict between --help and --header
33968    as_fn_error $? "ambiguous option: \`$1'
33969Try \`$0 --help' for more information.";;
33970  --help | --hel | -h )
33971    $as_echo "$ac_cs_usage"; exit ;;
33972  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33973  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33974    ac_cs_silent=: ;;
33975
33976  # This is an error.
33977  -*) as_fn_error $? "unrecognized option: \`$1'
33978Try \`$0 --help' for more information." ;;
33979
33980  *) as_fn_append ac_config_targets " $1"
33981     ac_need_defaults=false ;;
33982
33983  esac
33984  shift
33985done
33986
33987ac_configure_extra_args=
33988
33989if $ac_cs_silent; then
33990  exec 6>/dev/null
33991  ac_configure_extra_args="$ac_configure_extra_args --silent"
33992fi
33993
33994_ACEOF
33995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33996if \$ac_cs_recheck; then
33997  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33998  shift
33999  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34000  CONFIG_SHELL='$SHELL'
34001  export CONFIG_SHELL
34002  exec "\$@"
34003fi
34004
34005_ACEOF
34006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34007exec 5>>config.log
34008{
34009  echo
34010  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34011## Running $as_me. ##
34012_ASBOX
34013  $as_echo "$ac_log"
34014} >&5
34015
34016_ACEOF
34017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34018_ACEOF
34019
34020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34021
34022# Handling of arguments.
34023for ac_config_target in $ac_config_targets
34024do
34025  case $ac_config_target in
34026    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34027    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34028    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34029    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34030    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34031    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34032    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34033
34034  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34035  esac
34036done
34037
34038
34039# If the user did not use the arguments to specify the items to instantiate,
34040# then the envvar interface is used.  Set only those that are not.
34041# We use the long form for the default assignment because of an extremely
34042# bizarre bug on SunOS 4.1.3.
34043if $ac_need_defaults; then
34044  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34045  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34046fi
34047
34048# Have a temporary directory for convenience.  Make it in the build tree
34049# simply because there is no reason against having it here, and in addition,
34050# creating and moving files from /tmp can sometimes cause problems.
34051# Hook for its removal unless debugging.
34052# Note that there is a small window in which the directory will not be cleaned:
34053# after its creation but before its name has been assigned to `$tmp'.
34054$debug ||
34055{
34056  tmp=
34057  trap 'exit_status=$?
34058  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34059' 0
34060  trap 'as_fn_exit 1' 1 2 13 15
34061}
34062# Create a (secure) tmp directory for tmp files.
34063
34064{
34065  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34066  test -n "$tmp" && test -d "$tmp"
34067}  ||
34068{
34069  tmp=./conf$$-$RANDOM
34070  (umask 077 && mkdir "$tmp")
34071} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34072
34073# Set up the scripts for CONFIG_FILES section.
34074# No need to generate them if there are no CONFIG_FILES.
34075# This happens for instance with `./config.status config.h'.
34076if test -n "$CONFIG_FILES"; then
34077
34078
34079ac_cr=`echo X | tr X '\015'`
34080# On cygwin, bash can eat \r inside `` if the user requested igncr.
34081# But we know of no other shell where ac_cr would be empty at this
34082# point, so we can use a bashism as a fallback.
34083if test "x$ac_cr" = x; then
34084  eval ac_cr=\$\'\\r\'
34085fi
34086ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34087if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34088  ac_cs_awk_cr='\\r'
34089else
34090  ac_cs_awk_cr=$ac_cr
34091fi
34092
34093echo 'BEGIN {' >"$tmp/subs1.awk" &&
34094_ACEOF
34095
34096
34097{
34098  echo "cat >conf$$subs.awk <<_ACEOF" &&
34099  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34100  echo "_ACEOF"
34101} >conf$$subs.sh ||
34102  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34103ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34104ac_delim='%!_!# '
34105for ac_last_try in false false false false false :; do
34106  . ./conf$$subs.sh ||
34107    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34108
34109  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34110  if test $ac_delim_n = $ac_delim_num; then
34111    break
34112  elif $ac_last_try; then
34113    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34114  else
34115    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34116  fi
34117done
34118rm -f conf$$subs.sh
34119
34120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34121cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34122_ACEOF
34123sed -n '
34124h
34125s/^/S["/; s/!.*/"]=/
34126p
34127g
34128s/^[^!]*!//
34129:repl
34130t repl
34131s/'"$ac_delim"'$//
34132t delim
34133:nl
34134h
34135s/\(.\{148\}\)..*/\1/
34136t more1
34137s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34138p
34139n
34140b repl
34141:more1
34142s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34143p
34144g
34145s/.\{148\}//
34146t nl
34147:delim
34148h
34149s/\(.\{148\}\)..*/\1/
34150t more2
34151s/["\\]/\\&/g; s/^/"/; s/$/"/
34152p
34153b
34154:more2
34155s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34156p
34157g
34158s/.\{148\}//
34159t delim
34160' <conf$$subs.awk | sed '
34161/^[^""]/{
34162  N
34163  s/\n//
34164}
34165' >>$CONFIG_STATUS || ac_write_fail=1
34166rm -f conf$$subs.awk
34167cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34168_ACAWK
34169cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34170  for (key in S) S_is_set[key] = 1
34171  FS = ""
34172
34173}
34174{
34175  line = $ 0
34176  nfields = split(line, field, "@")
34177  substed = 0
34178  len = length(field[1])
34179  for (i = 2; i < nfields; i++) {
34180    key = field[i]
34181    keylen = length(key)
34182    if (S_is_set[key]) {
34183      value = S[key]
34184      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34185      len += length(value) + length(field[++i])
34186      substed = 1
34187    } else
34188      len += 1 + keylen
34189  }
34190
34191  print line
34192}
34193
34194_ACAWK
34195_ACEOF
34196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34197if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34198  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34199else
34200  cat
34201fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34202  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34203_ACEOF
34204
34205# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34206# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34207# trailing colons and then remove the whole line if VPATH becomes empty
34208# (actually we leave an empty line to preserve line numbers).
34209if test "x$srcdir" = x.; then
34210  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34211h
34212s///
34213s/^/:/
34214s/[	 ]*$/:/
34215s/:\$(srcdir):/:/g
34216s/:\${srcdir}:/:/g
34217s/:@srcdir@:/:/g
34218s/^:*//
34219s/:*$//
34220x
34221s/\(=[	 ]*\).*/\1/
34222G
34223s/\n//
34224s/^[^=]*=[	 ]*$//
34225}'
34226fi
34227
34228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34229fi # test -n "$CONFIG_FILES"
34230
34231# Set up the scripts for CONFIG_HEADERS section.
34232# No need to generate them if there are no CONFIG_HEADERS.
34233# This happens for instance with `./config.status Makefile'.
34234if test -n "$CONFIG_HEADERS"; then
34235cat >"$tmp/defines.awk" <<\_ACAWK ||
34236BEGIN {
34237_ACEOF
34238
34239# Transform confdefs.h into an awk script `defines.awk', embedded as
34240# here-document in config.status, that substitutes the proper values into
34241# config.h.in to produce config.h.
34242
34243# Create a delimiter string that does not exist in confdefs.h, to ease
34244# handling of long lines.
34245ac_delim='%!_!# '
34246for ac_last_try in false false :; do
34247  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34248  if test -z "$ac_t"; then
34249    break
34250  elif $ac_last_try; then
34251    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34252  else
34253    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34254  fi
34255done
34256
34257# For the awk script, D is an array of macro values keyed by name,
34258# likewise P contains macro parameters if any.  Preserve backslash
34259# newline sequences.
34260
34261ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34262sed -n '
34263s/.\{148\}/&'"$ac_delim"'/g
34264t rset
34265:rset
34266s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34267t def
34268d
34269:def
34270s/\\$//
34271t bsnl
34272s/["\\]/\\&/g
34273s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34274D["\1"]=" \3"/p
34275s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34276d
34277:bsnl
34278s/["\\]/\\&/g
34279s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34280D["\1"]=" \3\\\\\\n"\\/p
34281t cont
34282s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34283t cont
34284d
34285:cont
34286n
34287s/.\{148\}/&'"$ac_delim"'/g
34288t clear
34289:clear
34290s/\\$//
34291t bsnlc
34292s/["\\]/\\&/g; s/^/"/; s/$/"/p
34293d
34294:bsnlc
34295s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34296b cont
34297' <confdefs.h | sed '
34298s/'"$ac_delim"'/"\\\
34299"/g' >>$CONFIG_STATUS || ac_write_fail=1
34300
34301cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34302  for (key in D) D_is_set[key] = 1
34303  FS = ""
34304}
34305/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34306  line = \$ 0
34307  split(line, arg, " ")
34308  if (arg[1] == "#") {
34309    defundef = arg[2]
34310    mac1 = arg[3]
34311  } else {
34312    defundef = substr(arg[1], 2)
34313    mac1 = arg[2]
34314  }
34315  split(mac1, mac2, "(") #)
34316  macro = mac2[1]
34317  prefix = substr(line, 1, index(line, defundef) - 1)
34318  if (D_is_set[macro]) {
34319    # Preserve the white space surrounding the "#".
34320    print prefix "define", macro P[macro] D[macro]
34321    next
34322  } else {
34323    # Replace #undef with comments.  This is necessary, for example,
34324    # in the case of _POSIX_SOURCE, which is predefined and required
34325    # on some systems where configure will not decide to define it.
34326    if (defundef == "undef") {
34327      print "/*", prefix defundef, macro, "*/"
34328      next
34329    }
34330  }
34331}
34332{ print }
34333_ACAWK
34334_ACEOF
34335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34336  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34337fi # test -n "$CONFIG_HEADERS"
34338
34339
34340eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34341shift
34342for ac_tag
34343do
34344  case $ac_tag in
34345  :[FHLC]) ac_mode=$ac_tag; continue;;
34346  esac
34347  case $ac_mode$ac_tag in
34348  :[FHL]*:*);;
34349  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34350  :[FH]-) ac_tag=-:-;;
34351  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34352  esac
34353  ac_save_IFS=$IFS
34354  IFS=:
34355  set x $ac_tag
34356  IFS=$ac_save_IFS
34357  shift
34358  ac_file=$1
34359  shift
34360
34361  case $ac_mode in
34362  :L) ac_source=$1;;
34363  :[FH])
34364    ac_file_inputs=
34365    for ac_f
34366    do
34367      case $ac_f in
34368      -) ac_f="$tmp/stdin";;
34369      *) # Look for the file first in the build tree, then in the source tree
34370	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34371	 # because $ac_f cannot contain `:'.
34372	 test -f "$ac_f" ||
34373	   case $ac_f in
34374	   [\\/$]*) false;;
34375	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34376	   esac ||
34377	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34378      esac
34379      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34380      as_fn_append ac_file_inputs " '$ac_f'"
34381    done
34382
34383    # Let's still pretend it is `configure' which instantiates (i.e., don't
34384    # use $as_me), people would be surprised to read:
34385    #    /* config.h.  Generated by config.status.  */
34386    configure_input='Generated from '`
34387	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34388	`' by configure.'
34389    if test x"$ac_file" != x-; then
34390      configure_input="$ac_file.  $configure_input"
34391      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34392$as_echo "$as_me: creating $ac_file" >&6;}
34393    fi
34394    # Neutralize special characters interpreted by sed in replacement strings.
34395    case $configure_input in #(
34396    *\&* | *\|* | *\\* )
34397       ac_sed_conf_input=`$as_echo "$configure_input" |
34398       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34399    *) ac_sed_conf_input=$configure_input;;
34400    esac
34401
34402    case $ac_tag in
34403    *:-:* | *:-) cat >"$tmp/stdin" \
34404      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34405    esac
34406    ;;
34407  esac
34408
34409  ac_dir=`$as_dirname -- "$ac_file" ||
34410$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34411	 X"$ac_file" : 'X\(//\)[^/]' \| \
34412	 X"$ac_file" : 'X\(//\)$' \| \
34413	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34414$as_echo X"$ac_file" |
34415    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34416	    s//\1/
34417	    q
34418	  }
34419	  /^X\(\/\/\)[^/].*/{
34420	    s//\1/
34421	    q
34422	  }
34423	  /^X\(\/\/\)$/{
34424	    s//\1/
34425	    q
34426	  }
34427	  /^X\(\/\).*/{
34428	    s//\1/
34429	    q
34430	  }
34431	  s/.*/./; q'`
34432  as_dir="$ac_dir"; as_fn_mkdir_p
34433  ac_builddir=.
34434
34435case "$ac_dir" in
34436.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34437*)
34438  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34439  # A ".." for each directory in $ac_dir_suffix.
34440  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34441  case $ac_top_builddir_sub in
34442  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34443  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34444  esac ;;
34445esac
34446ac_abs_top_builddir=$ac_pwd
34447ac_abs_builddir=$ac_pwd$ac_dir_suffix
34448# for backward compatibility:
34449ac_top_builddir=$ac_top_build_prefix
34450
34451case $srcdir in
34452  .)  # We are building in place.
34453    ac_srcdir=.
34454    ac_top_srcdir=$ac_top_builddir_sub
34455    ac_abs_top_srcdir=$ac_pwd ;;
34456  [\\/]* | ?:[\\/]* )  # Absolute name.
34457    ac_srcdir=$srcdir$ac_dir_suffix;
34458    ac_top_srcdir=$srcdir
34459    ac_abs_top_srcdir=$srcdir ;;
34460  *) # Relative name.
34461    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34462    ac_top_srcdir=$ac_top_build_prefix$srcdir
34463    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34464esac
34465ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34466
34467
34468  case $ac_mode in
34469  :F)
34470  #
34471  # CONFIG_FILE
34472  #
34473
34474_ACEOF
34475
34476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34477# If the template does not know about datarootdir, expand it.
34478# FIXME: This hack should be removed a few years after 2.60.
34479ac_datarootdir_hack=; ac_datarootdir_seen=
34480ac_sed_dataroot='
34481/datarootdir/ {
34482  p
34483  q
34484}
34485/@datadir@/p
34486/@docdir@/p
34487/@infodir@/p
34488/@localedir@/p
34489/@mandir@/p'
34490case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34491*datarootdir*) ac_datarootdir_seen=yes;;
34492*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34493  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34494$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34495_ACEOF
34496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34497  ac_datarootdir_hack='
34498  s&@datadir@&$datadir&g
34499  s&@docdir@&$docdir&g
34500  s&@infodir@&$infodir&g
34501  s&@localedir@&$localedir&g
34502  s&@mandir@&$mandir&g
34503  s&\\\${datarootdir}&$datarootdir&g' ;;
34504esac
34505_ACEOF
34506
34507# Neutralize VPATH when `$srcdir' = `.'.
34508# Shell code in configure.ac might set extrasub.
34509# FIXME: do we really want to maintain this feature?
34510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34511ac_sed_extra="$ac_vpsub
34512$extrasub
34513_ACEOF
34514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34515:t
34516/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34517s|@configure_input@|$ac_sed_conf_input|;t t
34518s&@top_builddir@&$ac_top_builddir_sub&;t t
34519s&@top_build_prefix@&$ac_top_build_prefix&;t t
34520s&@srcdir@&$ac_srcdir&;t t
34521s&@abs_srcdir@&$ac_abs_srcdir&;t t
34522s&@top_srcdir@&$ac_top_srcdir&;t t
34523s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34524s&@builddir@&$ac_builddir&;t t
34525s&@abs_builddir@&$ac_abs_builddir&;t t
34526s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34527$ac_datarootdir_hack
34528"
34529eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34530  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34531
34532test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34533  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34534  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34535  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34536which seems to be undefined.  Please make sure it is defined" >&5
34537$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34538which seems to be undefined.  Please make sure it is defined" >&2;}
34539
34540  rm -f "$tmp/stdin"
34541  case $ac_file in
34542  -) cat "$tmp/out" && rm -f "$tmp/out";;
34543  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34544  esac \
34545  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34546 ;;
34547  :H)
34548  #
34549  # CONFIG_HEADER
34550  #
34551  if test x"$ac_file" != x-; then
34552    {
34553      $as_echo "/* $configure_input  */" \
34554      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34555    } >"$tmp/config.h" \
34556      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34557    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34558      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34559$as_echo "$as_me: $ac_file is unchanged" >&6;}
34560    else
34561      rm -f "$ac_file"
34562      mv "$tmp/config.h" "$ac_file" \
34563	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34564    fi
34565  else
34566    $as_echo "/* $configure_input  */" \
34567      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34568      || as_fn_error $? "could not create -" "$LINENO" 5
34569  fi
34570 ;;
34571
34572
34573  esac
34574
34575done # for ac_tag
34576
34577
34578as_fn_exit 0
34579_ACEOF
34580ac_clean_files=$ac_clean_files_save
34581
34582test $ac_write_fail = 0 ||
34583  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34584
34585
34586# configure is writing to config.log, and then calls config.status.
34587# config.status does its own redirection, appending to config.log.
34588# Unfortunately, on DOS this fails, as config.log is still kept open
34589# by configure, so config.status won't be able to write to it; its
34590# output is simply discarded.  So we exec the FD to /dev/null,
34591# effectively closing config.log, so it can be properly (re)opened and
34592# appended to by config.status.  When coming back to configure, we
34593# need to make the FD available again.
34594if test "$no_create" != yes; then
34595  ac_cs_success=:
34596  ac_config_status_args=
34597  test "$silent" = yes &&
34598    ac_config_status_args="$ac_config_status_args --quiet"
34599  exec 5>/dev/null
34600  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34601  exec 5>>config.log
34602  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34603  # would make configure fail if this is the last instruction.
34604  $ac_cs_success || as_fn_exit 1
34605fi
34606if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34607  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34608$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34609fi
34610
34611
34612# Make the compare script executable
34613$CHMOD +x $OUTPUT_ROOT/compare.sh
34614
34615# Finally output some useful information to the user
34616
34617# Finally output some useful information to the user
34618
34619if test "x$CCACHE_FOUND" != x; then
34620	if  test "x$HAS_GOOD_CCACHE" = x; then
34621		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34622		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34623	else
34624		CCACHE_STATUS="installed and in use"
34625	fi
34626else
34627	if test "x$GCC" = xyes; then
34628		CCACHE_STATUS="not installed (consider installing)"
34629		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34630	else
34631		CCACHE_STATUS="not available for your system"
34632	fi
34633fi
34634
34635printf "\n"
34636printf "====================================================\n"
34637printf "A new configuration has been successfully created in\n"
34638printf "$OUTPUT_ROOT\n"
34639if test "x$CONFIGURE_COMMAND_LINE" != x; then
34640	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34641else
34642	printf "using default settings.\n"
34643fi
34644
34645printf "\n"
34646printf "Configuration summary:\n"
34647printf "* Debug level:    $DEBUG_LEVEL\n"
34648printf "* JDK variant:    $JDK_VARIANT\n"
34649printf "* JVM variants:   $with_jvm_variants\n"
34650printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34651
34652printf "\n"
34653printf "Tools summary:\n"
34654if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34655  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34656fi
34657printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34658printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34659printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34660
34661printf "\n"
34662printf "Build performance summary:\n"
34663printf "* Cores to use:   $JOBS\n"
34664printf "* Memory limit:   $MEMORY_SIZE MB\n"
34665printf "* ccache status:  $CCACHE_STATUS\n"
34666printf "\n"
34667
34668if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34669	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34670	printf "$CCACHE_HELP_MSG\n"
34671
34672    # Print a helpful message on how to acquire the necessary build dependency.
34673    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34674    MISSING_DEPENDENCY=ccache
34675    PKGHANDLER_COMMAND=
34676
34677    case $PKGHANDLER in
34678	apt-get)
34679                apt_help     $MISSING_DEPENDENCY ;;
34680    yum)
34681                yum_help     $MISSING_DEPENDENCY ;;
34682	port)
34683                port_help    $MISSING_DEPENDENCY ;;
34684	pkgutil)
34685                pkgutil_help $MISSING_DEPENDENCY ;;
34686	pkgadd)
34687                pkgadd_help  $MISSING_DEPENDENCY ;;
34688    * )
34689      break ;;
34690    esac
34691
34692    if test "x$PKGHANDLER_COMMAND" != x; then
34693        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34694    fi
34695
34696	printf "$HELP_MSG\n"
34697	printf "\n"
34698fi
34699
34700if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34701	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34702	printf "will result in longer build times.\n"
34703	printf "\n"
34704fi
34705
34706if test "x$FOUND_ALT_VARIABLES" != "x"; then
34707	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34708	printf "These are not respected, and will be ignored. It is recommended\n"
34709	printf "that you clean your environment. The following variables are set:\n"
34710	printf "$FOUND_ALT_VARIABLES\n"
34711	printf "\n"
34712fi
34713
34714if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34715	printf "WARNING: Your build output directory is not on a local disk.\n"
34716	printf "This will severely degrade build performance!\n"
34717	printf "It is recommended that you create an output directory on a local disk,\n"
34718	printf "and run the configure script again from that directory.\n"
34719	printf "\n"
34720fi
34721
34722if test "x$IS_RECONFIGURE" = "xyes"; then
34723	printf "WARNING: The result of this configuration has overridden an older\n"
34724	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34725	printf "proper build. Failure to do so might result in strange build problems.\n"
34726	printf "\n"
34727fi
34728
34729