generated-configure.sh revision 696:e404d321abc6
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_CORES
603SJAVAC_SERVER_JAVA
604JOBS
605MEMORY_SIZE
606NUM_CORES
607ENABLE_INTREE_EC
608SALIB_NAME
609HOTSPOT_MAKE_ARGS
610FIXPATH
611LIBCXX
612LLVM_LIBS
613LLVM_LDFLAGS
614LLVM_CFLAGS
615LLVM_CONFIG
616LIBFFI_LIBS
617LIBFFI_CFLAGS
618STATIC_CXX_SETTING
619LIBDL
620LIBM
621LIBZIP_CAN_USE_MMAP
622USE_EXTERNAL_LIBZ
623USE_EXTERNAL_LIBGIF
624USE_EXTERNAL_LIBJPEG
625ALSA_LIBS
626ALSA_CFLAGS
627FREETYPE2_LIB_PATH
628USING_SYSTEM_FT_LIB
629FREETYPE2_LIBS
630FREETYPE2_CFLAGS
631CUPS_CFLAGS
632OPENWIN_HOME
633X_EXTRA_LIBS
634X_LIBS
635X_PRE_LIBS
636X_CFLAGS
637XMKMF
638CXXFLAGS_DEBUG_SYMBOLS
639CFLAGS_DEBUG_SYMBOLS
640ZIP_DEBUGINFO_FILES
641ENABLE_DEBUG_SYMBOLS
642COMPILER_SUPPORTS_TARGET_BITS_FLAG
643ZERO_ARCHFLAG
644LDFLAGS_CXX_JDK
645LDFLAGS_JDKEXE_SUFFIX
646LDFLAGS_JDKLIB_SUFFIX
647LDFLAGS_JDKEXE
648LDFLAGS_JDKLIB
649CXXFLAGS_JDKEXE
650CXXFLAGS_JDKLIB
651CFLAGS_JDKEXE
652CFLAGS_JDKLIB
653MACOSX_VERSION_MIN
654PACKAGE_PATH
655LEGACY_EXTRA_LDFLAGS
656LEGACY_EXTRA_CXXFLAGS
657LEGACY_EXTRA_CFLAGS
658CXX_FLAG_DEPS
659C_FLAG_DEPS
660CXX_O_FLAG_NONE
661CXX_O_FLAG_NORM
662CXX_O_FLAG_HI
663CXX_O_FLAG_HIGHEST
664C_O_FLAG_NONE
665C_O_FLAG_NORM
666C_O_FLAG_HI
667C_O_FLAG_HIGHEST
668POST_MCS_CMD
669POST_STRIP_CMD
670SET_EXECUTABLE_ORIGIN
671SET_SHARED_LIBRARY_ORIGIN
672CXX_FLAG_REORDER
673C_FLAG_REORDER
674SET_SHARED_LIBRARY_MAPFILE
675SET_SHARED_LIBRARY_NAME
676SHARED_LIBRARY_FLAGS
677EXE_SUFFIX
678STATIC_LIBRARY_SUFFIX
679SHARED_LIBRARY_SUFFIX
680LIBRARY_PREFIX
681STATIC_LIBRARY
682SHARED_LIBRARY
683OBJ_SUFFIX
684LIPO
685ac_ct_OBJDUMP
686OBJDUMP
687ac_ct_OBJCOPY
688OBJCOPY
689MCS
690STRIP
691GNM
692NM
693AS
694CXXCPP
695CPP
696COMPILER_TYPE
697RC_FLAGS
698DUMPBIN
699WINAR
700HOTSPOT_RC
701HOTSPOT_MT
702RC
703MT
704WINLD
705HOTSPOT_LD
706HOTSPOT_CXX
707ARFLAGS
708AR
709LDEXECXX
710LDCXX
711LDEXE
712LD
713ac_ct_OBJC
714OBJCFLAGS
715OBJC
716ac_ct_CXX
717CXXFLAGS
718CXX
719ac_ct_PROPER_COMPILER_CXX
720PROPER_COMPILER_CXX
721POTENTIAL_CXX
722TOOLS_DIR_CXX
723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730ac_ct_PROPER_COMPILER_CC
731PROPER_COMPILER_CC
732POTENTIAL_CC
733TOOLS_DIR_CC
734BUILD_LD
735BUILD_CXX
736BUILD_CC
737MSVCR_DLL
738DXSDK_INCLUDE_PATH
739DXSDK_LIB_PATH
740VS_PATH
741VS_LIB
742VS_INCLUDE
743CYGWIN_LINK
744AR_OUT_OPTION
745LD_OUT_OPTION
746EXE_OUT_OPTION
747CC_OUT_OPTION
748BUILD_HOTSPOT
749HOTSPOT_DIST
750BUILD_OUTPUT
751OVERRIDE_SRC_ROOT
752ADD_SRC_ROOT
753JDK_TOPDIR
754NASHORN_TOPDIR
755HOTSPOT_TOPDIR
756JAXWS_TOPDIR
757JAXP_TOPDIR
758CORBA_TOPDIR
759LANGTOOLS_TOPDIR
760BOOT_JDK_JVMARGS
761JAVAC_FLAGS
762BOOT_JDK_SOURCETARGET
763BOOT_JDK
764BOOT_TOOLSJAR
765BOOT_RTJAR
766JAVA_CHECK
767JAVAC_CHECK
768COOKED_BUILD_NUMBER
769JDK_VERSION
770COPYRIGHT_YEAR
771MACOSX_BUNDLE_ID_BASE
772MACOSX_BUNDLE_NAME_BASE
773COMPANY_NAME
774JDK_RC_PLATFORM_NAME
775PRODUCT_SUFFIX
776PRODUCT_NAME
777LAUNCHER_NAME
778MILESTONE
779JDK_BUILD_NUMBER
780JDK_UPDATE_VERSION
781JDK_MICRO_VERSION
782JDK_MINOR_VERSION
783JDK_MAJOR_VERSION
784USER_RELEASE_SUFFIX
785COMPRESS_JARS
786UNLIMITED_CRYPTO
787CACERTS_FILE
788TEST_IN_BUILD
789BUILD_HEADLESS
790SUPPORT_HEADFUL
791SUPPORT_HEADLESS
792BDEPS_FTP
793BDEPS_UNZIP
794OS_VERSION_MICRO
795OS_VERSION_MINOR
796OS_VERSION_MAJOR
797PKG_CONFIG
798XATTR
799TIME
800STAT
801HG
802READELF
803OTOOL
804LDD
805ZIP
806UNZIP
807FIND_DELETE
808MAKE
809CHECK_TOOLSDIR_MAKE
810CHECK_TOOLSDIR_GMAKE
811CHECK_MAKE
812CHECK_GMAKE
813PKGHANDLER
814OUTPUT_ROOT
815CONF_NAME
816SPEC
817BUILD_VARIANT_RELEASE
818DEBUG_CLASSFILES
819FASTDEBUG
820VARIANT
821DEBUG_LEVEL
822MACOSX_UNIVERSAL
823INCLUDE_SA
824JVM_VARIANT_ZEROSHARK
825JVM_VARIANT_ZERO
826JVM_VARIANT_KERNEL
827JVM_VARIANT_MINIMAL1
828JVM_VARIANT_CLIENT
829JVM_VARIANT_SERVER
830JVM_VARIANTS
831JDK_VARIANT
832SET_OPENJDK
833BUILD_LOG_WRAPPER
834BUILD_LOG_PREVIOUS
835BUILD_LOG
836SYS_ROOT
837PATH_SEP
838SRC_ROOT
839ZERO_ARCHDEF
840DEFINE_CROSS_COMPILE_ARCH
841LP64
842OPENJDK_TARGET_OS_API_DIR
843OPENJDK_TARGET_CPU_JLI_CFLAGS
844OPENJDK_TARGET_CPU_OSARCH
845OPENJDK_TARGET_CPU_ISADIR
846OPENJDK_TARGET_CPU_LIBDIR
847OPENJDK_TARGET_CPU_LEGACY_LIB
848OPENJDK_TARGET_CPU_LEGACY
849REQUIRED_OS_VERSION
850REQUIRED_OS_NAME
851COMPILE_TYPE
852OPENJDK_TARGET_CPU_ENDIAN
853OPENJDK_TARGET_CPU_BITS
854OPENJDK_TARGET_CPU_ARCH
855OPENJDK_TARGET_CPU
856OPENJDK_TARGET_OS_API
857OPENJDK_TARGET_OS
858OPENJDK_BUILD_CPU_ENDIAN
859OPENJDK_BUILD_CPU_BITS
860OPENJDK_BUILD_CPU_ARCH
861OPENJDK_BUILD_CPU
862OPENJDK_BUILD_OS_API
863OPENJDK_BUILD_OS
864OPENJDK_BUILD_AUTOCONF_NAME
865OPENJDK_TARGET_AUTOCONF_NAME
866target_os
867target_vendor
868target_cpu
869target
870host_os
871host_vendor
872host_cpu
873host
874build_os
875build_vendor
876build_cpu
877build
878SETFILE
879DF
880READLINK
881CYGPATH
882NAWK
883SED
884FGREP
885EGREP
886GREP
887AWK
888XARGS
889WHICH
890WC
891UNIQ
892UNAME
893TR
894TOUCH
895TEE
896TAR
897TAIL
898SORT
899SH
900RM
901THEPWDCMD
902PRINTF
903MV
904MKTEMP
905MKDIR
906LS
907LN
908HEAD
909FIND
910FILE
911EXPR
912ECHO
913DIRNAME
914DIFF
915DATE
916CUT
917CPIO
918CP
919COMM
920CMP
921CHMOD
922CAT
923BASH
924BASENAME
925DATE_WHEN_CONFIGURED
926CONFIGURE_COMMAND_LINE
927CUSTOM_MAKE_DIR
928target_alias
929host_alias
930build_alias
931LIBS
932ECHO_T
933ECHO_N
934ECHO_C
935DEFS
936mandir
937localedir
938libdir
939psdir
940pdfdir
941dvidir
942htmldir
943infodir
944docdir
945oldincludedir
946includedir
947localstatedir
948sharedstatedir
949sysconfdir
950datadir
951datarootdir
952libexecdir
953sbindir
954bindir
955program_transform_name
956prefix
957exec_prefix
958PACKAGE_URL
959PACKAGE_BUGREPORT
960PACKAGE_STRING
961PACKAGE_VERSION
962PACKAGE_TARNAME
963PACKAGE_NAME
964PATH_SEPARATOR
965SHELL'
966ac_subst_files=''
967ac_user_opts='
968enable_option_checking
969with_custom_make_dir
970with_target_bits
971with_sys_root
972with_tools_dir
973with_devkit
974enable_openjdk_only
975with_jdk_variant
976with_jvm_variants
977enable_debug
978with_debug_level
979with_conf_name
980with_builddeps_conf
981with_builddeps_server
982with_builddeps_dir
983with_builddeps_group
984enable_headful
985enable_hotspot_test_in_build
986with_cacerts_file
987enable_unlimited_crypto
988with_milestone
989with_build_number
990with_user_release_suffix
991with_boot_jdk
992with_boot_jdk_jvmargs
993with_add_source_root
994with_override_source_root
995with_adds_and_overrides
996with_override_langtools
997with_override_corba
998with_override_jaxp
999with_override_jaxws
1000with_override_hotspot
1001with_override_jdk
1002with_import_hotspot
1003with_msvcr_dll
1004with_dxsdk
1005with_dxsdk_lib
1006with_dxsdk_include
1007with_extra_cflags
1008with_extra_cxxflags
1009with_extra_ldflags
1010enable_debug_symbols
1011enable_zip_debug_info
1012enable_macosx_runtime_support
1013with_x
1014with_cups
1015with_cups_include
1016with_freetype
1017with_alsa
1018with_alsa_include
1019with_alsa_lib
1020with_giflib
1021with_zlib
1022with_stdc__lib
1023with_num_cores
1024with_memory_size
1025with_jobs
1026with_sjavac_server_java
1027with_sjavac_server_cores
1028enable_sjavac
1029enable_precompiled_headers
1030enable_ccache
1031with_ccache_dir
1032'
1033      ac_precious_vars='build_alias
1034host_alias
1035target_alias
1036PKG_CONFIG
1037CC
1038CFLAGS
1039LDFLAGS
1040LIBS
1041CPPFLAGS
1042CXX
1043CXXFLAGS
1044CCC
1045OBJC
1046OBJCFLAGS
1047CPP
1048CXXCPP
1049XMKMF
1050FREETYPE2_CFLAGS
1051FREETYPE2_LIBS
1052ALSA_CFLAGS
1053ALSA_LIBS
1054LIBFFI_CFLAGS
1055LIBFFI_LIBS'
1056
1057
1058# Initialize some variables set by options.
1059ac_init_help=
1060ac_init_version=false
1061ac_unrecognized_opts=
1062ac_unrecognized_sep=
1063# The variables have the same names as the options, with
1064# dashes changed to underlines.
1065cache_file=/dev/null
1066exec_prefix=NONE
1067no_create=
1068no_recursion=
1069prefix=NONE
1070program_prefix=NONE
1071program_suffix=NONE
1072program_transform_name=s,x,x,
1073silent=
1074site=
1075srcdir=
1076verbose=
1077x_includes=NONE
1078x_libraries=NONE
1079
1080# Installation directory options.
1081# These are left unexpanded so users can "make install exec_prefix=/foo"
1082# and all the variables that are supposed to be based on exec_prefix
1083# by default will actually change.
1084# Use braces instead of parens because sh, perl, etc. also accept them.
1085# (The list follows the same order as the GNU Coding Standards.)
1086bindir='${exec_prefix}/bin'
1087sbindir='${exec_prefix}/sbin'
1088libexecdir='${exec_prefix}/libexec'
1089datarootdir='${prefix}/share'
1090datadir='${datarootdir}'
1091sysconfdir='${prefix}/etc'
1092sharedstatedir='${prefix}/com'
1093localstatedir='${prefix}/var'
1094includedir='${prefix}/include'
1095oldincludedir='/usr/include'
1096docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1097infodir='${datarootdir}/info'
1098htmldir='${docdir}'
1099dvidir='${docdir}'
1100pdfdir='${docdir}'
1101psdir='${docdir}'
1102libdir='${exec_prefix}/lib'
1103localedir='${datarootdir}/locale'
1104mandir='${datarootdir}/man'
1105
1106ac_prev=
1107ac_dashdash=
1108for ac_option
1109do
1110  # If the previous option needs an argument, assign it.
1111  if test -n "$ac_prev"; then
1112    eval $ac_prev=\$ac_option
1113    ac_prev=
1114    continue
1115  fi
1116
1117  case $ac_option in
1118  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1119  *=)   ac_optarg= ;;
1120  *)    ac_optarg=yes ;;
1121  esac
1122
1123  # Accept the important Cygnus configure options, so we can diagnose typos.
1124
1125  case $ac_dashdash$ac_option in
1126  --)
1127    ac_dashdash=yes ;;
1128
1129  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1130    ac_prev=bindir ;;
1131  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1132    bindir=$ac_optarg ;;
1133
1134  -build | --build | --buil | --bui | --bu)
1135    ac_prev=build_alias ;;
1136  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1137    build_alias=$ac_optarg ;;
1138
1139  -cache-file | --cache-file | --cache-fil | --cache-fi \
1140  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1141    ac_prev=cache_file ;;
1142  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1143  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1144    cache_file=$ac_optarg ;;
1145
1146  --config-cache | -C)
1147    cache_file=config.cache ;;
1148
1149  -datadir | --datadir | --datadi | --datad)
1150    ac_prev=datadir ;;
1151  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1152    datadir=$ac_optarg ;;
1153
1154  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1155  | --dataroo | --dataro | --datar)
1156    ac_prev=datarootdir ;;
1157  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1158  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1159    datarootdir=$ac_optarg ;;
1160
1161  -disable-* | --disable-*)
1162    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1163    # Reject names that are not valid shell variable names.
1164    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1165      as_fn_error $? "invalid feature name: $ac_useropt"
1166    ac_useropt_orig=$ac_useropt
1167    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1168    case $ac_user_opts in
1169      *"
1170"enable_$ac_useropt"
1171"*) ;;
1172      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1173	 ac_unrecognized_sep=', ';;
1174    esac
1175    eval enable_$ac_useropt=no ;;
1176
1177  -docdir | --docdir | --docdi | --doc | --do)
1178    ac_prev=docdir ;;
1179  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1180    docdir=$ac_optarg ;;
1181
1182  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1183    ac_prev=dvidir ;;
1184  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1185    dvidir=$ac_optarg ;;
1186
1187  -enable-* | --enable-*)
1188    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1189    # Reject names that are not valid shell variable names.
1190    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1191      as_fn_error $? "invalid feature name: $ac_useropt"
1192    ac_useropt_orig=$ac_useropt
1193    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1194    case $ac_user_opts in
1195      *"
1196"enable_$ac_useropt"
1197"*) ;;
1198      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1199	 ac_unrecognized_sep=', ';;
1200    esac
1201    eval enable_$ac_useropt=\$ac_optarg ;;
1202
1203  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1204  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1205  | --exec | --exe | --ex)
1206    ac_prev=exec_prefix ;;
1207  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1208  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1209  | --exec=* | --exe=* | --ex=*)
1210    exec_prefix=$ac_optarg ;;
1211
1212  -gas | --gas | --ga | --g)
1213    # Obsolete; use --with-gas.
1214    with_gas=yes ;;
1215
1216  -help | --help | --hel | --he | -h)
1217    ac_init_help=long ;;
1218  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1219    ac_init_help=recursive ;;
1220  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1221    ac_init_help=short ;;
1222
1223  -host | --host | --hos | --ho)
1224    ac_prev=host_alias ;;
1225  -host=* | --host=* | --hos=* | --ho=*)
1226    host_alias=$ac_optarg ;;
1227
1228  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1229    ac_prev=htmldir ;;
1230  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1231  | --ht=*)
1232    htmldir=$ac_optarg ;;
1233
1234  -includedir | --includedir | --includedi | --included | --include \
1235  | --includ | --inclu | --incl | --inc)
1236    ac_prev=includedir ;;
1237  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1238  | --includ=* | --inclu=* | --incl=* | --inc=*)
1239    includedir=$ac_optarg ;;
1240
1241  -infodir | --infodir | --infodi | --infod | --info | --inf)
1242    ac_prev=infodir ;;
1243  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1244    infodir=$ac_optarg ;;
1245
1246  -libdir | --libdir | --libdi | --libd)
1247    ac_prev=libdir ;;
1248  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1249    libdir=$ac_optarg ;;
1250
1251  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1252  | --libexe | --libex | --libe)
1253    ac_prev=libexecdir ;;
1254  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1255  | --libexe=* | --libex=* | --libe=*)
1256    libexecdir=$ac_optarg ;;
1257
1258  -localedir | --localedir | --localedi | --localed | --locale)
1259    ac_prev=localedir ;;
1260  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1261    localedir=$ac_optarg ;;
1262
1263  -localstatedir | --localstatedir | --localstatedi | --localstated \
1264  | --localstate | --localstat | --localsta | --localst | --locals)
1265    ac_prev=localstatedir ;;
1266  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1267  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1268    localstatedir=$ac_optarg ;;
1269
1270  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1271    ac_prev=mandir ;;
1272  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1273    mandir=$ac_optarg ;;
1274
1275  -nfp | --nfp | --nf)
1276    # Obsolete; use --without-fp.
1277    with_fp=no ;;
1278
1279  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1280  | --no-cr | --no-c | -n)
1281    no_create=yes ;;
1282
1283  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1284  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1285    no_recursion=yes ;;
1286
1287  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1288  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1289  | --oldin | --oldi | --old | --ol | --o)
1290    ac_prev=oldincludedir ;;
1291  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1292  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1293  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1294    oldincludedir=$ac_optarg ;;
1295
1296  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1297    ac_prev=prefix ;;
1298  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1299    prefix=$ac_optarg ;;
1300
1301  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1302  | --program-pre | --program-pr | --program-p)
1303    ac_prev=program_prefix ;;
1304  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1305  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1306    program_prefix=$ac_optarg ;;
1307
1308  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1309  | --program-suf | --program-su | --program-s)
1310    ac_prev=program_suffix ;;
1311  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1312  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1313    program_suffix=$ac_optarg ;;
1314
1315  -program-transform-name | --program-transform-name \
1316  | --program-transform-nam | --program-transform-na \
1317  | --program-transform-n | --program-transform- \
1318  | --program-transform | --program-transfor \
1319  | --program-transfo | --program-transf \
1320  | --program-trans | --program-tran \
1321  | --progr-tra | --program-tr | --program-t)
1322    ac_prev=program_transform_name ;;
1323  -program-transform-name=* | --program-transform-name=* \
1324  | --program-transform-nam=* | --program-transform-na=* \
1325  | --program-transform-n=* | --program-transform-=* \
1326  | --program-transform=* | --program-transfor=* \
1327  | --program-transfo=* | --program-transf=* \
1328  | --program-trans=* | --program-tran=* \
1329  | --progr-tra=* | --program-tr=* | --program-t=*)
1330    program_transform_name=$ac_optarg ;;
1331
1332  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1333    ac_prev=pdfdir ;;
1334  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1335    pdfdir=$ac_optarg ;;
1336
1337  -psdir | --psdir | --psdi | --psd | --ps)
1338    ac_prev=psdir ;;
1339  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1340    psdir=$ac_optarg ;;
1341
1342  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1343  | -silent | --silent | --silen | --sile | --sil)
1344    silent=yes ;;
1345
1346  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1347    ac_prev=sbindir ;;
1348  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1349  | --sbi=* | --sb=*)
1350    sbindir=$ac_optarg ;;
1351
1352  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1353  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1354  | --sharedst | --shareds | --shared | --share | --shar \
1355  | --sha | --sh)
1356    ac_prev=sharedstatedir ;;
1357  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1358  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1359  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1360  | --sha=* | --sh=*)
1361    sharedstatedir=$ac_optarg ;;
1362
1363  -site | --site | --sit)
1364    ac_prev=site ;;
1365  -site=* | --site=* | --sit=*)
1366    site=$ac_optarg ;;
1367
1368  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1369    ac_prev=srcdir ;;
1370  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1371    srcdir=$ac_optarg ;;
1372
1373  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1374  | --syscon | --sysco | --sysc | --sys | --sy)
1375    ac_prev=sysconfdir ;;
1376  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1377  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1378    sysconfdir=$ac_optarg ;;
1379
1380  -target | --target | --targe | --targ | --tar | --ta | --t)
1381    ac_prev=target_alias ;;
1382  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1383    target_alias=$ac_optarg ;;
1384
1385  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1386    verbose=yes ;;
1387
1388  -version | --version | --versio | --versi | --vers | -V)
1389    ac_init_version=: ;;
1390
1391  -with-* | --with-*)
1392    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1393    # Reject names that are not valid shell variable names.
1394    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1395      as_fn_error $? "invalid package name: $ac_useropt"
1396    ac_useropt_orig=$ac_useropt
1397    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1398    case $ac_user_opts in
1399      *"
1400"with_$ac_useropt"
1401"*) ;;
1402      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1403	 ac_unrecognized_sep=', ';;
1404    esac
1405    eval with_$ac_useropt=\$ac_optarg ;;
1406
1407  -without-* | --without-*)
1408    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1409    # Reject names that are not valid shell variable names.
1410    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1411      as_fn_error $? "invalid package name: $ac_useropt"
1412    ac_useropt_orig=$ac_useropt
1413    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1414    case $ac_user_opts in
1415      *"
1416"with_$ac_useropt"
1417"*) ;;
1418      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1419	 ac_unrecognized_sep=', ';;
1420    esac
1421    eval with_$ac_useropt=no ;;
1422
1423  --x)
1424    # Obsolete; use --with-x.
1425    with_x=yes ;;
1426
1427  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1428  | --x-incl | --x-inc | --x-in | --x-i)
1429    ac_prev=x_includes ;;
1430  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1431  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1432    x_includes=$ac_optarg ;;
1433
1434  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1435  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1436    ac_prev=x_libraries ;;
1437  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1438  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1439    x_libraries=$ac_optarg ;;
1440
1441  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1442Try \`$0 --help' for more information"
1443    ;;
1444
1445  *=*)
1446    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1447    # Reject names that are not valid shell variable names.
1448    case $ac_envvar in #(
1449      '' | [0-9]* | *[!_$as_cr_alnum]* )
1450      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1451    esac
1452    eval $ac_envvar=\$ac_optarg
1453    export $ac_envvar ;;
1454
1455  *)
1456    # FIXME: should be removed in autoconf 3.0.
1457    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1458    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1459      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1460    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1461    ;;
1462
1463  esac
1464done
1465
1466if test -n "$ac_prev"; then
1467  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1468  as_fn_error $? "missing argument to $ac_option"
1469fi
1470
1471if test -n "$ac_unrecognized_opts"; then
1472  case $enable_option_checking in
1473    no) ;;
1474    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1475    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1476  esac
1477fi
1478
1479# Check all directory arguments for consistency.
1480for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1481		datadir sysconfdir sharedstatedir localstatedir includedir \
1482		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1483		libdir localedir mandir
1484do
1485  eval ac_val=\$$ac_var
1486  # Remove trailing slashes.
1487  case $ac_val in
1488    */ )
1489      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1490      eval $ac_var=\$ac_val;;
1491  esac
1492  # Be sure to have absolute directory names.
1493  case $ac_val in
1494    [\\/$]* | ?:[\\/]* )  continue;;
1495    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1496  esac
1497  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1498done
1499
1500# There might be people who depend on the old broken behavior: `$host'
1501# used to hold the argument of --host etc.
1502# FIXME: To remove some day.
1503build=$build_alias
1504host=$host_alias
1505target=$target_alias
1506
1507# FIXME: To remove some day.
1508if test "x$host_alias" != x; then
1509  if test "x$build_alias" = x; then
1510    cross_compiling=maybe
1511    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1512    If a cross compiler is detected then cross compile mode will be used" >&2
1513  elif test "x$build_alias" != "x$host_alias"; then
1514    cross_compiling=yes
1515  fi
1516fi
1517
1518ac_tool_prefix=
1519test -n "$host_alias" && ac_tool_prefix=$host_alias-
1520
1521test "$silent" = yes && exec 6>/dev/null
1522
1523
1524ac_pwd=`pwd` && test -n "$ac_pwd" &&
1525ac_ls_di=`ls -di .` &&
1526ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1527  as_fn_error $? "working directory cannot be determined"
1528test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1529  as_fn_error $? "pwd does not report name of working directory"
1530
1531
1532# Find the source files, if location was not specified.
1533if test -z "$srcdir"; then
1534  ac_srcdir_defaulted=yes
1535  # Try the directory containing this script, then the parent directory.
1536  ac_confdir=`$as_dirname -- "$as_myself" ||
1537$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1538	 X"$as_myself" : 'X\(//\)[^/]' \| \
1539	 X"$as_myself" : 'X\(//\)$' \| \
1540	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1541$as_echo X"$as_myself" |
1542    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1543	    s//\1/
1544	    q
1545	  }
1546	  /^X\(\/\/\)[^/].*/{
1547	    s//\1/
1548	    q
1549	  }
1550	  /^X\(\/\/\)$/{
1551	    s//\1/
1552	    q
1553	  }
1554	  /^X\(\/\).*/{
1555	    s//\1/
1556	    q
1557	  }
1558	  s/.*/./; q'`
1559  srcdir=$ac_confdir
1560  if test ! -r "$srcdir/$ac_unique_file"; then
1561    srcdir=..
1562  fi
1563else
1564  ac_srcdir_defaulted=no
1565fi
1566if test ! -r "$srcdir/$ac_unique_file"; then
1567  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1568  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1569fi
1570ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1571ac_abs_confdir=`(
1572	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1573	pwd)`
1574# When building in place, set srcdir=.
1575if test "$ac_abs_confdir" = "$ac_pwd"; then
1576  srcdir=.
1577fi
1578# Remove unnecessary trailing slashes from srcdir.
1579# Double slashes in file names in object file debugging info
1580# mess up M-x gdb in Emacs.
1581case $srcdir in
1582*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1583esac
1584for ac_var in $ac_precious_vars; do
1585  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1586  eval ac_env_${ac_var}_value=\$${ac_var}
1587  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1588  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1589done
1590
1591#
1592# Report the --help message.
1593#
1594if test "$ac_init_help" = "long"; then
1595  # Omit some internal or obsolete options to make the list less imposing.
1596  # This message is too long to be a string in the A/UX 3.1 sh.
1597  cat <<_ACEOF
1598\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1599
1600Usage: $0 [OPTION]... [VAR=VALUE]...
1601
1602To assign environment variables (e.g., CC, CFLAGS...), specify them as
1603VAR=VALUE.  See below for descriptions of some of the useful variables.
1604
1605Defaults for the options are specified in brackets.
1606
1607Configuration:
1608  -h, --help              display this help and exit
1609      --help=short        display options specific to this package
1610      --help=recursive    display the short help of all the included packages
1611  -V, --version           display version information and exit
1612  -q, --quiet, --silent   do not print \`checking ...' messages
1613      --cache-file=FILE   cache test results in FILE [disabled]
1614  -C, --config-cache      alias for \`--cache-file=config.cache'
1615  -n, --no-create         do not create output files
1616      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1617
1618Installation directories:
1619  --prefix=PREFIX         install architecture-independent files in PREFIX
1620                          [$ac_default_prefix]
1621  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1622                          [PREFIX]
1623
1624By default, \`make install' will install all the files in
1625\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1626an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1627for instance \`--prefix=\$HOME'.
1628
1629For better control, use the options below.
1630
1631Fine tuning of the installation directories:
1632  --bindir=DIR            user executables [EPREFIX/bin]
1633  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1634  --libexecdir=DIR        program executables [EPREFIX/libexec]
1635  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1636  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1637  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1638  --libdir=DIR            object code libraries [EPREFIX/lib]
1639  --includedir=DIR        C header files [PREFIX/include]
1640  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1641  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1642  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1643  --infodir=DIR           info documentation [DATAROOTDIR/info]
1644  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1645  --mandir=DIR            man documentation [DATAROOTDIR/man]
1646  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1647  --htmldir=DIR           html documentation [DOCDIR]
1648  --dvidir=DIR            dvi documentation [DOCDIR]
1649  --pdfdir=DIR            pdf documentation [DOCDIR]
1650  --psdir=DIR             ps documentation [DOCDIR]
1651_ACEOF
1652
1653  cat <<\_ACEOF
1654
1655X features:
1656  --x-includes=DIR    X include files are in DIR
1657  --x-libraries=DIR   X library files are in DIR
1658
1659System types:
1660  --build=BUILD     configure for building on BUILD [guessed]
1661  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1662  --target=TARGET   configure for building compilers for TARGET [HOST]
1663_ACEOF
1664fi
1665
1666if test -n "$ac_init_help"; then
1667  case $ac_init_help in
1668     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1669   esac
1670  cat <<\_ACEOF
1671
1672Optional Features:
1673  --disable-option-checking  ignore unrecognized --enable/--with options
1674  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1675  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1676  --enable-openjdk-only   suppress building custom source even if present
1677                          [disabled]
1678  --enable-debug          set the debug level to fastdebug (shorthand for
1679                          --with-debug-level=fastdebug) [disabled]
1680  --disable-headful       disable building headful support (graphical UI
1681                          support) [enabled]
1682  --enable-hotspot-test-in-build
1683                          run the Queens test after Hotspot build [disabled]
1684  --enable-unlimited-crypto
1685                          Enable unlimited crypto policy [disabled]
1686  --disable-debug-symbols disable generation of debug symbols [enabled]
1687  --disable-zip-debug-info
1688                          disable zipping of debug-info files [enabled]
1689  --disable-macosx-runtime-support
1690                          disable the use of MacOSX Java runtime support
1691                          framework [enabled]
1692  --enable-sjavac         use sjavac to do fast incremental compiles
1693                          [disabled]
1694  --disable-precompiled-headers
1695                          disable using precompiled headers when compiling C++
1696                          [enabled]
1697  --disable-ccache        disable using ccache to speed up recompilations
1698                          [enabled]
1699
1700Optional Packages:
1701  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1702  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1703  --with-custom-make-dir  use this directory for custom build/make files
1704  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1705                          support it), e.g. --with-target-bits=32 [guessed]
1706  --with-sys-root         pass this sys-root to the compilers and tools (for
1707                          cross-compiling)
1708  --with-tools-dir        search this directory for compilers and tools (for
1709                          cross-compiling)
1710  --with-devkit           use this directory as base for tools-dir and
1711                          sys-root (for cross-compiling)
1712  --with-jdk-variant      JDK variant to build (normal) [normal]
1713  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1714                          client, minimal1, kernel, zero, zeroshark) [server]
1715  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1716                          [release]
1717  --with-conf-name        use this as the name of the configuration [generated
1718                          from important configuration options]
1719  --with-builddeps-conf   use this configuration file for the builddeps
1720  --with-builddeps-server download and use build dependencies from this server
1721                          url
1722  --with-builddeps-dir    store downloaded build dependencies here
1723                          [/localhome/builddeps]
1724  --with-builddeps-group  chgrp the downloaded build dependencies to this
1725                          group
1726  --with-cacerts-file     specify alternative cacerts file
1727  --with-milestone        Set milestone value for build [internal]
1728  --with-build-number     Set build number value for build [b00]
1729  --with-user-release-suffix
1730                          Add a custom string to the version string if build
1731                          number isn't set.[username_builddateb00]
1732  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1733  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1734                          invocations of the Boot JDK, overriding the default
1735                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1736                          -enableassertions"
1737  --with-add-source-root  for each and every source directory, look in this
1738                          additional source root for the same directory; if it
1739                          exists and have files in it, include it in the build
1740  --with-override-source-root
1741                          for each and every source directory, look in this
1742                          override source root for the same directory; if it
1743                          exists, use that directory instead and ignore the
1744                          directory in the original source root
1745  --with-adds-and-overrides
1746                          use the subdirs 'adds' and 'overrides' in the
1747                          specified directory as add-source-root and
1748                          override-source-root
1749  --with-override-langtools
1750                          use this langtools dir for the build
1751  --with-override-corba   use this corba dir for the build
1752  --with-override-jaxp    use this jaxp dir for the build
1753  --with-override-jaxws   use this jaxws dir for the build
1754  --with-override-hotspot use this hotspot dir for the build
1755  --with-override-jdk     use this jdk dir for the build
1756  --with-import-hotspot   import hotspot binaries from this jdk image or
1757                          hotspot build dist dir instead of building from
1758                          source
1759  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1760                          only) [probed]
1761  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1762  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1763                          [probed]
1764  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1765                          [probed]
1766  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1767  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1768  --with-extra-ldflags    extra flags to be used when linking jdk
1769  --with-x                use the X Window System
1770  --with-cups             specify prefix directory for the cups package
1771                          (expecting the headers under PATH/include)
1772  --with-cups-include     specify directory for the cups include files
1773  --with-freetype         specify prefix directory for the freetype2 package
1774                          (expecting the libraries under PATH/lib and the
1775                          headers under PATH/include)
1776  --with-alsa             specify prefix directory for the alsa package
1777                          (expecting the libraries under PATH/lib and the
1778                          headers under PATH/include)
1779  --with-alsa-include     specify directory for the alsa include files
1780  --with-alsa-lib         specify directory for the alsa library
1781  --with-giflib           use giflib from build system or OpenJDK source
1782                          (system, bundled) [bundled]
1783  --with-zlib             use zlib from build system or OpenJDK source
1784                          (system, bundled) [bundled]
1785  --with-stdc++lib=<static>,<dynamic>,<default>
1786                          force linking of the C++ runtime on Linux to either
1787                          static or dynamic, default is static with dynamic as
1788                          fallback
1789  --with-num-cores        number of cores in the build system, e.g.
1790                          --with-num-cores=8 [probed]
1791  --with-memory-size      memory (in MB) available in the build system, e.g.
1792                          --with-memory-size=1024 [probed]
1793  --with-jobs             number of parallel jobs to let make run [calculated
1794                          based on cores and memory]
1795  --with-sjavac-server-java
1796                          use this java binary for running the sjavac
1797                          background server [Boot JDK java]
1798  --with-sjavac-server-cores
1799                          use at most this number of concurrent threads on the
1800                          sjavac server [probed]
1801  --with-ccache-dir       where to store ccache files [~/.ccache]
1802
1803Some influential environment variables:
1804  PKG_CONFIG  path to pkg-config utility
1805  CC          C compiler command
1806  CFLAGS      C compiler flags
1807  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1808              nonstandard directory <lib dir>
1809  LIBS        libraries to pass to the linker, e.g. -l<library>
1810  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1811              you have headers in a nonstandard directory <include dir>
1812  CXX         C++ compiler command
1813  CXXFLAGS    C++ compiler flags
1814  OBJC        Objective C compiler command
1815  OBJCFLAGS   Objective C compiler flags
1816  CPP         C preprocessor
1817  CXXCPP      C++ preprocessor
1818  XMKMF       Path to xmkmf, Makefile generator for X Window System
1819  FREETYPE2_CFLAGS
1820              C compiler flags for FREETYPE2, overriding pkg-config
1821  FREETYPE2_LIBS
1822              linker flags for FREETYPE2, overriding pkg-config
1823  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1824  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1825  LIBFFI_CFLAGS
1826              C compiler flags for LIBFFI, overriding pkg-config
1827  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1828
1829Use these variables to override the choices made by `configure' or to help
1830it to find libraries and programs with nonstandard names/locations.
1831
1832Report bugs to <build-dev@openjdk.java.net>.
1833OpenJDK home page: <http://openjdk.java.net>.
1834_ACEOF
1835ac_status=$?
1836fi
1837
1838if test "$ac_init_help" = "recursive"; then
1839  # If there are subdirs, report their specific --help.
1840  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1841    test -d "$ac_dir" ||
1842      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1843      continue
1844    ac_builddir=.
1845
1846case "$ac_dir" in
1847.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1848*)
1849  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1850  # A ".." for each directory in $ac_dir_suffix.
1851  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1852  case $ac_top_builddir_sub in
1853  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1854  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1855  esac ;;
1856esac
1857ac_abs_top_builddir=$ac_pwd
1858ac_abs_builddir=$ac_pwd$ac_dir_suffix
1859# for backward compatibility:
1860ac_top_builddir=$ac_top_build_prefix
1861
1862case $srcdir in
1863  .)  # We are building in place.
1864    ac_srcdir=.
1865    ac_top_srcdir=$ac_top_builddir_sub
1866    ac_abs_top_srcdir=$ac_pwd ;;
1867  [\\/]* | ?:[\\/]* )  # Absolute name.
1868    ac_srcdir=$srcdir$ac_dir_suffix;
1869    ac_top_srcdir=$srcdir
1870    ac_abs_top_srcdir=$srcdir ;;
1871  *) # Relative name.
1872    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1873    ac_top_srcdir=$ac_top_build_prefix$srcdir
1874    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1875esac
1876ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1877
1878    cd "$ac_dir" || { ac_status=$?; continue; }
1879    # Check for guested configure.
1880    if test -f "$ac_srcdir/configure.gnu"; then
1881      echo &&
1882      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1883    elif test -f "$ac_srcdir/configure"; then
1884      echo &&
1885      $SHELL "$ac_srcdir/configure" --help=recursive
1886    else
1887      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1888    fi || ac_status=$?
1889    cd "$ac_pwd" || { ac_status=$?; break; }
1890  done
1891fi
1892
1893test -n "$ac_init_help" && exit $ac_status
1894if $ac_init_version; then
1895  cat <<\_ACEOF
1896OpenJDK configure jdk8
1897generated by GNU Autoconf 2.67
1898
1899Copyright (C) 2010 Free Software Foundation, Inc.
1900This configure script is free software; the Free Software Foundation
1901gives unlimited permission to copy, distribute and modify it.
1902_ACEOF
1903  exit
1904fi
1905
1906## ------------------------ ##
1907## Autoconf initialization. ##
1908## ------------------------ ##
1909
1910# ac_fn_c_try_compile LINENO
1911# --------------------------
1912# Try to compile conftest.$ac_ext, and return whether this succeeded.
1913ac_fn_c_try_compile ()
1914{
1915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1916  rm -f conftest.$ac_objext
1917  if { { ac_try="$ac_compile"
1918case "(($ac_try" in
1919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1920  *) ac_try_echo=$ac_try;;
1921esac
1922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1923$as_echo "$ac_try_echo"; } >&5
1924  (eval "$ac_compile") 2>conftest.err
1925  ac_status=$?
1926  if test -s conftest.err; then
1927    grep -v '^ *+' conftest.err >conftest.er1
1928    cat conftest.er1 >&5
1929    mv -f conftest.er1 conftest.err
1930  fi
1931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932  test $ac_status = 0; } && {
1933	 test -z "$ac_c_werror_flag" ||
1934	 test ! -s conftest.err
1935       } && test -s conftest.$ac_objext; then :
1936  ac_retval=0
1937else
1938  $as_echo "$as_me: failed program was:" >&5
1939sed 's/^/| /' conftest.$ac_ext >&5
1940
1941	ac_retval=1
1942fi
1943  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1944  as_fn_set_status $ac_retval
1945
1946} # ac_fn_c_try_compile
1947
1948# ac_fn_cxx_try_compile LINENO
1949# ----------------------------
1950# Try to compile conftest.$ac_ext, and return whether this succeeded.
1951ac_fn_cxx_try_compile ()
1952{
1953  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954  rm -f conftest.$ac_objext
1955  if { { ac_try="$ac_compile"
1956case "(($ac_try" in
1957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958  *) ac_try_echo=$ac_try;;
1959esac
1960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961$as_echo "$ac_try_echo"; } >&5
1962  (eval "$ac_compile") 2>conftest.err
1963  ac_status=$?
1964  if test -s conftest.err; then
1965    grep -v '^ *+' conftest.err >conftest.er1
1966    cat conftest.er1 >&5
1967    mv -f conftest.er1 conftest.err
1968  fi
1969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1970  test $ac_status = 0; } && {
1971	 test -z "$ac_cxx_werror_flag" ||
1972	 test ! -s conftest.err
1973       } && test -s conftest.$ac_objext; then :
1974  ac_retval=0
1975else
1976  $as_echo "$as_me: failed program was:" >&5
1977sed 's/^/| /' conftest.$ac_ext >&5
1978
1979	ac_retval=1
1980fi
1981  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1982  as_fn_set_status $ac_retval
1983
1984} # ac_fn_cxx_try_compile
1985
1986# ac_fn_objc_try_compile LINENO
1987# -----------------------------
1988# Try to compile conftest.$ac_ext, and return whether this succeeded.
1989ac_fn_objc_try_compile ()
1990{
1991  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992  rm -f conftest.$ac_objext
1993  if { { ac_try="$ac_compile"
1994case "(($ac_try" in
1995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1996  *) ac_try_echo=$ac_try;;
1997esac
1998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1999$as_echo "$ac_try_echo"; } >&5
2000  (eval "$ac_compile") 2>conftest.err
2001  ac_status=$?
2002  if test -s conftest.err; then
2003    grep -v '^ *+' conftest.err >conftest.er1
2004    cat conftest.er1 >&5
2005    mv -f conftest.er1 conftest.err
2006  fi
2007  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2008  test $ac_status = 0; } && {
2009	 test -z "$ac_objc_werror_flag" ||
2010	 test ! -s conftest.err
2011       } && test -s conftest.$ac_objext; then :
2012  ac_retval=0
2013else
2014  $as_echo "$as_me: failed program was:" >&5
2015sed 's/^/| /' conftest.$ac_ext >&5
2016
2017	ac_retval=1
2018fi
2019  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2020  as_fn_set_status $ac_retval
2021
2022} # ac_fn_objc_try_compile
2023
2024# ac_fn_c_try_cpp LINENO
2025# ----------------------
2026# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2027ac_fn_c_try_cpp ()
2028{
2029  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030  if { { ac_try="$ac_cpp conftest.$ac_ext"
2031case "(($ac_try" in
2032  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2033  *) ac_try_echo=$ac_try;;
2034esac
2035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2036$as_echo "$ac_try_echo"; } >&5
2037  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2038  ac_status=$?
2039  if test -s conftest.err; then
2040    grep -v '^ *+' conftest.err >conftest.er1
2041    cat conftest.er1 >&5
2042    mv -f conftest.er1 conftest.err
2043  fi
2044  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2045  test $ac_status = 0; } > conftest.i && {
2046	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2047	 test ! -s conftest.err
2048       }; then :
2049  ac_retval=0
2050else
2051  $as_echo "$as_me: failed program was:" >&5
2052sed 's/^/| /' conftest.$ac_ext >&5
2053
2054    ac_retval=1
2055fi
2056  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2057  as_fn_set_status $ac_retval
2058
2059} # ac_fn_c_try_cpp
2060
2061# ac_fn_cxx_try_cpp LINENO
2062# ------------------------
2063# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2064ac_fn_cxx_try_cpp ()
2065{
2066  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2067  if { { ac_try="$ac_cpp conftest.$ac_ext"
2068case "(($ac_try" in
2069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2070  *) ac_try_echo=$ac_try;;
2071esac
2072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2073$as_echo "$ac_try_echo"; } >&5
2074  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2075  ac_status=$?
2076  if test -s conftest.err; then
2077    grep -v '^ *+' conftest.err >conftest.er1
2078    cat conftest.er1 >&5
2079    mv -f conftest.er1 conftest.err
2080  fi
2081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2082  test $ac_status = 0; } > conftest.i && {
2083	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2084	 test ! -s conftest.err
2085       }; then :
2086  ac_retval=0
2087else
2088  $as_echo "$as_me: failed program was:" >&5
2089sed 's/^/| /' conftest.$ac_ext >&5
2090
2091    ac_retval=1
2092fi
2093  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2094  as_fn_set_status $ac_retval
2095
2096} # ac_fn_cxx_try_cpp
2097
2098# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2099# ---------------------------------------------------------
2100# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2101# the include files in INCLUDES and setting the cache variable VAR
2102# accordingly.
2103ac_fn_cxx_check_header_mongrel ()
2104{
2105  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2106  if eval "test \"\${$3+set}\"" = set; then :
2107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2108$as_echo_n "checking for $2... " >&6; }
2109if eval "test \"\${$3+set}\"" = set; then :
2110  $as_echo_n "(cached) " >&6
2111fi
2112eval ac_res=\$$3
2113	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114$as_echo "$ac_res" >&6; }
2115else
2116  # Is the header compilable?
2117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2118$as_echo_n "checking $2 usability... " >&6; }
2119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h.  */
2121$4
2122#include <$2>
2123_ACEOF
2124if ac_fn_cxx_try_compile "$LINENO"; then :
2125  ac_header_compiler=yes
2126else
2127  ac_header_compiler=no
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2131$as_echo "$ac_header_compiler" >&6; }
2132
2133# Is the header present?
2134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2135$as_echo_n "checking $2 presence... " >&6; }
2136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h.  */
2138#include <$2>
2139_ACEOF
2140if ac_fn_cxx_try_cpp "$LINENO"; then :
2141  ac_header_preproc=yes
2142else
2143  ac_header_preproc=no
2144fi
2145rm -f conftest.err conftest.i conftest.$ac_ext
2146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2147$as_echo "$ac_header_preproc" >&6; }
2148
2149# So?  What about this header?
2150case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2151  yes:no: )
2152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2153$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2155$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2156    ;;
2157  no:yes:* )
2158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2159$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2161$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2163$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2165$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2167$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2168( $as_echo "## ----------------------------------------- ##
2169## Report this to build-dev@openjdk.java.net ##
2170## ----------------------------------------- ##"
2171     ) | sed "s/^/$as_me: WARNING:     /" >&2
2172    ;;
2173esac
2174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
2176if eval "test \"\${$3+set}\"" = set; then :
2177  $as_echo_n "(cached) " >&6
2178else
2179  eval "$3=\$ac_header_compiler"
2180fi
2181eval ac_res=\$$3
2182	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2183$as_echo "$ac_res" >&6; }
2184fi
2185  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2186
2187} # ac_fn_cxx_check_header_mongrel
2188
2189# ac_fn_cxx_try_run LINENO
2190# ------------------------
2191# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2192# that executables *can* be run.
2193ac_fn_cxx_try_run ()
2194{
2195  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196  if { { ac_try="$ac_link"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_link") 2>&5
2204  ac_status=$?
2205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2207  { { case "(($ac_try" in
2208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209  *) ac_try_echo=$ac_try;;
2210esac
2211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212$as_echo "$ac_try_echo"; } >&5
2213  (eval "$ac_try") 2>&5
2214  ac_status=$?
2215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2216  test $ac_status = 0; }; }; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: program exited with status $ac_status" >&5
2220       $as_echo "$as_me: failed program was:" >&5
2221sed 's/^/| /' conftest.$ac_ext >&5
2222
2223       ac_retval=$ac_status
2224fi
2225  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2226  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_cxx_try_run
2230
2231# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2232# ---------------------------------------------------------
2233# Tests whether HEADER exists and can be compiled using the include files in
2234# INCLUDES, setting the cache variable VAR accordingly.
2235ac_fn_cxx_check_header_compile ()
2236{
2237  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
2240if eval "test \"\${$3+set}\"" = set; then :
2241  $as_echo_n "(cached) " >&6
2242else
2243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h.  */
2245$4
2246#include <$2>
2247_ACEOF
2248if ac_fn_cxx_try_compile "$LINENO"; then :
2249  eval "$3=yes"
2250else
2251  eval "$3=no"
2252fi
2253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2254fi
2255eval ac_res=\$$3
2256	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2257$as_echo "$ac_res" >&6; }
2258  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2259
2260} # ac_fn_cxx_check_header_compile
2261
2262# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2263# ----------------------------------------------
2264# Tries to find the compile-time value of EXPR in a program that includes
2265# INCLUDES, setting VAR accordingly. Returns whether the value could be
2266# computed
2267ac_fn_cxx_compute_int ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  if test "$cross_compiling" = yes; then
2271    # Depending upon the size, compute the lo and hi bounds.
2272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h.  */
2274$4
2275int
2276main ()
2277{
2278static int test_array [1 - 2 * !(($2) >= 0)];
2279test_array [0] = 0
2280
2281  ;
2282  return 0;
2283}
2284_ACEOF
2285if ac_fn_cxx_try_compile "$LINENO"; then :
2286  ac_lo=0 ac_mid=0
2287  while :; do
2288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h.  */
2290$4
2291int
2292main ()
2293{
2294static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2295test_array [0] = 0
2296
2297  ;
2298  return 0;
2299}
2300_ACEOF
2301if ac_fn_cxx_try_compile "$LINENO"; then :
2302  ac_hi=$ac_mid; break
2303else
2304  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2305			if test $ac_lo -le $ac_mid; then
2306			  ac_lo= ac_hi=
2307			  break
2308			fi
2309			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2310fi
2311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312  done
2313else
2314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main ()
2319{
2320static int test_array [1 - 2 * !(($2) < 0)];
2321test_array [0] = 0
2322
2323  ;
2324  return 0;
2325}
2326_ACEOF
2327if ac_fn_cxx_try_compile "$LINENO"; then :
2328  ac_hi=-1 ac_mid=-1
2329  while :; do
2330    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h.  */
2332$4
2333int
2334main ()
2335{
2336static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2337test_array [0] = 0
2338
2339  ;
2340  return 0;
2341}
2342_ACEOF
2343if ac_fn_cxx_try_compile "$LINENO"; then :
2344  ac_lo=$ac_mid; break
2345else
2346  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2347			if test $ac_mid -le $ac_hi; then
2348			  ac_lo= ac_hi=
2349			  break
2350			fi
2351			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354  done
2355else
2356  ac_lo= ac_hi=
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361# Binary search between lo and hi bounds.
2362while test "x$ac_lo" != "x$ac_hi"; do
2363  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main ()
2369{
2370static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2371test_array [0] = 0
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_hi=$ac_mid
2379else
2380  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383done
2384case $ac_lo in #((
2385?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2386'') ac_retval=1 ;;
2387esac
2388  else
2389    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h.  */
2391$4
2392static long int longval () { return $2; }
2393static unsigned long int ulongval () { return $2; }
2394#include <stdio.h>
2395#include <stdlib.h>
2396int
2397main ()
2398{
2399
2400  FILE *f = fopen ("conftest.val", "w");
2401  if (! f)
2402    return 1;
2403  if (($2) < 0)
2404    {
2405      long int i = longval ();
2406      if (i != ($2))
2407	return 1;
2408      fprintf (f, "%ld", i);
2409    }
2410  else
2411    {
2412      unsigned long int i = ulongval ();
2413      if (i != ($2))
2414	return 1;
2415      fprintf (f, "%lu", i);
2416    }
2417  /* Do not output a trailing newline, as this causes \r\n confusion
2418     on some platforms.  */
2419  return ferror (f) || fclose (f) != 0;
2420
2421  ;
2422  return 0;
2423}
2424_ACEOF
2425if ac_fn_cxx_try_run "$LINENO"; then :
2426  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2427else
2428  ac_retval=1
2429fi
2430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2431  conftest.$ac_objext conftest.beam conftest.$ac_ext
2432rm -f conftest.val
2433
2434  fi
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_compute_int
2439
2440# ac_fn_cxx_try_link LINENO
2441# -------------------------
2442# Try to link conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_cxx_try_link ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  rm -f conftest.$ac_objext conftest$ac_exeext
2447  if { { ac_try="$ac_link"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_link") 2>conftest.err
2455  ac_status=$?
2456  if test -s conftest.err; then
2457    grep -v '^ *+' conftest.err >conftest.er1
2458    cat conftest.er1 >&5
2459    mv -f conftest.er1 conftest.err
2460  fi
2461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462  test $ac_status = 0; } && {
2463	 test -z "$ac_cxx_werror_flag" ||
2464	 test ! -s conftest.err
2465       } && test -s conftest$ac_exeext && {
2466	 test "$cross_compiling" = yes ||
2467	 $as_test_x conftest$ac_exeext
2468       }; then :
2469  ac_retval=0
2470else
2471  $as_echo "$as_me: failed program was:" >&5
2472sed 's/^/| /' conftest.$ac_ext >&5
2473
2474	ac_retval=1
2475fi
2476  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2477  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2478  # interfere with the next link command; also delete a directory that is
2479  # left behind by Apple's compiler.  We do this before executing the actions.
2480  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2481  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2482  as_fn_set_status $ac_retval
2483
2484} # ac_fn_cxx_try_link
2485
2486# ac_fn_cxx_check_func LINENO FUNC VAR
2487# ------------------------------------
2488# Tests whether FUNC exists, setting the cache variable VAR accordingly
2489ac_fn_cxx_check_func ()
2490{
2491  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval "test \"\${$3+set}\"" = set; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2498/* end confdefs.h.  */
2499/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2500   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2501#define $2 innocuous_$2
2502
2503/* System header to define __stub macros and hopefully few prototypes,
2504    which can conflict with char $2 (); below.
2505    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2506    <limits.h> exists even on freestanding compilers.  */
2507
2508#ifdef __STDC__
2509# include <limits.h>
2510#else
2511# include <assert.h>
2512#endif
2513
2514#undef $2
2515
2516/* Override any GCC internal prototype to avoid an error.
2517   Use char because int might match the return type of a GCC
2518   builtin and then its argument prototype would still apply.  */
2519#ifdef __cplusplus
2520extern "C"
2521#endif
2522char $2 ();
2523/* The GNU C library defines this for functions which it implements
2524    to always fail with ENOSYS.  Some functions are actually named
2525    something starting with __ and the normal name is an alias.  */
2526#if defined __stub_$2 || defined __stub___$2
2527choke me
2528#endif
2529
2530int
2531main ()
2532{
2533return $2 ();
2534  ;
2535  return 0;
2536}
2537_ACEOF
2538if ac_fn_cxx_try_link "$LINENO"; then :
2539  eval "$3=yes"
2540else
2541  eval "$3=no"
2542fi
2543rm -f core conftest.err conftest.$ac_objext \
2544    conftest$ac_exeext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2550
2551} # ac_fn_cxx_check_func
2552
2553# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2554# -------------------------------------------------------
2555# Tests whether HEADER exists and can be compiled using the include files in
2556# INCLUDES, setting the cache variable VAR accordingly.
2557ac_fn_c_check_header_compile ()
2558{
2559  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2561$as_echo_n "checking for $2... " >&6; }
2562if eval "test \"\${$3+set}\"" = set; then :
2563  $as_echo_n "(cached) " >&6
2564else
2565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2566/* end confdefs.h.  */
2567$4
2568#include <$2>
2569_ACEOF
2570if ac_fn_c_try_compile "$LINENO"; then :
2571  eval "$3=yes"
2572else
2573  eval "$3=no"
2574fi
2575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2576fi
2577eval ac_res=\$$3
2578	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2579$as_echo "$ac_res" >&6; }
2580  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2581
2582} # ac_fn_c_check_header_compile
2583cat >config.log <<_ACEOF
2584This file contains any messages produced by compilers while
2585running configure, to aid debugging if configure makes a mistake.
2586
2587It was created by OpenJDK $as_me jdk8, which was
2588generated by GNU Autoconf 2.67.  Invocation command line was
2589
2590  $ $0 $@
2591
2592_ACEOF
2593exec 5>>config.log
2594{
2595cat <<_ASUNAME
2596## --------- ##
2597## Platform. ##
2598## --------- ##
2599
2600hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2601uname -m = `(uname -m) 2>/dev/null || echo unknown`
2602uname -r = `(uname -r) 2>/dev/null || echo unknown`
2603uname -s = `(uname -s) 2>/dev/null || echo unknown`
2604uname -v = `(uname -v) 2>/dev/null || echo unknown`
2605
2606/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2607/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2608
2609/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2610/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2611/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2612/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2613/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2614/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2615/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2616
2617_ASUNAME
2618
2619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2620for as_dir in $PATH
2621do
2622  IFS=$as_save_IFS
2623  test -z "$as_dir" && as_dir=.
2624    $as_echo "PATH: $as_dir"
2625  done
2626IFS=$as_save_IFS
2627
2628} >&5
2629
2630cat >&5 <<_ACEOF
2631
2632
2633## ----------- ##
2634## Core tests. ##
2635## ----------- ##
2636
2637_ACEOF
2638
2639
2640# Keep a trace of the command line.
2641# Strip out --no-create and --no-recursion so they do not pile up.
2642# Strip out --silent because we don't want to record it for future runs.
2643# Also quote any args containing shell meta-characters.
2644# Make two passes to allow for proper duplicate-argument suppression.
2645ac_configure_args=
2646ac_configure_args0=
2647ac_configure_args1=
2648ac_must_keep_next=false
2649for ac_pass in 1 2
2650do
2651  for ac_arg
2652  do
2653    case $ac_arg in
2654    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2655    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2656    | -silent | --silent | --silen | --sile | --sil)
2657      continue ;;
2658    *\'*)
2659      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2660    esac
2661    case $ac_pass in
2662    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2663    2)
2664      as_fn_append ac_configure_args1 " '$ac_arg'"
2665      if test $ac_must_keep_next = true; then
2666	ac_must_keep_next=false # Got value, back to normal.
2667      else
2668	case $ac_arg in
2669	  *=* | --config-cache | -C | -disable-* | --disable-* \
2670	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2671	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2672	  | -with-* | --with-* | -without-* | --without-* | --x)
2673	    case "$ac_configure_args0 " in
2674	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2675	    esac
2676	    ;;
2677	  -* ) ac_must_keep_next=true ;;
2678	esac
2679      fi
2680      as_fn_append ac_configure_args " '$ac_arg'"
2681      ;;
2682    esac
2683  done
2684done
2685{ ac_configure_args0=; unset ac_configure_args0;}
2686{ ac_configure_args1=; unset ac_configure_args1;}
2687
2688# When interrupted or exit'd, cleanup temporary files, and complete
2689# config.log.  We remove comments because anyway the quotes in there
2690# would cause problems or look ugly.
2691# WARNING: Use '\'' to represent an apostrophe within the trap.
2692# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2693trap 'exit_status=$?
2694  # Save into config.log some information that might help in debugging.
2695  {
2696    echo
2697
2698    $as_echo "## ---------------- ##
2699## Cache variables. ##
2700## ---------------- ##"
2701    echo
2702    # The following way of writing the cache mishandles newlines in values,
2703(
2704  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2705    eval ac_val=\$$ac_var
2706    case $ac_val in #(
2707    *${as_nl}*)
2708      case $ac_var in #(
2709      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2710$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2711      esac
2712      case $ac_var in #(
2713      _ | IFS | as_nl) ;; #(
2714      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2715      *) { eval $ac_var=; unset $ac_var;} ;;
2716      esac ;;
2717    esac
2718  done
2719  (set) 2>&1 |
2720    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2721    *${as_nl}ac_space=\ *)
2722      sed -n \
2723	"s/'\''/'\''\\\\'\'''\''/g;
2724	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2725      ;; #(
2726    *)
2727      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2728      ;;
2729    esac |
2730    sort
2731)
2732    echo
2733
2734    $as_echo "## ----------------- ##
2735## Output variables. ##
2736## ----------------- ##"
2737    echo
2738    for ac_var in $ac_subst_vars
2739    do
2740      eval ac_val=\$$ac_var
2741      case $ac_val in
2742      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2743      esac
2744      $as_echo "$ac_var='\''$ac_val'\''"
2745    done | sort
2746    echo
2747
2748    if test -n "$ac_subst_files"; then
2749      $as_echo "## ------------------- ##
2750## File substitutions. ##
2751## ------------------- ##"
2752      echo
2753      for ac_var in $ac_subst_files
2754      do
2755	eval ac_val=\$$ac_var
2756	case $ac_val in
2757	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2758	esac
2759	$as_echo "$ac_var='\''$ac_val'\''"
2760      done | sort
2761      echo
2762    fi
2763
2764    if test -s confdefs.h; then
2765      $as_echo "## ----------- ##
2766## confdefs.h. ##
2767## ----------- ##"
2768      echo
2769      cat confdefs.h
2770      echo
2771    fi
2772    test "$ac_signal" != 0 &&
2773      $as_echo "$as_me: caught signal $ac_signal"
2774    $as_echo "$as_me: exit $exit_status"
2775  } >&5
2776  rm -f core *.core core.conftest.* &&
2777    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2778    exit $exit_status
2779' 0
2780for ac_signal in 1 2 13 15; do
2781  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2782done
2783ac_signal=0
2784
2785# confdefs.h avoids OS command line length limits that DEFS can exceed.
2786rm -f -r conftest* confdefs.h
2787
2788$as_echo "/* confdefs.h */" > confdefs.h
2789
2790# Predefined preprocessor variables.
2791
2792cat >>confdefs.h <<_ACEOF
2793#define PACKAGE_NAME "$PACKAGE_NAME"
2794_ACEOF
2795
2796cat >>confdefs.h <<_ACEOF
2797#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2798_ACEOF
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_VERSION "$PACKAGE_VERSION"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_STRING "$PACKAGE_STRING"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_URL "$PACKAGE_URL"
2814_ACEOF
2815
2816
2817# Let the site file select an alternate cache file if it wants to.
2818# Prefer an explicitly selected file to automatically selected ones.
2819ac_site_file1=NONE
2820ac_site_file2=NONE
2821if test -n "$CONFIG_SITE"; then
2822  # We do not want a PATH search for config.site.
2823  case $CONFIG_SITE in #((
2824    -*)  ac_site_file1=./$CONFIG_SITE;;
2825    */*) ac_site_file1=$CONFIG_SITE;;
2826    *)   ac_site_file1=./$CONFIG_SITE;;
2827  esac
2828elif test "x$prefix" != xNONE; then
2829  ac_site_file1=$prefix/share/config.site
2830  ac_site_file2=$prefix/etc/config.site
2831else
2832  ac_site_file1=$ac_default_prefix/share/config.site
2833  ac_site_file2=$ac_default_prefix/etc/config.site
2834fi
2835for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2836do
2837  test "x$ac_site_file" = xNONE && continue
2838  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2839    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2840$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2841    sed 's/^/| /' "$ac_site_file" >&5
2842    . "$ac_site_file" \
2843      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2845as_fn_error $? "failed to load site script $ac_site_file
2846See \`config.log' for more details" "$LINENO" 5 ; }
2847  fi
2848done
2849
2850if test -r "$cache_file"; then
2851  # Some versions of bash will fail to source /dev/null (special files
2852  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2853  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2854    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2855$as_echo "$as_me: loading cache $cache_file" >&6;}
2856    case $cache_file in
2857      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2858      *)                      . "./$cache_file";;
2859    esac
2860  fi
2861else
2862  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2863$as_echo "$as_me: creating cache $cache_file" >&6;}
2864  >$cache_file
2865fi
2866
2867# Check that the precious variables saved in the cache have kept the same
2868# value.
2869ac_cache_corrupted=false
2870for ac_var in $ac_precious_vars; do
2871  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2872  eval ac_new_set=\$ac_env_${ac_var}_set
2873  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2874  eval ac_new_val=\$ac_env_${ac_var}_value
2875  case $ac_old_set,$ac_new_set in
2876    set,)
2877      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2878$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2879      ac_cache_corrupted=: ;;
2880    ,set)
2881      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2882$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2883      ac_cache_corrupted=: ;;
2884    ,);;
2885    *)
2886      if test "x$ac_old_val" != "x$ac_new_val"; then
2887	# differences in whitespace do not lead to failure.
2888	ac_old_val_w=`echo x $ac_old_val`
2889	ac_new_val_w=`echo x $ac_new_val`
2890	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2891	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2892$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2893	  ac_cache_corrupted=:
2894	else
2895	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2896$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2897	  eval $ac_var=\$ac_old_val
2898	fi
2899	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2900$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2901	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2902$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2903      fi;;
2904  esac
2905  # Pass precious variables to config.status.
2906  if test "$ac_new_set" = set; then
2907    case $ac_new_val in
2908    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2909    *) ac_arg=$ac_var=$ac_new_val ;;
2910    esac
2911    case " $ac_configure_args " in
2912      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2913      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2914    esac
2915  fi
2916done
2917if $ac_cache_corrupted; then
2918  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2920  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2921$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2922  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2923fi
2924## -------------------- ##
2925## Main body of script. ##
2926## -------------------- ##
2927
2928ac_ext=c
2929ac_cpp='$CPP $CPPFLAGS'
2930ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2931ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2932ac_compiler_gnu=$ac_cv_c_compiler_gnu
2933
2934
2935
2936ac_aux_dir=
2937for ac_dir in build-aux "$srcdir"/build-aux; do
2938  if test -f "$ac_dir/install-sh"; then
2939    ac_aux_dir=$ac_dir
2940    ac_install_sh="$ac_aux_dir/install-sh -c"
2941    break
2942  elif test -f "$ac_dir/install.sh"; then
2943    ac_aux_dir=$ac_dir
2944    ac_install_sh="$ac_aux_dir/install.sh -c"
2945    break
2946  elif test -f "$ac_dir/shtool"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/shtool install -c"
2949    break
2950  fi
2951done
2952if test -z "$ac_aux_dir"; then
2953  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2954fi
2955
2956# These three variables are undocumented and unsupported,
2957# and are intended to be withdrawn in a future Autoconf release.
2958# They can cause serious problems if a builder's source tree is in a directory
2959# whose full name contains unusual characters.
2960ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2961ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2962ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2963
2964
2965# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2966
2967#
2968# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2969# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2970#
2971# This code is free software; you can redistribute it and/or modify it
2972# under the terms of the GNU General Public License version 2 only, as
2973# published by the Free Software Foundation.  Oracle designates this
2974# particular file as subject to the "Classpath" exception as provided
2975# by Oracle in the LICENSE file that accompanied this code.
2976#
2977# This code is distributed in the hope that it will be useful, but WITHOUT
2978# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2979# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2980# version 2 for more details (a copy is included in the LICENSE file that
2981# accompanied this code).
2982#
2983# You should have received a copy of the GNU General Public License version
2984# 2 along with this work; if not, write to the Free Software Foundation,
2985# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2986#
2987# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2988# or visit www.oracle.com if you need additional information or have any
2989# questions.
2990#
2991
2992#
2993# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2994#
2995# This program is free software; you can redistribute it and/or modify
2996# it under the terms of the GNU General Public License as published by
2997# the Free Software Foundation; either version 2 of the License, or
2998# (at your option) any later version.
2999#
3000# This program is distributed in the hope that it will be useful, but
3001# WITHOUT ANY WARRANTY; without even the implied warranty of
3002# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3003# General Public License for more details.
3004#
3005# You should have received a copy of the GNU General Public License
3006# along with this program; if not, write to the Free Software
3007# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3008#
3009# As a special exception to the GNU General Public License, if you
3010# distribute this file as part of a program that contains a
3011# configuration script generated by Autoconf, you may include it under
3012# the same distribution terms that you use for the rest of that program.
3013
3014# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3015# ----------------------------------
3016# PKG_PROG_PKG_CONFIG
3017
3018# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3019#
3020# Check to see whether a particular set of modules exists.  Similar
3021# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3022#
3023#
3024# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3025# this or PKG_CHECK_MODULES is called, or make sure to call
3026# PKG_CHECK_EXISTS manually
3027# --------------------------------------------------------------
3028
3029
3030
3031# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3032# ---------------------------------------------
3033# _PKG_CONFIG
3034
3035# _PKG_SHORT_ERRORS_SUPPORTED
3036# -----------------------------
3037# _PKG_SHORT_ERRORS_SUPPORTED
3038
3039
3040# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3041# [ACTION-IF-NOT-FOUND])
3042#
3043#
3044# Note that if there is a possibility the first call to
3045# PKG_CHECK_MODULES might not happen, you should be sure to include an
3046# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3047#
3048#
3049# --------------------------------------------------------------
3050# PKG_CHECK_MODULES
3051
3052
3053# Include these first...
3054#
3055# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3057#
3058# This code is free software; you can redistribute it and/or modify it
3059# under the terms of the GNU General Public License version 2 only, as
3060# published by the Free Software Foundation.  Oracle designates this
3061# particular file as subject to the "Classpath" exception as provided
3062# by Oracle in the LICENSE file that accompanied this code.
3063#
3064# This code is distributed in the hope that it will be useful, but WITHOUT
3065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3067# version 2 for more details (a copy is included in the LICENSE file that
3068# accompanied this code).
3069#
3070# You should have received a copy of the GNU General Public License version
3071# 2 along with this work; if not, write to the Free Software Foundation,
3072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3073#
3074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3075# or visit www.oracle.com if you need additional information or have any
3076# questions.
3077#
3078
3079
3080
3081# This will make sure the given variable points to a full and proper
3082# path. This means:
3083# 1) There will be no spaces in the path. On posix platforms,
3084#    spaces in the path will result in an error. On Windows,
3085#    the path will be rewritten using short-style to be space-free.
3086# 2) The path will be absolute, and it will be in unix-style (on
3087#     cygwin).
3088# $1: The name of the variable to fix
3089
3090
3091# This will make sure the given variable points to a executable
3092# with a full and proper path. This means:
3093# 1) There will be no spaces in the path. On posix platforms,
3094#    spaces in the path will result in an error. On Windows,
3095#    the path will be rewritten using short-style to be space-free.
3096# 2) The path will be absolute, and it will be in unix-style (on
3097#     cygwin).
3098# Any arguments given to the executable is preserved.
3099# If the input variable does not have a directory specification, then
3100# it need to be in the PATH.
3101# $1: The name of the variable to fix
3102
3103
3104
3105
3106
3107
3108# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3109# $1: variable to check
3110# $2: executable name to print in warning (optional)
3111
3112
3113# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3114# Arguments as AC_PATH_PROG:
3115# $1: variable to set
3116# $2: executable name to look for
3117
3118
3119# Setup the most fundamental tools that relies on not much else to set up,
3120# but is used by much of the early bootstrap code.
3121
3122
3123# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3124
3125
3126
3127
3128
3129
3130
3131#%%% Simple tools %%%
3132
3133# Check if we have found a usable version of make
3134# $1: the path to a potential make binary (or empty)
3135# $2: the description on how we found this
3136
3137
3138# Goes looking for a usable version of GNU make.
3139
3140
3141
3142
3143
3144
3145# Check if build directory is on local disk. If not possible to determine,
3146# we prefer to claim it's local.
3147# Argument 1: directory to test
3148# Argument 2: what to do if it is on local disk
3149# Argument 3: what to do otherwise (remote disk or failure)
3150
3151
3152# Check that source files have basic read permissions set. This might
3153# not be the case in cygwin in certain conditions.
3154
3155
3156
3157
3158#
3159# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3160# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3161#
3162# This code is free software; you can redistribute it and/or modify it
3163# under the terms of the GNU General Public License version 2 only, as
3164# published by the Free Software Foundation.  Oracle designates this
3165# particular file as subject to the "Classpath" exception as provided
3166# by Oracle in the LICENSE file that accompanied this code.
3167#
3168# This code is distributed in the hope that it will be useful, but WITHOUT
3169# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3170# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3171# version 2 for more details (a copy is included in the LICENSE file that
3172# accompanied this code).
3173#
3174# You should have received a copy of the GNU General Public License version
3175# 2 along with this work; if not, write to the Free Software Foundation,
3176# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3177#
3178# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3179# or visit www.oracle.com if you need additional information or have any
3180# questions.
3181#
3182
3183
3184
3185
3186
3187# Helper function which possibly converts a path using DOS-style short mode.
3188# If so, the updated path is stored in $new_path.
3189# $1: The path to check
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# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3198# and could probably be heavily simplified. However, all changes in this
3199# area tend to need lot of testing in different scenarios, and in lack of
3200# proper unit testing, cleaning this up has not been deemed worth the effort
3201# at the moment.
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3212
3213
3214
3215
3216#
3217# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3218# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3219#
3220# This code is free software; you can redistribute it and/or modify it
3221# under the terms of the GNU General Public License version 2 only, as
3222# published by the Free Software Foundation.  Oracle designates this
3223# particular file as subject to the "Classpath" exception as provided
3224# by Oracle in the LICENSE file that accompanied this code.
3225#
3226# This code is distributed in the hope that it will be useful, but WITHOUT
3227# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3228# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3229# version 2 for more details (a copy is included in the LICENSE file that
3230# accompanied this code).
3231#
3232# You should have received a copy of the GNU General Public License version
3233# 2 along with this work; if not, write to the Free Software Foundation,
3234# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3235#
3236# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3237# or visit www.oracle.com if you need additional information or have any
3238# questions.
3239#
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251# ... then the rest
3252#
3253# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3254# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3255#
3256# This code is free software; you can redistribute it and/or modify it
3257# under the terms of the GNU General Public License version 2 only, as
3258# published by the Free Software Foundation.  Oracle designates this
3259# particular file as subject to the "Classpath" exception as provided
3260# by Oracle in the LICENSE file that accompanied this code.
3261#
3262# This code is distributed in the hope that it will be useful, but WITHOUT
3263# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3264# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3265# version 2 for more details (a copy is included in the LICENSE file that
3266# accompanied this code).
3267#
3268# You should have received a copy of the GNU General Public License version
3269# 2 along with this work; if not, write to the Free Software Foundation,
3270# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3271#
3272# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3273# or visit www.oracle.com if you need additional information or have any
3274# questions.
3275#
3276
3277# Execute the check given as argument, and verify the result
3278# If the Boot JDK was previously found, do nothing
3279# $1 A command line (typically autoconf macro) to execute
3280
3281
3282# Test: Is bootjdk explicitely set by command line arguments?
3283
3284
3285# Test: Is bootjdk available from builddeps?
3286
3287
3288# Test: Is $JAVA_HOME set?
3289
3290
3291# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3292
3293
3294# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3295
3296
3297# Look for a jdk in the given path. If there are multiple, try to select the newest.
3298# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3299# $1 = Path to directory containing jdk installations.
3300# $2 = String to append to the found JDK directory to get the proper JDK home
3301
3302
3303# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3304# environmental variable as base for where to look.
3305# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3306
3307
3308# Test: Is there a JDK installed in default, well-known locations?
3309
3310
3311# Check that a command-line tool in the Boot JDK is correct
3312# $1 = name of variable to assign
3313# $2 = name of binary
3314
3315
3316###############################################################################
3317#
3318# We need a Boot JDK to bootstrap the build.
3319#
3320
3321
3322
3323
3324
3325#
3326# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3327# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3328#
3329# This code is free software; you can redistribute it and/or modify it
3330# under the terms of the GNU General Public License version 2 only, as
3331# published by the Free Software Foundation.  Oracle designates this
3332# particular file as subject to the "Classpath" exception as provided
3333# by Oracle in the LICENSE file that accompanied this code.
3334#
3335# This code is distributed in the hope that it will be useful, but WITHOUT
3336# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3337# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3338# version 2 for more details (a copy is included in the LICENSE file that
3339# accompanied this code).
3340#
3341# You should have received a copy of the GNU General Public License version
3342# 2 along with this work; if not, write to the Free Software Foundation,
3343# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3344#
3345# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3346# or visit www.oracle.com if you need additional information or have any
3347# questions.
3348#
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369#
3370# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3371# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3372#
3373# This code is free software; you can redistribute it and/or modify it
3374# under the terms of the GNU General Public License version 2 only, as
3375# published by the Free Software Foundation.  Oracle designates this
3376# particular file as subject to the "Classpath" exception as provided
3377# by Oracle in the LICENSE file that accompanied this code.
3378#
3379# This code is distributed in the hope that it will be useful, but WITHOUT
3380# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3381# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3382# version 2 for more details (a copy is included in the LICENSE file that
3383# accompanied this code).
3384#
3385# You should have received a copy of the GNU General Public License version
3386# 2 along with this work; if not, write to the Free Software Foundation,
3387# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3388#
3389# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3390# or visit www.oracle.com if you need additional information or have any
3391# questions.
3392#
3393
3394
3395
3396
3397
3398cygwin_help() {
3399    case $1 in
3400    unzip)
3401        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3402    zip)
3403        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3404    make)
3405        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3406    * )
3407       break ;;
3408    esac
3409}
3410
3411apt_help() {
3412    case $1 in
3413    devkit)
3414        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3415    openjdk)
3416        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3417    alsa)
3418        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3419    cups)
3420        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3421    freetype2)
3422        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3423    pulse)
3424        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3425    x11)
3426        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3427    ccache)
3428        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3429    * )
3430       break ;;
3431    esac
3432}
3433
3434yum_help() {
3435    case $1 in
3436    devkit)
3437        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3438    openjdk)
3439        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3440    alsa)
3441        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3442    cups)
3443        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3444    freetype2)
3445        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3446    pulse)
3447        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3448    x11)
3449        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3450    ccache)
3451        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3452    * )
3453       break ;;
3454    esac
3455}
3456
3457port_help() {
3458    PKGHANDLER_COMMAND=""
3459}
3460
3461pkgutil_help() {
3462    PKGHANDLER_COMMAND=""
3463}
3464
3465pkgadd_help() {
3466    PKGHANDLER_COMMAND=""
3467}
3468
3469
3470
3471#
3472# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3473# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3474#
3475# This code is free software; you can redistribute it and/or modify it
3476# under the terms of the GNU General Public License version 2 only, as
3477# published by the Free Software Foundation.  Oracle designates this
3478# particular file as subject to the "Classpath" exception as provided
3479# by Oracle in the LICENSE file that accompanied this code.
3480#
3481# This code is distributed in the hope that it will be useful, but WITHOUT
3482# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3483# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3484# version 2 for more details (a copy is included in the LICENSE file that
3485# accompanied this code).
3486#
3487# You should have received a copy of the GNU General Public License version
3488# 2 along with this work; if not, write to the Free Software Foundation,
3489# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3490#
3491# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3492# or visit www.oracle.com if you need additional information or have any
3493# questions.
3494#
3495
3496
3497
3498
3499
3500
3501
3502
3503###############################################################################
3504#
3505# Should we build only OpenJDK even if closed sources are present?
3506#
3507
3508
3509
3510
3511###############################################################################
3512#
3513# Setup version numbers
3514#
3515
3516
3517
3518
3519
3520
3521# Support for customization of the build process. Some build files
3522# will include counterparts from this location, if they exist. This allows
3523# for a degree of customization of the build targets and the rules/recipes
3524# to create them
3525
3526# Check whether --with-custom-make-dir was given.
3527if test "${with_custom_make_dir+set}" = set; then :
3528  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3529fi
3530
3531
3532
3533#
3534# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3535# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3536#
3537# This code is free software; you can redistribute it and/or modify it
3538# under the terms of the GNU General Public License version 2 only, as
3539# published by the Free Software Foundation.  Oracle designates this
3540# particular file as subject to the "Classpath" exception as provided
3541# by Oracle in the LICENSE file that accompanied this code.
3542#
3543# This code is distributed in the hope that it will be useful, but WITHOUT
3544# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3545# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3546# version 2 for more details (a copy is included in the LICENSE file that
3547# accompanied this code).
3548#
3549# You should have received a copy of the GNU General Public License version
3550# 2 along with this work; if not, write to the Free Software Foundation,
3551# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3552#
3553# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3554# or visit www.oracle.com if you need additional information or have any
3555# questions.
3556#
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572#
3573# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3574# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3575#
3576# This code is free software; you can redistribute it and/or modify it
3577# under the terms of the GNU General Public License version 2 only, as
3578# published by the Free Software Foundation.  Oracle designates this
3579# particular file as subject to the "Classpath" exception as provided
3580# by Oracle in the LICENSE file that accompanied this code.
3581#
3582# This code is distributed in the hope that it will be useful, but WITHOUT
3583# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3584# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3585# version 2 for more details (a copy is included in the LICENSE file that
3586# accompanied this code).
3587#
3588# You should have received a copy of the GNU General Public License version
3589# 2 along with this work; if not, write to the Free Software Foundation,
3590# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3591#
3592# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3593# or visit www.oracle.com if you need additional information or have any
3594# questions.
3595#
3596
3597# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3598# Converts autoconf style CPU name to OpenJDK style, into
3599# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3600
3601
3602# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603# Converts autoconf style OS name to OpenJDK style, into
3604# VAR_OS and VAR_OS_API.
3605
3606
3607# Expects $host_os $host_cpu $build_os and $build_cpu
3608# and $with_target_bits to have been setup!
3609#
3610# Translate the standard triplet(quadruplet) definition
3611# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3612# OPENJDK_BUILD_OS, etc.
3613
3614
3615# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3616# accordingly. Must be done after setting up build and target system, but before
3617# doing anything else with these values.
3618
3619
3620    # Setup the legacy variables, for controlling the old makefiles.
3621    #
3622
3623
3624
3625
3626#%%% Build and target systems %%%
3627
3628
3629
3630
3631# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3632# Add -mX to various FLAGS variables.
3633
3634
3635
3636
3637
3638
3639#
3640# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3641# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3642#
3643# This code is free software; you can redistribute it and/or modify it
3644# under the terms of the GNU General Public License version 2 only, as
3645# published by the Free Software Foundation.  Oracle designates this
3646# particular file as subject to the "Classpath" exception as provided
3647# by Oracle in the LICENSE file that accompanied this code.
3648#
3649# This code is distributed in the hope that it will be useful, but WITHOUT
3650# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3651# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3652# version 2 for more details (a copy is included in the LICENSE file that
3653# accompanied this code).
3654#
3655# You should have received a copy of the GNU General Public License version
3656# 2 along with this work; if not, write to the Free Software Foundation,
3657# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3658#
3659# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3660# or visit www.oracle.com if you need additional information or have any
3661# questions.
3662#
3663
3664
3665
3666
3667
3668
3669
3670
3671#
3672# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3673# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3674#
3675# This code is free software; you can redistribute it and/or modify it
3676# under the terms of the GNU General Public License version 2 only, as
3677# published by the Free Software Foundation.  Oracle designates this
3678# particular file as subject to the "Classpath" exception as provided
3679# by Oracle in the LICENSE file that accompanied this code.
3680#
3681# This code is distributed in the hope that it will be useful, but WITHOUT
3682# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3683# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3684# version 2 for more details (a copy is included in the LICENSE file that
3685# accompanied this code).
3686#
3687# You should have received a copy of the GNU General Public License version
3688# 2 along with this work; if not, write to the Free Software Foundation,
3689# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3690#
3691# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3692# or visit www.oracle.com if you need additional information or have any
3693# questions.
3694#
3695
3696# $1 = compiler to test (CC or CXX)
3697# $2 = human readable name of compiler (C or C++)
3698
3699
3700
3701
3702
3703# $1 = compiler to test (CC or CXX)
3704# $2 = human readable name of compiler (C or C++)
3705# $3 = list of compiler names to search for
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3720#                                   [RUN-IF-FALSE])
3721# ------------------------------------------------------------
3722# Check that the c and c++ compilers support an argument
3723
3724
3725
3726
3727#
3728# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3729# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3730#
3731# This code is free software; you can redistribute it and/or modify it
3732# under the terms of the GNU General Public License version 2 only, as
3733# published by the Free Software Foundation.  Oracle designates this
3734# particular file as subject to the "Classpath" exception as provided
3735# by Oracle in the LICENSE file that accompanied this code.
3736#
3737# This code is distributed in the hope that it will be useful, but WITHOUT
3738# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3739# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3740# version 2 for more details (a copy is included in the LICENSE file that
3741# accompanied this code).
3742#
3743# You should have received a copy of the GNU General Public License version
3744# 2 along with this work; if not, write to the Free Software Foundation,
3745# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3746#
3747# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3748# or visit www.oracle.com if you need additional information or have any
3749# questions.
3750#
3751
3752
3753
3754
3755
3756
3757
3758# Check if the VS env variables were setup prior to running configure.
3759# If not, then find vcvarsall.bat and run it automatically, and integrate
3760# the set env variables into the spec file.
3761
3762
3763
3764# Setup the DXSDK paths
3765
3766
3767
3768
3769
3770
3771# This line needs to be here, verbatim, after all includes and the dummy hook
3772# definitions. It is replaced with custom functionality when building
3773# custom sources.
3774#CUSTOM_AUTOCONF_INCLUDE
3775
3776# Do not change or remove the following line, it is needed for consistency checks:
3777DATE_WHEN_GENERATED=1367502345
3778
3779###############################################################################
3780#
3781# Initialization / Boot-strapping
3782#
3783# The bootstrapping process needs to solve the "chicken or the egg" problem,
3784# thus it jumps back and forth, each time gaining something needed later on.
3785#
3786###############################################################################
3787
3788# Basic initialization that must happen first of all
3789
3790# Save the original command line. This is passed to us by the wrapper configure script.
3791
3792DATE_WHEN_CONFIGURED=`LANG=C date`
3793
3794{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3795$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3796{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3797$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3798
3799
3800
3801# Start with tools that do not need have cross compilation support
3802# and can be expected to be found in the default PATH. These tools are
3803# used by configure. Nor are these tools expected to be found in the
3804# devkit from the builddeps server either, since they are
3805# needed to download the devkit.
3806
3807# First are all the simple required tools.
3808
3809    for ac_prog in basename
3810do
3811  # Extract the first word of "$ac_prog", so it can be a program name with args.
3812set dummy $ac_prog; ac_word=$2
3813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
3815if test "${ac_cv_path_BASENAME+set}" = set; then :
3816  $as_echo_n "(cached) " >&6
3817else
3818  case $BASENAME in
3819  [\\/]* | ?:[\\/]*)
3820  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3821  ;;
3822  *)
3823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824for as_dir in $PATH
3825do
3826  IFS=$as_save_IFS
3827  test -z "$as_dir" && as_dir=.
3828    for ac_exec_ext in '' $ac_executable_extensions; do
3829  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3830    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3832    break 2
3833  fi
3834done
3835  done
3836IFS=$as_save_IFS
3837
3838  ;;
3839esac
3840fi
3841BASENAME=$ac_cv_path_BASENAME
3842if test -n "$BASENAME"; then
3843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3844$as_echo "$BASENAME" >&6; }
3845else
3846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847$as_echo "no" >&6; }
3848fi
3849
3850
3851  test -n "$BASENAME" && break
3852done
3853
3854
3855    if test "x$BASENAME" = x; then
3856        if test "xbasename" = x; then
3857          PROG_NAME=basename
3858        else
3859          PROG_NAME=basename
3860        fi
3861        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3862$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3863        as_fn_error $? "Cannot continue" "$LINENO" 5
3864    fi
3865
3866
3867
3868    for ac_prog in bash
3869do
3870  # Extract the first word of "$ac_prog", so it can be a program name with args.
3871set dummy $ac_prog; ac_word=$2
3872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3873$as_echo_n "checking for $ac_word... " >&6; }
3874if test "${ac_cv_path_BASH+set}" = set; then :
3875  $as_echo_n "(cached) " >&6
3876else
3877  case $BASH in
3878  [\\/]* | ?:[\\/]*)
3879  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3880  ;;
3881  *)
3882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3883for as_dir in $PATH
3884do
3885  IFS=$as_save_IFS
3886  test -z "$as_dir" && as_dir=.
3887    for ac_exec_ext in '' $ac_executable_extensions; do
3888  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3889    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3891    break 2
3892  fi
3893done
3894  done
3895IFS=$as_save_IFS
3896
3897  ;;
3898esac
3899fi
3900BASH=$ac_cv_path_BASH
3901if test -n "$BASH"; then
3902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3903$as_echo "$BASH" >&6; }
3904else
3905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3906$as_echo "no" >&6; }
3907fi
3908
3909
3910  test -n "$BASH" && break
3911done
3912
3913
3914    if test "x$BASH" = x; then
3915        if test "xbash" = x; then
3916          PROG_NAME=bash
3917        else
3918          PROG_NAME=bash
3919        fi
3920        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3921$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3922        as_fn_error $? "Cannot continue" "$LINENO" 5
3923    fi
3924
3925
3926
3927    for ac_prog in cat
3928do
3929  # Extract the first word of "$ac_prog", so it can be a program name with args.
3930set dummy $ac_prog; ac_word=$2
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3932$as_echo_n "checking for $ac_word... " >&6; }
3933if test "${ac_cv_path_CAT+set}" = set; then :
3934  $as_echo_n "(cached) " >&6
3935else
3936  case $CAT in
3937  [\\/]* | ?:[\\/]*)
3938  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3939  ;;
3940  *)
3941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3942for as_dir in $PATH
3943do
3944  IFS=$as_save_IFS
3945  test -z "$as_dir" && as_dir=.
3946    for ac_exec_ext in '' $ac_executable_extensions; do
3947  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3948    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3950    break 2
3951  fi
3952done
3953  done
3954IFS=$as_save_IFS
3955
3956  ;;
3957esac
3958fi
3959CAT=$ac_cv_path_CAT
3960if test -n "$CAT"; then
3961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3962$as_echo "$CAT" >&6; }
3963else
3964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3965$as_echo "no" >&6; }
3966fi
3967
3968
3969  test -n "$CAT" && break
3970done
3971
3972
3973    if test "x$CAT" = x; then
3974        if test "xcat" = x; then
3975          PROG_NAME=cat
3976        else
3977          PROG_NAME=cat
3978        fi
3979        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3980$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3981        as_fn_error $? "Cannot continue" "$LINENO" 5
3982    fi
3983
3984
3985
3986    for ac_prog in chmod
3987do
3988  # Extract the first word of "$ac_prog", so it can be a program name with args.
3989set dummy $ac_prog; ac_word=$2
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3991$as_echo_n "checking for $ac_word... " >&6; }
3992if test "${ac_cv_path_CHMOD+set}" = set; then :
3993  $as_echo_n "(cached) " >&6
3994else
3995  case $CHMOD in
3996  [\\/]* | ?:[\\/]*)
3997  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3998  ;;
3999  *)
4000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4001for as_dir in $PATH
4002do
4003  IFS=$as_save_IFS
4004  test -z "$as_dir" && as_dir=.
4005    for ac_exec_ext in '' $ac_executable_extensions; do
4006  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4007    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4009    break 2
4010  fi
4011done
4012  done
4013IFS=$as_save_IFS
4014
4015  ;;
4016esac
4017fi
4018CHMOD=$ac_cv_path_CHMOD
4019if test -n "$CHMOD"; then
4020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4021$as_echo "$CHMOD" >&6; }
4022else
4023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4024$as_echo "no" >&6; }
4025fi
4026
4027
4028  test -n "$CHMOD" && break
4029done
4030
4031
4032    if test "x$CHMOD" = x; then
4033        if test "xchmod" = x; then
4034          PROG_NAME=chmod
4035        else
4036          PROG_NAME=chmod
4037        fi
4038        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4039$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4040        as_fn_error $? "Cannot continue" "$LINENO" 5
4041    fi
4042
4043
4044
4045    for ac_prog in cmp
4046do
4047  # Extract the first word of "$ac_prog", so it can be a program name with args.
4048set dummy $ac_prog; ac_word=$2
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4050$as_echo_n "checking for $ac_word... " >&6; }
4051if test "${ac_cv_path_CMP+set}" = set; then :
4052  $as_echo_n "(cached) " >&6
4053else
4054  case $CMP in
4055  [\\/]* | ?:[\\/]*)
4056  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4057  ;;
4058  *)
4059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4060for as_dir in $PATH
4061do
4062  IFS=$as_save_IFS
4063  test -z "$as_dir" && as_dir=.
4064    for ac_exec_ext in '' $ac_executable_extensions; do
4065  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4066    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4068    break 2
4069  fi
4070done
4071  done
4072IFS=$as_save_IFS
4073
4074  ;;
4075esac
4076fi
4077CMP=$ac_cv_path_CMP
4078if test -n "$CMP"; then
4079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4080$as_echo "$CMP" >&6; }
4081else
4082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4083$as_echo "no" >&6; }
4084fi
4085
4086
4087  test -n "$CMP" && break
4088done
4089
4090
4091    if test "x$CMP" = x; then
4092        if test "xcmp" = x; then
4093          PROG_NAME=cmp
4094        else
4095          PROG_NAME=cmp
4096        fi
4097        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4098$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4099        as_fn_error $? "Cannot continue" "$LINENO" 5
4100    fi
4101
4102
4103
4104    for ac_prog in comm
4105do
4106  # Extract the first word of "$ac_prog", so it can be a program name with args.
4107set dummy $ac_prog; ac_word=$2
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4109$as_echo_n "checking for $ac_word... " >&6; }
4110if test "${ac_cv_path_COMM+set}" = set; then :
4111  $as_echo_n "(cached) " >&6
4112else
4113  case $COMM in
4114  [\\/]* | ?:[\\/]*)
4115  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4116  ;;
4117  *)
4118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121  IFS=$as_save_IFS
4122  test -z "$as_dir" && as_dir=.
4123    for ac_exec_ext in '' $ac_executable_extensions; do
4124  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4125    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4127    break 2
4128  fi
4129done
4130  done
4131IFS=$as_save_IFS
4132
4133  ;;
4134esac
4135fi
4136COMM=$ac_cv_path_COMM
4137if test -n "$COMM"; then
4138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4139$as_echo "$COMM" >&6; }
4140else
4141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142$as_echo "no" >&6; }
4143fi
4144
4145
4146  test -n "$COMM" && break
4147done
4148
4149
4150    if test "x$COMM" = x; then
4151        if test "xcomm" = x; then
4152          PROG_NAME=comm
4153        else
4154          PROG_NAME=comm
4155        fi
4156        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4157$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4158        as_fn_error $? "Cannot continue" "$LINENO" 5
4159    fi
4160
4161
4162
4163    for ac_prog in cp
4164do
4165  # Extract the first word of "$ac_prog", so it can be a program name with args.
4166set dummy $ac_prog; ac_word=$2
4167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4168$as_echo_n "checking for $ac_word... " >&6; }
4169if test "${ac_cv_path_CP+set}" = set; then :
4170  $as_echo_n "(cached) " >&6
4171else
4172  case $CP in
4173  [\\/]* | ?:[\\/]*)
4174  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4175  ;;
4176  *)
4177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4178for as_dir in $PATH
4179do
4180  IFS=$as_save_IFS
4181  test -z "$as_dir" && as_dir=.
4182    for ac_exec_ext in '' $ac_executable_extensions; do
4183  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4184    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4186    break 2
4187  fi
4188done
4189  done
4190IFS=$as_save_IFS
4191
4192  ;;
4193esac
4194fi
4195CP=$ac_cv_path_CP
4196if test -n "$CP"; then
4197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4198$as_echo "$CP" >&6; }
4199else
4200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201$as_echo "no" >&6; }
4202fi
4203
4204
4205  test -n "$CP" && break
4206done
4207
4208
4209    if test "x$CP" = x; then
4210        if test "xcp" = x; then
4211          PROG_NAME=cp
4212        else
4213          PROG_NAME=cp
4214        fi
4215        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4216$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4217        as_fn_error $? "Cannot continue" "$LINENO" 5
4218    fi
4219
4220
4221
4222    for ac_prog in cpio
4223do
4224  # Extract the first word of "$ac_prog", so it can be a program name with args.
4225set dummy $ac_prog; ac_word=$2
4226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4227$as_echo_n "checking for $ac_word... " >&6; }
4228if test "${ac_cv_path_CPIO+set}" = set; then :
4229  $as_echo_n "(cached) " >&6
4230else
4231  case $CPIO in
4232  [\\/]* | ?:[\\/]*)
4233  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4234  ;;
4235  *)
4236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4237for as_dir in $PATH
4238do
4239  IFS=$as_save_IFS
4240  test -z "$as_dir" && as_dir=.
4241    for ac_exec_ext in '' $ac_executable_extensions; do
4242  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4243    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4245    break 2
4246  fi
4247done
4248  done
4249IFS=$as_save_IFS
4250
4251  ;;
4252esac
4253fi
4254CPIO=$ac_cv_path_CPIO
4255if test -n "$CPIO"; then
4256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4257$as_echo "$CPIO" >&6; }
4258else
4259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4260$as_echo "no" >&6; }
4261fi
4262
4263
4264  test -n "$CPIO" && break
4265done
4266
4267
4268    if test "x$CPIO" = x; then
4269        if test "xcpio" = x; then
4270          PROG_NAME=cpio
4271        else
4272          PROG_NAME=cpio
4273        fi
4274        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4275$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4276        as_fn_error $? "Cannot continue" "$LINENO" 5
4277    fi
4278
4279
4280
4281    for ac_prog in cut
4282do
4283  # Extract the first word of "$ac_prog", so it can be a program name with args.
4284set dummy $ac_prog; ac_word=$2
4285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4286$as_echo_n "checking for $ac_word... " >&6; }
4287if test "${ac_cv_path_CUT+set}" = set; then :
4288  $as_echo_n "(cached) " >&6
4289else
4290  case $CUT in
4291  [\\/]* | ?:[\\/]*)
4292  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4293  ;;
4294  *)
4295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4296for as_dir in $PATH
4297do
4298  IFS=$as_save_IFS
4299  test -z "$as_dir" && as_dir=.
4300    for ac_exec_ext in '' $ac_executable_extensions; do
4301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4302    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4304    break 2
4305  fi
4306done
4307  done
4308IFS=$as_save_IFS
4309
4310  ;;
4311esac
4312fi
4313CUT=$ac_cv_path_CUT
4314if test -n "$CUT"; then
4315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4316$as_echo "$CUT" >&6; }
4317else
4318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4319$as_echo "no" >&6; }
4320fi
4321
4322
4323  test -n "$CUT" && break
4324done
4325
4326
4327    if test "x$CUT" = x; then
4328        if test "xcut" = x; then
4329          PROG_NAME=cut
4330        else
4331          PROG_NAME=cut
4332        fi
4333        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4334$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4335        as_fn_error $? "Cannot continue" "$LINENO" 5
4336    fi
4337
4338
4339
4340    for ac_prog in date
4341do
4342  # Extract the first word of "$ac_prog", so it can be a program name with args.
4343set dummy $ac_prog; ac_word=$2
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4345$as_echo_n "checking for $ac_word... " >&6; }
4346if test "${ac_cv_path_DATE+set}" = set; then :
4347  $as_echo_n "(cached) " >&6
4348else
4349  case $DATE in
4350  [\\/]* | ?:[\\/]*)
4351  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4352  ;;
4353  *)
4354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355for as_dir in $PATH
4356do
4357  IFS=$as_save_IFS
4358  test -z "$as_dir" && as_dir=.
4359    for ac_exec_ext in '' $ac_executable_extensions; do
4360  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4361    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4363    break 2
4364  fi
4365done
4366  done
4367IFS=$as_save_IFS
4368
4369  ;;
4370esac
4371fi
4372DATE=$ac_cv_path_DATE
4373if test -n "$DATE"; then
4374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4375$as_echo "$DATE" >&6; }
4376else
4377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4378$as_echo "no" >&6; }
4379fi
4380
4381
4382  test -n "$DATE" && break
4383done
4384
4385
4386    if test "x$DATE" = x; then
4387        if test "xdate" = x; then
4388          PROG_NAME=date
4389        else
4390          PROG_NAME=date
4391        fi
4392        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4393$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4394        as_fn_error $? "Cannot continue" "$LINENO" 5
4395    fi
4396
4397
4398
4399    for ac_prog in gdiff diff
4400do
4401  # Extract the first word of "$ac_prog", so it can be a program name with args.
4402set dummy $ac_prog; ac_word=$2
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4404$as_echo_n "checking for $ac_word... " >&6; }
4405if test "${ac_cv_path_DIFF+set}" = set; then :
4406  $as_echo_n "(cached) " >&6
4407else
4408  case $DIFF in
4409  [\\/]* | ?:[\\/]*)
4410  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4411  ;;
4412  *)
4413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414for as_dir in $PATH
4415do
4416  IFS=$as_save_IFS
4417  test -z "$as_dir" && as_dir=.
4418    for ac_exec_ext in '' $ac_executable_extensions; do
4419  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4420    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4422    break 2
4423  fi
4424done
4425  done
4426IFS=$as_save_IFS
4427
4428  ;;
4429esac
4430fi
4431DIFF=$ac_cv_path_DIFF
4432if test -n "$DIFF"; then
4433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4434$as_echo "$DIFF" >&6; }
4435else
4436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4437$as_echo "no" >&6; }
4438fi
4439
4440
4441  test -n "$DIFF" && break
4442done
4443
4444
4445    if test "x$DIFF" = x; then
4446        if test "xgdiff diff" = x; then
4447          PROG_NAME=diff
4448        else
4449          PROG_NAME=gdiff diff
4450        fi
4451        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4452$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4453        as_fn_error $? "Cannot continue" "$LINENO" 5
4454    fi
4455
4456
4457
4458    for ac_prog in dirname
4459do
4460  # Extract the first word of "$ac_prog", so it can be a program name with args.
4461set dummy $ac_prog; ac_word=$2
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4463$as_echo_n "checking for $ac_word... " >&6; }
4464if test "${ac_cv_path_DIRNAME+set}" = set; then :
4465  $as_echo_n "(cached) " >&6
4466else
4467  case $DIRNAME in
4468  [\\/]* | ?:[\\/]*)
4469  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4470  ;;
4471  *)
4472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4473for as_dir in $PATH
4474do
4475  IFS=$as_save_IFS
4476  test -z "$as_dir" && as_dir=.
4477    for ac_exec_ext in '' $ac_executable_extensions; do
4478  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4479    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4481    break 2
4482  fi
4483done
4484  done
4485IFS=$as_save_IFS
4486
4487  ;;
4488esac
4489fi
4490DIRNAME=$ac_cv_path_DIRNAME
4491if test -n "$DIRNAME"; then
4492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4493$as_echo "$DIRNAME" >&6; }
4494else
4495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4496$as_echo "no" >&6; }
4497fi
4498
4499
4500  test -n "$DIRNAME" && break
4501done
4502
4503
4504    if test "x$DIRNAME" = x; then
4505        if test "xdirname" = x; then
4506          PROG_NAME=dirname
4507        else
4508          PROG_NAME=dirname
4509        fi
4510        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4511$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4512        as_fn_error $? "Cannot continue" "$LINENO" 5
4513    fi
4514
4515
4516
4517    for ac_prog in echo
4518do
4519  # Extract the first word of "$ac_prog", so it can be a program name with args.
4520set dummy $ac_prog; ac_word=$2
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4522$as_echo_n "checking for $ac_word... " >&6; }
4523if test "${ac_cv_path_ECHO+set}" = set; then :
4524  $as_echo_n "(cached) " >&6
4525else
4526  case $ECHO in
4527  [\\/]* | ?:[\\/]*)
4528  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4529  ;;
4530  *)
4531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534  IFS=$as_save_IFS
4535  test -z "$as_dir" && as_dir=.
4536    for ac_exec_ext in '' $ac_executable_extensions; do
4537  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4538    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4540    break 2
4541  fi
4542done
4543  done
4544IFS=$as_save_IFS
4545
4546  ;;
4547esac
4548fi
4549ECHO=$ac_cv_path_ECHO
4550if test -n "$ECHO"; then
4551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4552$as_echo "$ECHO" >&6; }
4553else
4554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555$as_echo "no" >&6; }
4556fi
4557
4558
4559  test -n "$ECHO" && break
4560done
4561
4562
4563    if test "x$ECHO" = x; then
4564        if test "xecho" = x; then
4565          PROG_NAME=echo
4566        else
4567          PROG_NAME=echo
4568        fi
4569        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4570$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4571        as_fn_error $? "Cannot continue" "$LINENO" 5
4572    fi
4573
4574
4575
4576    for ac_prog in expr
4577do
4578  # Extract the first word of "$ac_prog", so it can be a program name with args.
4579set dummy $ac_prog; ac_word=$2
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4581$as_echo_n "checking for $ac_word... " >&6; }
4582if test "${ac_cv_path_EXPR+set}" = set; then :
4583  $as_echo_n "(cached) " >&6
4584else
4585  case $EXPR in
4586  [\\/]* | ?:[\\/]*)
4587  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4588  ;;
4589  *)
4590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4591for as_dir in $PATH
4592do
4593  IFS=$as_save_IFS
4594  test -z "$as_dir" && as_dir=.
4595    for ac_exec_ext in '' $ac_executable_extensions; do
4596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4597    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4599    break 2
4600  fi
4601done
4602  done
4603IFS=$as_save_IFS
4604
4605  ;;
4606esac
4607fi
4608EXPR=$ac_cv_path_EXPR
4609if test -n "$EXPR"; then
4610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4611$as_echo "$EXPR" >&6; }
4612else
4613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4614$as_echo "no" >&6; }
4615fi
4616
4617
4618  test -n "$EXPR" && break
4619done
4620
4621
4622    if test "x$EXPR" = x; then
4623        if test "xexpr" = x; then
4624          PROG_NAME=expr
4625        else
4626          PROG_NAME=expr
4627        fi
4628        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4629$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4630        as_fn_error $? "Cannot continue" "$LINENO" 5
4631    fi
4632
4633
4634
4635    for ac_prog in file
4636do
4637  # Extract the first word of "$ac_prog", so it can be a program name with args.
4638set dummy $ac_prog; ac_word=$2
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4640$as_echo_n "checking for $ac_word... " >&6; }
4641if test "${ac_cv_path_FILE+set}" = set; then :
4642  $as_echo_n "(cached) " >&6
4643else
4644  case $FILE in
4645  [\\/]* | ?:[\\/]*)
4646  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4647  ;;
4648  *)
4649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650for as_dir in $PATH
4651do
4652  IFS=$as_save_IFS
4653  test -z "$as_dir" && as_dir=.
4654    for ac_exec_ext in '' $ac_executable_extensions; do
4655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4656    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658    break 2
4659  fi
4660done
4661  done
4662IFS=$as_save_IFS
4663
4664  ;;
4665esac
4666fi
4667FILE=$ac_cv_path_FILE
4668if test -n "$FILE"; then
4669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4670$as_echo "$FILE" >&6; }
4671else
4672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
4674fi
4675
4676
4677  test -n "$FILE" && break
4678done
4679
4680
4681    if test "x$FILE" = x; then
4682        if test "xfile" = x; then
4683          PROG_NAME=file
4684        else
4685          PROG_NAME=file
4686        fi
4687        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4688$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4689        as_fn_error $? "Cannot continue" "$LINENO" 5
4690    fi
4691
4692
4693
4694    for ac_prog in find
4695do
4696  # Extract the first word of "$ac_prog", so it can be a program name with args.
4697set dummy $ac_prog; ac_word=$2
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4699$as_echo_n "checking for $ac_word... " >&6; }
4700if test "${ac_cv_path_FIND+set}" = set; then :
4701  $as_echo_n "(cached) " >&6
4702else
4703  case $FIND in
4704  [\\/]* | ?:[\\/]*)
4705  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4706  ;;
4707  *)
4708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4709for as_dir in $PATH
4710do
4711  IFS=$as_save_IFS
4712  test -z "$as_dir" && as_dir=.
4713    for ac_exec_ext in '' $ac_executable_extensions; do
4714  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4715    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4717    break 2
4718  fi
4719done
4720  done
4721IFS=$as_save_IFS
4722
4723  ;;
4724esac
4725fi
4726FIND=$ac_cv_path_FIND
4727if test -n "$FIND"; then
4728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4729$as_echo "$FIND" >&6; }
4730else
4731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
4733fi
4734
4735
4736  test -n "$FIND" && break
4737done
4738
4739
4740    if test "x$FIND" = x; then
4741        if test "xfind" = x; then
4742          PROG_NAME=find
4743        else
4744          PROG_NAME=find
4745        fi
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4747$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4748        as_fn_error $? "Cannot continue" "$LINENO" 5
4749    fi
4750
4751
4752
4753    for ac_prog in head
4754do
4755  # Extract the first word of "$ac_prog", so it can be a program name with args.
4756set dummy $ac_prog; ac_word=$2
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4758$as_echo_n "checking for $ac_word... " >&6; }
4759if test "${ac_cv_path_HEAD+set}" = set; then :
4760  $as_echo_n "(cached) " >&6
4761else
4762  case $HEAD in
4763  [\\/]* | ?:[\\/]*)
4764  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4765  ;;
4766  *)
4767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4768for as_dir in $PATH
4769do
4770  IFS=$as_save_IFS
4771  test -z "$as_dir" && as_dir=.
4772    for ac_exec_ext in '' $ac_executable_extensions; do
4773  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4774    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4776    break 2
4777  fi
4778done
4779  done
4780IFS=$as_save_IFS
4781
4782  ;;
4783esac
4784fi
4785HEAD=$ac_cv_path_HEAD
4786if test -n "$HEAD"; then
4787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4788$as_echo "$HEAD" >&6; }
4789else
4790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791$as_echo "no" >&6; }
4792fi
4793
4794
4795  test -n "$HEAD" && break
4796done
4797
4798
4799    if test "x$HEAD" = x; then
4800        if test "xhead" = x; then
4801          PROG_NAME=head
4802        else
4803          PROG_NAME=head
4804        fi
4805        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4806$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4807        as_fn_error $? "Cannot continue" "$LINENO" 5
4808    fi
4809
4810
4811
4812    for ac_prog in ln
4813do
4814  # Extract the first word of "$ac_prog", so it can be a program name with args.
4815set dummy $ac_prog; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if test "${ac_cv_path_LN+set}" = set; then :
4819  $as_echo_n "(cached) " >&6
4820else
4821  case $LN in
4822  [\\/]* | ?:[\\/]*)
4823  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4824  ;;
4825  *)
4826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in $PATH
4828do
4829  IFS=$as_save_IFS
4830  test -z "$as_dir" && as_dir=.
4831    for ac_exec_ext in '' $ac_executable_extensions; do
4832  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4833    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835    break 2
4836  fi
4837done
4838  done
4839IFS=$as_save_IFS
4840
4841  ;;
4842esac
4843fi
4844LN=$ac_cv_path_LN
4845if test -n "$LN"; then
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4847$as_echo "$LN" >&6; }
4848else
4849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
4851fi
4852
4853
4854  test -n "$LN" && break
4855done
4856
4857
4858    if test "x$LN" = x; then
4859        if test "xln" = x; then
4860          PROG_NAME=ln
4861        else
4862          PROG_NAME=ln
4863        fi
4864        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4865$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4866        as_fn_error $? "Cannot continue" "$LINENO" 5
4867    fi
4868
4869
4870
4871    for ac_prog in ls
4872do
4873  # Extract the first word of "$ac_prog", so it can be a program name with args.
4874set dummy $ac_prog; ac_word=$2
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if test "${ac_cv_path_LS+set}" = set; then :
4878  $as_echo_n "(cached) " >&6
4879else
4880  case $LS in
4881  [\\/]* | ?:[\\/]*)
4882  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4883  ;;
4884  *)
4885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in $PATH
4887do
4888  IFS=$as_save_IFS
4889  test -z "$as_dir" && as_dir=.
4890    for ac_exec_ext in '' $ac_executable_extensions; do
4891  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4892    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894    break 2
4895  fi
4896done
4897  done
4898IFS=$as_save_IFS
4899
4900  ;;
4901esac
4902fi
4903LS=$ac_cv_path_LS
4904if test -n "$LS"; then
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4906$as_echo "$LS" >&6; }
4907else
4908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913  test -n "$LS" && break
4914done
4915
4916
4917    if test "x$LS" = x; then
4918        if test "xls" = x; then
4919          PROG_NAME=ls
4920        else
4921          PROG_NAME=ls
4922        fi
4923        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4924$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4925        as_fn_error $? "Cannot continue" "$LINENO" 5
4926    fi
4927
4928
4929
4930    for ac_prog in mkdir
4931do
4932  # Extract the first word of "$ac_prog", so it can be a program name with args.
4933set dummy $ac_prog; ac_word=$2
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4935$as_echo_n "checking for $ac_word... " >&6; }
4936if test "${ac_cv_path_MKDIR+set}" = set; then :
4937  $as_echo_n "(cached) " >&6
4938else
4939  case $MKDIR in
4940  [\\/]* | ?:[\\/]*)
4941  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4942  ;;
4943  *)
4944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947  IFS=$as_save_IFS
4948  test -z "$as_dir" && as_dir=.
4949    for ac_exec_ext in '' $ac_executable_extensions; do
4950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4951    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4953    break 2
4954  fi
4955done
4956  done
4957IFS=$as_save_IFS
4958
4959  ;;
4960esac
4961fi
4962MKDIR=$ac_cv_path_MKDIR
4963if test -n "$MKDIR"; then
4964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4965$as_echo "$MKDIR" >&6; }
4966else
4967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4968$as_echo "no" >&6; }
4969fi
4970
4971
4972  test -n "$MKDIR" && break
4973done
4974
4975
4976    if test "x$MKDIR" = x; then
4977        if test "xmkdir" = x; then
4978          PROG_NAME=mkdir
4979        else
4980          PROG_NAME=mkdir
4981        fi
4982        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4983$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4984        as_fn_error $? "Cannot continue" "$LINENO" 5
4985    fi
4986
4987
4988
4989    for ac_prog in mktemp
4990do
4991  # Extract the first word of "$ac_prog", so it can be a program name with args.
4992set dummy $ac_prog; ac_word=$2
4993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4994$as_echo_n "checking for $ac_word... " >&6; }
4995if test "${ac_cv_path_MKTEMP+set}" = set; then :
4996  $as_echo_n "(cached) " >&6
4997else
4998  case $MKTEMP in
4999  [\\/]* | ?:[\\/]*)
5000  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5001  ;;
5002  *)
5003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004for as_dir in $PATH
5005do
5006  IFS=$as_save_IFS
5007  test -z "$as_dir" && as_dir=.
5008    for ac_exec_ext in '' $ac_executable_extensions; do
5009  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5010    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012    break 2
5013  fi
5014done
5015  done
5016IFS=$as_save_IFS
5017
5018  ;;
5019esac
5020fi
5021MKTEMP=$ac_cv_path_MKTEMP
5022if test -n "$MKTEMP"; then
5023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5024$as_echo "$MKTEMP" >&6; }
5025else
5026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027$as_echo "no" >&6; }
5028fi
5029
5030
5031  test -n "$MKTEMP" && break
5032done
5033
5034
5035    if test "x$MKTEMP" = x; then
5036        if test "xmktemp" = x; then
5037          PROG_NAME=mktemp
5038        else
5039          PROG_NAME=mktemp
5040        fi
5041        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5042$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5043        as_fn_error $? "Cannot continue" "$LINENO" 5
5044    fi
5045
5046
5047
5048    for ac_prog in mv
5049do
5050  # Extract the first word of "$ac_prog", so it can be a program name with args.
5051set dummy $ac_prog; ac_word=$2
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
5054if test "${ac_cv_path_MV+set}" = set; then :
5055  $as_echo_n "(cached) " >&6
5056else
5057  case $MV in
5058  [\\/]* | ?:[\\/]*)
5059  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5060  ;;
5061  *)
5062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5063for as_dir in $PATH
5064do
5065  IFS=$as_save_IFS
5066  test -z "$as_dir" && as_dir=.
5067    for ac_exec_ext in '' $ac_executable_extensions; do
5068  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5069    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5071    break 2
5072  fi
5073done
5074  done
5075IFS=$as_save_IFS
5076
5077  ;;
5078esac
5079fi
5080MV=$ac_cv_path_MV
5081if test -n "$MV"; then
5082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5083$as_echo "$MV" >&6; }
5084else
5085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
5087fi
5088
5089
5090  test -n "$MV" && break
5091done
5092
5093
5094    if test "x$MV" = x; then
5095        if test "xmv" = x; then
5096          PROG_NAME=mv
5097        else
5098          PROG_NAME=mv
5099        fi
5100        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5101$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5102        as_fn_error $? "Cannot continue" "$LINENO" 5
5103    fi
5104
5105
5106
5107    for ac_prog in printf
5108do
5109  # Extract the first word of "$ac_prog", so it can be a program name with args.
5110set dummy $ac_prog; ac_word=$2
5111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112$as_echo_n "checking for $ac_word... " >&6; }
5113if test "${ac_cv_path_PRINTF+set}" = set; then :
5114  $as_echo_n "(cached) " >&6
5115else
5116  case $PRINTF in
5117  [\\/]* | ?:[\\/]*)
5118  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5119  ;;
5120  *)
5121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124  IFS=$as_save_IFS
5125  test -z "$as_dir" && as_dir=.
5126    for ac_exec_ext in '' $ac_executable_extensions; do
5127  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5128    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5130    break 2
5131  fi
5132done
5133  done
5134IFS=$as_save_IFS
5135
5136  ;;
5137esac
5138fi
5139PRINTF=$ac_cv_path_PRINTF
5140if test -n "$PRINTF"; then
5141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5142$as_echo "$PRINTF" >&6; }
5143else
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
5146fi
5147
5148
5149  test -n "$PRINTF" && break
5150done
5151
5152
5153    if test "x$PRINTF" = x; then
5154        if test "xprintf" = x; then
5155          PROG_NAME=printf
5156        else
5157          PROG_NAME=printf
5158        fi
5159        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5160$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5161        as_fn_error $? "Cannot continue" "$LINENO" 5
5162    fi
5163
5164
5165
5166    for ac_prog in pwd
5167do
5168  # Extract the first word of "$ac_prog", so it can be a program name with args.
5169set dummy $ac_prog; ac_word=$2
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5171$as_echo_n "checking for $ac_word... " >&6; }
5172if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5173  $as_echo_n "(cached) " >&6
5174else
5175  case $THEPWDCMD in
5176  [\\/]* | ?:[\\/]*)
5177  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5178  ;;
5179  *)
5180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181for as_dir in $PATH
5182do
5183  IFS=$as_save_IFS
5184  test -z "$as_dir" && as_dir=.
5185    for ac_exec_ext in '' $ac_executable_extensions; do
5186  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5187    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5189    break 2
5190  fi
5191done
5192  done
5193IFS=$as_save_IFS
5194
5195  ;;
5196esac
5197fi
5198THEPWDCMD=$ac_cv_path_THEPWDCMD
5199if test -n "$THEPWDCMD"; then
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5201$as_echo "$THEPWDCMD" >&6; }
5202else
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5204$as_echo "no" >&6; }
5205fi
5206
5207
5208  test -n "$THEPWDCMD" && break
5209done
5210
5211
5212    if test "x$THEPWDCMD" = x; then
5213        if test "xpwd" = x; then
5214          PROG_NAME=thepwdcmd
5215        else
5216          PROG_NAME=pwd
5217        fi
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5219$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5220        as_fn_error $? "Cannot continue" "$LINENO" 5
5221    fi
5222
5223
5224
5225    for ac_prog in rm
5226do
5227  # Extract the first word of "$ac_prog", so it can be a program name with args.
5228set dummy $ac_prog; ac_word=$2
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5230$as_echo_n "checking for $ac_word... " >&6; }
5231if test "${ac_cv_path_RM+set}" = set; then :
5232  $as_echo_n "(cached) " >&6
5233else
5234  case $RM in
5235  [\\/]* | ?:[\\/]*)
5236  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5237  ;;
5238  *)
5239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240for as_dir in $PATH
5241do
5242  IFS=$as_save_IFS
5243  test -z "$as_dir" && as_dir=.
5244    for ac_exec_ext in '' $ac_executable_extensions; do
5245  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5246    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5248    break 2
5249  fi
5250done
5251  done
5252IFS=$as_save_IFS
5253
5254  ;;
5255esac
5256fi
5257RM=$ac_cv_path_RM
5258if test -n "$RM"; then
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5260$as_echo "$RM" >&6; }
5261else
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5263$as_echo "no" >&6; }
5264fi
5265
5266
5267  test -n "$RM" && break
5268done
5269
5270
5271    if test "x$RM" = x; then
5272        if test "xrm" = x; then
5273          PROG_NAME=rm
5274        else
5275          PROG_NAME=rm
5276        fi
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5278$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5279        as_fn_error $? "Cannot continue" "$LINENO" 5
5280    fi
5281
5282
5283
5284    for ac_prog in sh
5285do
5286  # Extract the first word of "$ac_prog", so it can be a program name with args.
5287set dummy $ac_prog; ac_word=$2
5288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289$as_echo_n "checking for $ac_word... " >&6; }
5290if test "${ac_cv_path_SH+set}" = set; then :
5291  $as_echo_n "(cached) " >&6
5292else
5293  case $SH in
5294  [\\/]* | ?:[\\/]*)
5295  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5296  ;;
5297  *)
5298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299for as_dir in $PATH
5300do
5301  IFS=$as_save_IFS
5302  test -z "$as_dir" && as_dir=.
5303    for ac_exec_ext in '' $ac_executable_extensions; do
5304  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5305    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5307    break 2
5308  fi
5309done
5310  done
5311IFS=$as_save_IFS
5312
5313  ;;
5314esac
5315fi
5316SH=$ac_cv_path_SH
5317if test -n "$SH"; then
5318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5319$as_echo "$SH" >&6; }
5320else
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5322$as_echo "no" >&6; }
5323fi
5324
5325
5326  test -n "$SH" && break
5327done
5328
5329
5330    if test "x$SH" = x; then
5331        if test "xsh" = x; then
5332          PROG_NAME=sh
5333        else
5334          PROG_NAME=sh
5335        fi
5336        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5337$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5338        as_fn_error $? "Cannot continue" "$LINENO" 5
5339    fi
5340
5341
5342
5343    for ac_prog in sort
5344do
5345  # Extract the first word of "$ac_prog", so it can be a program name with args.
5346set dummy $ac_prog; ac_word=$2
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348$as_echo_n "checking for $ac_word... " >&6; }
5349if test "${ac_cv_path_SORT+set}" = set; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352  case $SORT in
5353  [\\/]* | ?:[\\/]*)
5354  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5355  ;;
5356  *)
5357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in $PATH
5359do
5360  IFS=$as_save_IFS
5361  test -z "$as_dir" && as_dir=.
5362    for ac_exec_ext in '' $ac_executable_extensions; do
5363  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5364    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366    break 2
5367  fi
5368done
5369  done
5370IFS=$as_save_IFS
5371
5372  ;;
5373esac
5374fi
5375SORT=$ac_cv_path_SORT
5376if test -n "$SORT"; then
5377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5378$as_echo "$SORT" >&6; }
5379else
5380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383
5384
5385  test -n "$SORT" && break
5386done
5387
5388
5389    if test "x$SORT" = x; then
5390        if test "xsort" = x; then
5391          PROG_NAME=sort
5392        else
5393          PROG_NAME=sort
5394        fi
5395        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5396$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5397        as_fn_error $? "Cannot continue" "$LINENO" 5
5398    fi
5399
5400
5401
5402    for ac_prog in tail
5403do
5404  # Extract the first word of "$ac_prog", so it can be a program name with args.
5405set dummy $ac_prog; ac_word=$2
5406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5407$as_echo_n "checking for $ac_word... " >&6; }
5408if test "${ac_cv_path_TAIL+set}" = set; then :
5409  $as_echo_n "(cached) " >&6
5410else
5411  case $TAIL in
5412  [\\/]* | ?:[\\/]*)
5413  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5414  ;;
5415  *)
5416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH
5418do
5419  IFS=$as_save_IFS
5420  test -z "$as_dir" && as_dir=.
5421    for ac_exec_ext in '' $ac_executable_extensions; do
5422  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5423    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5425    break 2
5426  fi
5427done
5428  done
5429IFS=$as_save_IFS
5430
5431  ;;
5432esac
5433fi
5434TAIL=$ac_cv_path_TAIL
5435if test -n "$TAIL"; then
5436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5437$as_echo "$TAIL" >&6; }
5438else
5439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
5441fi
5442
5443
5444  test -n "$TAIL" && break
5445done
5446
5447
5448    if test "x$TAIL" = x; then
5449        if test "xtail" = x; then
5450          PROG_NAME=tail
5451        else
5452          PROG_NAME=tail
5453        fi
5454        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5455$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5456        as_fn_error $? "Cannot continue" "$LINENO" 5
5457    fi
5458
5459
5460
5461    for ac_prog in tar
5462do
5463  # Extract the first word of "$ac_prog", so it can be a program name with args.
5464set dummy $ac_prog; ac_word=$2
5465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5466$as_echo_n "checking for $ac_word... " >&6; }
5467if test "${ac_cv_path_TAR+set}" = set; then :
5468  $as_echo_n "(cached) " >&6
5469else
5470  case $TAR in
5471  [\\/]* | ?:[\\/]*)
5472  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5473  ;;
5474  *)
5475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5476for as_dir in $PATH
5477do
5478  IFS=$as_save_IFS
5479  test -z "$as_dir" && as_dir=.
5480    for ac_exec_ext in '' $ac_executable_extensions; do
5481  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5482    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5484    break 2
5485  fi
5486done
5487  done
5488IFS=$as_save_IFS
5489
5490  ;;
5491esac
5492fi
5493TAR=$ac_cv_path_TAR
5494if test -n "$TAR"; then
5495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5496$as_echo "$TAR" >&6; }
5497else
5498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5499$as_echo "no" >&6; }
5500fi
5501
5502
5503  test -n "$TAR" && break
5504done
5505
5506
5507    if test "x$TAR" = x; then
5508        if test "xtar" = x; then
5509          PROG_NAME=tar
5510        else
5511          PROG_NAME=tar
5512        fi
5513        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5514$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5515        as_fn_error $? "Cannot continue" "$LINENO" 5
5516    fi
5517
5518
5519
5520    for ac_prog in tee
5521do
5522  # Extract the first word of "$ac_prog", so it can be a program name with args.
5523set dummy $ac_prog; ac_word=$2
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5525$as_echo_n "checking for $ac_word... " >&6; }
5526if test "${ac_cv_path_TEE+set}" = set; then :
5527  $as_echo_n "(cached) " >&6
5528else
5529  case $TEE in
5530  [\\/]* | ?:[\\/]*)
5531  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5532  ;;
5533  *)
5534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5535for as_dir in $PATH
5536do
5537  IFS=$as_save_IFS
5538  test -z "$as_dir" && as_dir=.
5539    for ac_exec_ext in '' $ac_executable_extensions; do
5540  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5541    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5543    break 2
5544  fi
5545done
5546  done
5547IFS=$as_save_IFS
5548
5549  ;;
5550esac
5551fi
5552TEE=$ac_cv_path_TEE
5553if test -n "$TEE"; then
5554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5555$as_echo "$TEE" >&6; }
5556else
5557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5558$as_echo "no" >&6; }
5559fi
5560
5561
5562  test -n "$TEE" && break
5563done
5564
5565
5566    if test "x$TEE" = x; then
5567        if test "xtee" = x; then
5568          PROG_NAME=tee
5569        else
5570          PROG_NAME=tee
5571        fi
5572        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5573$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5574        as_fn_error $? "Cannot continue" "$LINENO" 5
5575    fi
5576
5577
5578
5579    for ac_prog in touch
5580do
5581  # Extract the first word of "$ac_prog", so it can be a program name with args.
5582set dummy $ac_prog; ac_word=$2
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5584$as_echo_n "checking for $ac_word... " >&6; }
5585if test "${ac_cv_path_TOUCH+set}" = set; then :
5586  $as_echo_n "(cached) " >&6
5587else
5588  case $TOUCH in
5589  [\\/]* | ?:[\\/]*)
5590  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5591  ;;
5592  *)
5593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5594for as_dir in $PATH
5595do
5596  IFS=$as_save_IFS
5597  test -z "$as_dir" && as_dir=.
5598    for ac_exec_ext in '' $ac_executable_extensions; do
5599  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5600    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5602    break 2
5603  fi
5604done
5605  done
5606IFS=$as_save_IFS
5607
5608  ;;
5609esac
5610fi
5611TOUCH=$ac_cv_path_TOUCH
5612if test -n "$TOUCH"; then
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5614$as_echo "$TOUCH" >&6; }
5615else
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617$as_echo "no" >&6; }
5618fi
5619
5620
5621  test -n "$TOUCH" && break
5622done
5623
5624
5625    if test "x$TOUCH" = x; then
5626        if test "xtouch" = x; then
5627          PROG_NAME=touch
5628        else
5629          PROG_NAME=touch
5630        fi
5631        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5632$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5633        as_fn_error $? "Cannot continue" "$LINENO" 5
5634    fi
5635
5636
5637
5638    for ac_prog in tr
5639do
5640  # Extract the first word of "$ac_prog", so it can be a program name with args.
5641set dummy $ac_prog; ac_word=$2
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
5644if test "${ac_cv_path_TR+set}" = set; then :
5645  $as_echo_n "(cached) " >&6
5646else
5647  case $TR in
5648  [\\/]* | ?:[\\/]*)
5649  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5650  ;;
5651  *)
5652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655  IFS=$as_save_IFS
5656  test -z "$as_dir" && as_dir=.
5657    for ac_exec_ext in '' $ac_executable_extensions; do
5658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5659    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661    break 2
5662  fi
5663done
5664  done
5665IFS=$as_save_IFS
5666
5667  ;;
5668esac
5669fi
5670TR=$ac_cv_path_TR
5671if test -n "$TR"; then
5672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5673$as_echo "$TR" >&6; }
5674else
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680  test -n "$TR" && break
5681done
5682
5683
5684    if test "x$TR" = x; then
5685        if test "xtr" = x; then
5686          PROG_NAME=tr
5687        else
5688          PROG_NAME=tr
5689        fi
5690        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5691$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5692        as_fn_error $? "Cannot continue" "$LINENO" 5
5693    fi
5694
5695
5696
5697    for ac_prog in uname
5698do
5699  # Extract the first word of "$ac_prog", so it can be a program name with args.
5700set dummy $ac_prog; ac_word=$2
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
5703if test "${ac_cv_path_UNAME+set}" = set; then :
5704  $as_echo_n "(cached) " >&6
5705else
5706  case $UNAME in
5707  [\\/]* | ?:[\\/]*)
5708  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5709  ;;
5710  *)
5711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714  IFS=$as_save_IFS
5715  test -z "$as_dir" && as_dir=.
5716    for ac_exec_ext in '' $ac_executable_extensions; do
5717  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5718    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720    break 2
5721  fi
5722done
5723  done
5724IFS=$as_save_IFS
5725
5726  ;;
5727esac
5728fi
5729UNAME=$ac_cv_path_UNAME
5730if test -n "$UNAME"; then
5731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5732$as_echo "$UNAME" >&6; }
5733else
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
5736fi
5737
5738
5739  test -n "$UNAME" && break
5740done
5741
5742
5743    if test "x$UNAME" = x; then
5744        if test "xuname" = x; then
5745          PROG_NAME=uname
5746        else
5747          PROG_NAME=uname
5748        fi
5749        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5750$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5751        as_fn_error $? "Cannot continue" "$LINENO" 5
5752    fi
5753
5754
5755
5756    for ac_prog in uniq
5757do
5758  # Extract the first word of "$ac_prog", so it can be a program name with args.
5759set dummy $ac_prog; ac_word=$2
5760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5761$as_echo_n "checking for $ac_word... " >&6; }
5762if test "${ac_cv_path_UNIQ+set}" = set; then :
5763  $as_echo_n "(cached) " >&6
5764else
5765  case $UNIQ in
5766  [\\/]* | ?:[\\/]*)
5767  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5768  ;;
5769  *)
5770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5771for as_dir in $PATH
5772do
5773  IFS=$as_save_IFS
5774  test -z "$as_dir" && as_dir=.
5775    for ac_exec_ext in '' $ac_executable_extensions; do
5776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5777    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5779    break 2
5780  fi
5781done
5782  done
5783IFS=$as_save_IFS
5784
5785  ;;
5786esac
5787fi
5788UNIQ=$ac_cv_path_UNIQ
5789if test -n "$UNIQ"; then
5790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5791$as_echo "$UNIQ" >&6; }
5792else
5793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5794$as_echo "no" >&6; }
5795fi
5796
5797
5798  test -n "$UNIQ" && break
5799done
5800
5801
5802    if test "x$UNIQ" = x; then
5803        if test "xuniq" = x; then
5804          PROG_NAME=uniq
5805        else
5806          PROG_NAME=uniq
5807        fi
5808        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5809$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5810        as_fn_error $? "Cannot continue" "$LINENO" 5
5811    fi
5812
5813
5814
5815    for ac_prog in wc
5816do
5817  # Extract the first word of "$ac_prog", so it can be a program name with args.
5818set dummy $ac_prog; ac_word=$2
5819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5820$as_echo_n "checking for $ac_word... " >&6; }
5821if test "${ac_cv_path_WC+set}" = set; then :
5822  $as_echo_n "(cached) " >&6
5823else
5824  case $WC in
5825  [\\/]* | ?:[\\/]*)
5826  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5827  ;;
5828  *)
5829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830for as_dir in $PATH
5831do
5832  IFS=$as_save_IFS
5833  test -z "$as_dir" && as_dir=.
5834    for ac_exec_ext in '' $ac_executable_extensions; do
5835  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5836    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5838    break 2
5839  fi
5840done
5841  done
5842IFS=$as_save_IFS
5843
5844  ;;
5845esac
5846fi
5847WC=$ac_cv_path_WC
5848if test -n "$WC"; then
5849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5850$as_echo "$WC" >&6; }
5851else
5852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853$as_echo "no" >&6; }
5854fi
5855
5856
5857  test -n "$WC" && break
5858done
5859
5860
5861    if test "x$WC" = x; then
5862        if test "xwc" = x; then
5863          PROG_NAME=wc
5864        else
5865          PROG_NAME=wc
5866        fi
5867        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5868$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5869        as_fn_error $? "Cannot continue" "$LINENO" 5
5870    fi
5871
5872
5873
5874    for ac_prog in which
5875do
5876  # Extract the first word of "$ac_prog", so it can be a program name with args.
5877set dummy $ac_prog; ac_word=$2
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5879$as_echo_n "checking for $ac_word... " >&6; }
5880if test "${ac_cv_path_WHICH+set}" = set; then :
5881  $as_echo_n "(cached) " >&6
5882else
5883  case $WHICH in
5884  [\\/]* | ?:[\\/]*)
5885  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5886  ;;
5887  *)
5888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5889for as_dir in $PATH
5890do
5891  IFS=$as_save_IFS
5892  test -z "$as_dir" && as_dir=.
5893    for ac_exec_ext in '' $ac_executable_extensions; do
5894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5895    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5897    break 2
5898  fi
5899done
5900  done
5901IFS=$as_save_IFS
5902
5903  ;;
5904esac
5905fi
5906WHICH=$ac_cv_path_WHICH
5907if test -n "$WHICH"; then
5908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5909$as_echo "$WHICH" >&6; }
5910else
5911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5912$as_echo "no" >&6; }
5913fi
5914
5915
5916  test -n "$WHICH" && break
5917done
5918
5919
5920    if test "x$WHICH" = x; then
5921        if test "xwhich" = x; then
5922          PROG_NAME=which
5923        else
5924          PROG_NAME=which
5925        fi
5926        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5927$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5928        as_fn_error $? "Cannot continue" "$LINENO" 5
5929    fi
5930
5931
5932
5933    for ac_prog in xargs
5934do
5935  # Extract the first word of "$ac_prog", so it can be a program name with args.
5936set dummy $ac_prog; ac_word=$2
5937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5938$as_echo_n "checking for $ac_word... " >&6; }
5939if test "${ac_cv_path_XARGS+set}" = set; then :
5940  $as_echo_n "(cached) " >&6
5941else
5942  case $XARGS in
5943  [\\/]* | ?:[\\/]*)
5944  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5945  ;;
5946  *)
5947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948for as_dir in $PATH
5949do
5950  IFS=$as_save_IFS
5951  test -z "$as_dir" && as_dir=.
5952    for ac_exec_ext in '' $ac_executable_extensions; do
5953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5954    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5956    break 2
5957  fi
5958done
5959  done
5960IFS=$as_save_IFS
5961
5962  ;;
5963esac
5964fi
5965XARGS=$ac_cv_path_XARGS
5966if test -n "$XARGS"; then
5967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5968$as_echo "$XARGS" >&6; }
5969else
5970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
5972fi
5973
5974
5975  test -n "$XARGS" && break
5976done
5977
5978
5979    if test "x$XARGS" = x; then
5980        if test "xxargs" = x; then
5981          PROG_NAME=xargs
5982        else
5983          PROG_NAME=xargs
5984        fi
5985        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5986$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5987        as_fn_error $? "Cannot continue" "$LINENO" 5
5988    fi
5989
5990
5991
5992# Then required tools that require some special treatment.
5993for ac_prog in gawk mawk nawk awk
5994do
5995  # Extract the first word of "$ac_prog", so it can be a program name with args.
5996set dummy $ac_prog; ac_word=$2
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
5999if test "${ac_cv_prog_AWK+set}" = set; then :
6000  $as_echo_n "(cached) " >&6
6001else
6002  if test -n "$AWK"; then
6003  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6004else
6005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008  IFS=$as_save_IFS
6009  test -z "$as_dir" && as_dir=.
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6012    ac_cv_prog_AWK="$ac_prog"
6013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6014    break 2
6015  fi
6016done
6017  done
6018IFS=$as_save_IFS
6019
6020fi
6021fi
6022AWK=$ac_cv_prog_AWK
6023if test -n "$AWK"; then
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6025$as_echo "$AWK" >&6; }
6026else
6027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
6029fi
6030
6031
6032  test -n "$AWK" && break
6033done
6034
6035
6036    if test "x$AWK" = x; then
6037        if test "x" = x; then
6038          PROG_NAME=awk
6039        else
6040          PROG_NAME=
6041        fi
6042        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6043$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6044        as_fn_error $? "Cannot continue" "$LINENO" 5
6045    fi
6046
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6048$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6049if test "${ac_cv_path_GREP+set}" = set; then :
6050  $as_echo_n "(cached) " >&6
6051else
6052  if test -z "$GREP"; then
6053  ac_path_GREP_found=false
6054  # Loop through the user's path and test for each of PROGNAME-LIST
6055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6057do
6058  IFS=$as_save_IFS
6059  test -z "$as_dir" && as_dir=.
6060    for ac_prog in grep ggrep; do
6061    for ac_exec_ext in '' $ac_executable_extensions; do
6062      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6063      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6064# Check for GNU ac_path_GREP and select it if it is found.
6065  # Check for GNU $ac_path_GREP
6066case `"$ac_path_GREP" --version 2>&1` in
6067*GNU*)
6068  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6069*)
6070  ac_count=0
6071  $as_echo_n 0123456789 >"conftest.in"
6072  while :
6073  do
6074    cat "conftest.in" "conftest.in" >"conftest.tmp"
6075    mv "conftest.tmp" "conftest.in"
6076    cp "conftest.in" "conftest.nl"
6077    $as_echo 'GREP' >> "conftest.nl"
6078    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6079    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6080    as_fn_arith $ac_count + 1 && ac_count=$as_val
6081    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6082      # Best one so far, save it but keep looking for a better one
6083      ac_cv_path_GREP="$ac_path_GREP"
6084      ac_path_GREP_max=$ac_count
6085    fi
6086    # 10*(2^10) chars as input seems more than enough
6087    test $ac_count -gt 10 && break
6088  done
6089  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6090esac
6091
6092      $ac_path_GREP_found && break 3
6093    done
6094  done
6095  done
6096IFS=$as_save_IFS
6097  if test -z "$ac_cv_path_GREP"; then
6098    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6099  fi
6100else
6101  ac_cv_path_GREP=$GREP
6102fi
6103
6104fi
6105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6106$as_echo "$ac_cv_path_GREP" >&6; }
6107 GREP="$ac_cv_path_GREP"
6108
6109
6110
6111    if test "x$GREP" = x; then
6112        if test "x" = x; then
6113          PROG_NAME=grep
6114        else
6115          PROG_NAME=
6116        fi
6117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6118$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6119        as_fn_error $? "Cannot continue" "$LINENO" 5
6120    fi
6121
6122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6123$as_echo_n "checking for egrep... " >&6; }
6124if test "${ac_cv_path_EGREP+set}" = set; then :
6125  $as_echo_n "(cached) " >&6
6126else
6127  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6128   then ac_cv_path_EGREP="$GREP -E"
6129   else
6130     if test -z "$EGREP"; then
6131  ac_path_EGREP_found=false
6132  # Loop through the user's path and test for each of PROGNAME-LIST
6133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6135do
6136  IFS=$as_save_IFS
6137  test -z "$as_dir" && as_dir=.
6138    for ac_prog in egrep; do
6139    for ac_exec_ext in '' $ac_executable_extensions; do
6140      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6141      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6142# Check for GNU ac_path_EGREP and select it if it is found.
6143  # Check for GNU $ac_path_EGREP
6144case `"$ac_path_EGREP" --version 2>&1` in
6145*GNU*)
6146  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6147*)
6148  ac_count=0
6149  $as_echo_n 0123456789 >"conftest.in"
6150  while :
6151  do
6152    cat "conftest.in" "conftest.in" >"conftest.tmp"
6153    mv "conftest.tmp" "conftest.in"
6154    cp "conftest.in" "conftest.nl"
6155    $as_echo 'EGREP' >> "conftest.nl"
6156    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6157    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6158    as_fn_arith $ac_count + 1 && ac_count=$as_val
6159    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6160      # Best one so far, save it but keep looking for a better one
6161      ac_cv_path_EGREP="$ac_path_EGREP"
6162      ac_path_EGREP_max=$ac_count
6163    fi
6164    # 10*(2^10) chars as input seems more than enough
6165    test $ac_count -gt 10 && break
6166  done
6167  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6168esac
6169
6170      $ac_path_EGREP_found && break 3
6171    done
6172  done
6173  done
6174IFS=$as_save_IFS
6175  if test -z "$ac_cv_path_EGREP"; then
6176    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6177  fi
6178else
6179  ac_cv_path_EGREP=$EGREP
6180fi
6181
6182   fi
6183fi
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6185$as_echo "$ac_cv_path_EGREP" >&6; }
6186 EGREP="$ac_cv_path_EGREP"
6187
6188
6189
6190    if test "x$EGREP" = x; then
6191        if test "x" = x; then
6192          PROG_NAME=egrep
6193        else
6194          PROG_NAME=
6195        fi
6196        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6197$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6198        as_fn_error $? "Cannot continue" "$LINENO" 5
6199    fi
6200
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6202$as_echo_n "checking for fgrep... " >&6; }
6203if test "${ac_cv_path_FGREP+set}" = set; then :
6204  $as_echo_n "(cached) " >&6
6205else
6206  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6207   then ac_cv_path_FGREP="$GREP -F"
6208   else
6209     if test -z "$FGREP"; then
6210  ac_path_FGREP_found=false
6211  # Loop through the user's path and test for each of PROGNAME-LIST
6212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6213for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6214do
6215  IFS=$as_save_IFS
6216  test -z "$as_dir" && as_dir=.
6217    for ac_prog in fgrep; do
6218    for ac_exec_ext in '' $ac_executable_extensions; do
6219      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6220      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6221# Check for GNU ac_path_FGREP and select it if it is found.
6222  # Check for GNU $ac_path_FGREP
6223case `"$ac_path_FGREP" --version 2>&1` in
6224*GNU*)
6225  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6226*)
6227  ac_count=0
6228  $as_echo_n 0123456789 >"conftest.in"
6229  while :
6230  do
6231    cat "conftest.in" "conftest.in" >"conftest.tmp"
6232    mv "conftest.tmp" "conftest.in"
6233    cp "conftest.in" "conftest.nl"
6234    $as_echo 'FGREP' >> "conftest.nl"
6235    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6236    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6237    as_fn_arith $ac_count + 1 && ac_count=$as_val
6238    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6239      # Best one so far, save it but keep looking for a better one
6240      ac_cv_path_FGREP="$ac_path_FGREP"
6241      ac_path_FGREP_max=$ac_count
6242    fi
6243    # 10*(2^10) chars as input seems more than enough
6244    test $ac_count -gt 10 && break
6245  done
6246  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6247esac
6248
6249      $ac_path_FGREP_found && break 3
6250    done
6251  done
6252  done
6253IFS=$as_save_IFS
6254  if test -z "$ac_cv_path_FGREP"; then
6255    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6256  fi
6257else
6258  ac_cv_path_FGREP=$FGREP
6259fi
6260
6261   fi
6262fi
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6264$as_echo "$ac_cv_path_FGREP" >&6; }
6265 FGREP="$ac_cv_path_FGREP"
6266
6267
6268
6269    if test "x$FGREP" = x; then
6270        if test "x" = x; then
6271          PROG_NAME=fgrep
6272        else
6273          PROG_NAME=
6274        fi
6275        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6276$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6277        as_fn_error $? "Cannot continue" "$LINENO" 5
6278    fi
6279
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6281$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6282if test "${ac_cv_path_SED+set}" = set; then :
6283  $as_echo_n "(cached) " >&6
6284else
6285            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6286     for ac_i in 1 2 3 4 5 6 7; do
6287       ac_script="$ac_script$as_nl$ac_script"
6288     done
6289     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6290     { ac_script=; unset ac_script;}
6291     if test -z "$SED"; then
6292  ac_path_SED_found=false
6293  # Loop through the user's path and test for each of PROGNAME-LIST
6294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295for as_dir in $PATH
6296do
6297  IFS=$as_save_IFS
6298  test -z "$as_dir" && as_dir=.
6299    for ac_prog in sed gsed; do
6300    for ac_exec_ext in '' $ac_executable_extensions; do
6301      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6302      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6303# Check for GNU ac_path_SED and select it if it is found.
6304  # Check for GNU $ac_path_SED
6305case `"$ac_path_SED" --version 2>&1` in
6306*GNU*)
6307  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6308*)
6309  ac_count=0
6310  $as_echo_n 0123456789 >"conftest.in"
6311  while :
6312  do
6313    cat "conftest.in" "conftest.in" >"conftest.tmp"
6314    mv "conftest.tmp" "conftest.in"
6315    cp "conftest.in" "conftest.nl"
6316    $as_echo '' >> "conftest.nl"
6317    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6318    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6319    as_fn_arith $ac_count + 1 && ac_count=$as_val
6320    if test $ac_count -gt ${ac_path_SED_max-0}; then
6321      # Best one so far, save it but keep looking for a better one
6322      ac_cv_path_SED="$ac_path_SED"
6323      ac_path_SED_max=$ac_count
6324    fi
6325    # 10*(2^10) chars as input seems more than enough
6326    test $ac_count -gt 10 && break
6327  done
6328  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6329esac
6330
6331      $ac_path_SED_found && break 3
6332    done
6333  done
6334  done
6335IFS=$as_save_IFS
6336  if test -z "$ac_cv_path_SED"; then
6337    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6338  fi
6339else
6340  ac_cv_path_SED=$SED
6341fi
6342
6343fi
6344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6345$as_echo "$ac_cv_path_SED" >&6; }
6346 SED="$ac_cv_path_SED"
6347  rm -f conftest.sed
6348
6349
6350    if test "x$SED" = x; then
6351        if test "x" = x; then
6352          PROG_NAME=sed
6353        else
6354          PROG_NAME=
6355        fi
6356        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6357$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6358        as_fn_error $? "Cannot continue" "$LINENO" 5
6359    fi
6360
6361
6362for ac_prog in nawk gawk awk
6363do
6364  # Extract the first word of "$ac_prog", so it can be a program name with args.
6365set dummy $ac_prog; ac_word=$2
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6367$as_echo_n "checking for $ac_word... " >&6; }
6368if test "${ac_cv_path_NAWK+set}" = set; then :
6369  $as_echo_n "(cached) " >&6
6370else
6371  case $NAWK in
6372  [\\/]* | ?:[\\/]*)
6373  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6374  ;;
6375  *)
6376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379  IFS=$as_save_IFS
6380  test -z "$as_dir" && as_dir=.
6381    for ac_exec_ext in '' $ac_executable_extensions; do
6382  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6383    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385    break 2
6386  fi
6387done
6388  done
6389IFS=$as_save_IFS
6390
6391  ;;
6392esac
6393fi
6394NAWK=$ac_cv_path_NAWK
6395if test -n "$NAWK"; then
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6397$as_echo "$NAWK" >&6; }
6398else
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
6403
6404  test -n "$NAWK" && break
6405done
6406
6407
6408    if test "x$NAWK" = x; then
6409        if test "x" = x; then
6410          PROG_NAME=nawk
6411        else
6412          PROG_NAME=
6413        fi
6414        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6415$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6416        as_fn_error $? "Cannot continue" "$LINENO" 5
6417    fi
6418
6419
6420# Always force rm.
6421RM="$RM -f"
6422
6423# These are not required on all platforms
6424# Extract the first word of "cygpath", so it can be a program name with args.
6425set dummy cygpath; ac_word=$2
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6427$as_echo_n "checking for $ac_word... " >&6; }
6428if test "${ac_cv_path_CYGPATH+set}" = set; then :
6429  $as_echo_n "(cached) " >&6
6430else
6431  case $CYGPATH in
6432  [\\/]* | ?:[\\/]*)
6433  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6434  ;;
6435  *)
6436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6437for as_dir in $PATH
6438do
6439  IFS=$as_save_IFS
6440  test -z "$as_dir" && as_dir=.
6441    for ac_exec_ext in '' $ac_executable_extensions; do
6442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6443    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6445    break 2
6446  fi
6447done
6448  done
6449IFS=$as_save_IFS
6450
6451  ;;
6452esac
6453fi
6454CYGPATH=$ac_cv_path_CYGPATH
6455if test -n "$CYGPATH"; then
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6457$as_echo "$CYGPATH" >&6; }
6458else
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460$as_echo "no" >&6; }
6461fi
6462
6463
6464# Extract the first word of "readlink", so it can be a program name with args.
6465set dummy readlink; ac_word=$2
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6467$as_echo_n "checking for $ac_word... " >&6; }
6468if test "${ac_cv_path_READLINK+set}" = set; then :
6469  $as_echo_n "(cached) " >&6
6470else
6471  case $READLINK in
6472  [\\/]* | ?:[\\/]*)
6473  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6474  ;;
6475  *)
6476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6477for as_dir in $PATH
6478do
6479  IFS=$as_save_IFS
6480  test -z "$as_dir" && as_dir=.
6481    for ac_exec_ext in '' $ac_executable_extensions; do
6482  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6483    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6485    break 2
6486  fi
6487done
6488  done
6489IFS=$as_save_IFS
6490
6491  ;;
6492esac
6493fi
6494READLINK=$ac_cv_path_READLINK
6495if test -n "$READLINK"; then
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6497$as_echo "$READLINK" >&6; }
6498else
6499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6500$as_echo "no" >&6; }
6501fi
6502
6503
6504# Extract the first word of "df", so it can be a program name with args.
6505set dummy df; ac_word=$2
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6507$as_echo_n "checking for $ac_word... " >&6; }
6508if test "${ac_cv_path_DF+set}" = set; then :
6509  $as_echo_n "(cached) " >&6
6510else
6511  case $DF in
6512  [\\/]* | ?:[\\/]*)
6513  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6514  ;;
6515  *)
6516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH
6518do
6519  IFS=$as_save_IFS
6520  test -z "$as_dir" && as_dir=.
6521    for ac_exec_ext in '' $ac_executable_extensions; do
6522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6523    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525    break 2
6526  fi
6527done
6528  done
6529IFS=$as_save_IFS
6530
6531  ;;
6532esac
6533fi
6534DF=$ac_cv_path_DF
6535if test -n "$DF"; then
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6537$as_echo "$DF" >&6; }
6538else
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544# Extract the first word of "SetFile", so it can be a program name with args.
6545set dummy SetFile; ac_word=$2
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6547$as_echo_n "checking for $ac_word... " >&6; }
6548if test "${ac_cv_path_SETFILE+set}" = set; then :
6549  $as_echo_n "(cached) " >&6
6550else
6551  case $SETFILE in
6552  [\\/]* | ?:[\\/]*)
6553  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6554  ;;
6555  *)
6556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6557for as_dir in $PATH
6558do
6559  IFS=$as_save_IFS
6560  test -z "$as_dir" && as_dir=.
6561    for ac_exec_ext in '' $ac_executable_extensions; do
6562  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6563    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6565    break 2
6566  fi
6567done
6568  done
6569IFS=$as_save_IFS
6570
6571  ;;
6572esac
6573fi
6574SETFILE=$ac_cv_path_SETFILE
6575if test -n "$SETFILE"; then
6576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6577$as_echo "$SETFILE" >&6; }
6578else
6579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; }
6581fi
6582
6583
6584
6585
6586# Now we can determine OpenJDK build and target platforms. This is required to
6587# have early on.
6588# Make sure we can run config.sub.
6589$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6590  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6591
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6593$as_echo_n "checking build system type... " >&6; }
6594if test "${ac_cv_build+set}" = set; then :
6595  $as_echo_n "(cached) " >&6
6596else
6597  ac_build_alias=$build_alias
6598test "x$ac_build_alias" = x &&
6599  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6600test "x$ac_build_alias" = x &&
6601  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6602ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6603  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6604
6605fi
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6607$as_echo "$ac_cv_build" >&6; }
6608case $ac_cv_build in
6609*-*-*) ;;
6610*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6611esac
6612build=$ac_cv_build
6613ac_save_IFS=$IFS; IFS='-'
6614set x $ac_cv_build
6615shift
6616build_cpu=$1
6617build_vendor=$2
6618shift; shift
6619# Remember, the first character of IFS is used to create $*,
6620# except with old shells:
6621build_os=$*
6622IFS=$ac_save_IFS
6623case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6624
6625
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6627$as_echo_n "checking host system type... " >&6; }
6628if test "${ac_cv_host+set}" = set; then :
6629  $as_echo_n "(cached) " >&6
6630else
6631  if test "x$host_alias" = x; then
6632  ac_cv_host=$ac_cv_build
6633else
6634  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6635    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6636fi
6637
6638fi
6639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6640$as_echo "$ac_cv_host" >&6; }
6641case $ac_cv_host in
6642*-*-*) ;;
6643*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6644esac
6645host=$ac_cv_host
6646ac_save_IFS=$IFS; IFS='-'
6647set x $ac_cv_host
6648shift
6649host_cpu=$1
6650host_vendor=$2
6651shift; shift
6652# Remember, the first character of IFS is used to create $*,
6653# except with old shells:
6654host_os=$*
6655IFS=$ac_save_IFS
6656case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6657
6658
6659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6660$as_echo_n "checking target system type... " >&6; }
6661if test "${ac_cv_target+set}" = set; then :
6662  $as_echo_n "(cached) " >&6
6663else
6664  if test "x$target_alias" = x; then
6665  ac_cv_target=$ac_cv_host
6666else
6667  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6668    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6669fi
6670
6671fi
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6673$as_echo "$ac_cv_target" >&6; }
6674case $ac_cv_target in
6675*-*-*) ;;
6676*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6677esac
6678target=$ac_cv_target
6679ac_save_IFS=$IFS; IFS='-'
6680set x $ac_cv_target
6681shift
6682target_cpu=$1
6683target_vendor=$2
6684shift; shift
6685# Remember, the first character of IFS is used to create $*,
6686# except with old shells:
6687target_os=$*
6688IFS=$ac_save_IFS
6689case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6690
6691
6692# The aliases save the names the user supplied, while $host etc.
6693# will get canonicalized.
6694test -n "$target_alias" &&
6695  test "$program_prefix$program_suffix$program_transform_name" = \
6696    NONENONEs,x,x, &&
6697  program_prefix=${target_alias}-
6698
6699# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6700# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6701# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6702# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6703# to use the configure naming style.
6704
6705
6706
6707
6708
6709    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6710    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6711    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6712    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6713    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6714    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6715
6716
6717
6718    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6719
6720  case "$build_os" in
6721    *linux*)
6722      VAR_OS=linux
6723      VAR_OS_API=posix
6724      VAR_OS_ENV=linux
6725      ;;
6726    *solaris*)
6727      VAR_OS=solaris
6728      VAR_OS_API=posix
6729      VAR_OS_ENV=solaris
6730      ;;
6731    *darwin*)
6732      VAR_OS=macosx
6733      VAR_OS_API=posix
6734      VAR_OS_ENV=macosx
6735      ;;
6736    *bsd*)
6737      VAR_OS=bsd
6738      VAR_OS_API=posix
6739      VAR_OS_ENV=bsd
6740      ;;
6741    *cygwin*)
6742      VAR_OS=windows
6743      VAR_OS_API=winapi
6744      VAR_OS_ENV=windows.cygwin
6745      ;;
6746    *mingw*)
6747      VAR_OS=windows
6748      VAR_OS_API=winapi
6749      VAR_OS_ENV=windows.msys
6750      ;;
6751    *)
6752      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6753      ;;
6754  esac
6755
6756
6757  # First argument is the cpu name from the trip/quad
6758  case "$build_cpu" in
6759    x86_64)
6760      VAR_CPU=x86_64
6761      VAR_CPU_ARCH=x86
6762      VAR_CPU_BITS=64
6763      VAR_CPU_ENDIAN=little
6764      ;;
6765    i?86)
6766      VAR_CPU=x86
6767      VAR_CPU_ARCH=x86
6768      VAR_CPU_BITS=32
6769      VAR_CPU_ENDIAN=little
6770      ;;
6771    arm*)
6772      VAR_CPU=arm
6773      VAR_CPU_ARCH=arm
6774      VAR_CPU_BITS=32
6775      VAR_CPU_ENDIAN=little
6776      ;;
6777    powerpc)
6778      VAR_CPU=ppc
6779      VAR_CPU_ARCH=ppc
6780      VAR_CPU_BITS=32
6781      VAR_CPU_ENDIAN=big
6782       ;;
6783    powerpc64)
6784      VAR_CPU=ppc64
6785      VAR_CPU_ARCH=ppc
6786      VAR_CPU_BITS=64
6787      VAR_CPU_ENDIAN=big
6788       ;;
6789    sparc)
6790      VAR_CPU=sparc
6791      VAR_CPU_ARCH=sparc
6792      VAR_CPU_BITS=32
6793      VAR_CPU_ENDIAN=big
6794       ;;
6795    sparcv9)
6796      VAR_CPU=sparcv9
6797      VAR_CPU_ARCH=sparc
6798      VAR_CPU_BITS=64
6799      VAR_CPU_ENDIAN=big
6800       ;;
6801    *)
6802      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6803      ;;
6804  esac
6805
6806    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6807    OPENJDK_BUILD_OS="$VAR_OS"
6808    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6809    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6810    OPENJDK_BUILD_CPU="$VAR_CPU"
6811    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6812    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6813    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6814
6815
6816
6817
6818
6819
6820
6821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6822$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6824$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6825
6826    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6827
6828  case "$host_os" in
6829    *linux*)
6830      VAR_OS=linux
6831      VAR_OS_API=posix
6832      VAR_OS_ENV=linux
6833      ;;
6834    *solaris*)
6835      VAR_OS=solaris
6836      VAR_OS_API=posix
6837      VAR_OS_ENV=solaris
6838      ;;
6839    *darwin*)
6840      VAR_OS=macosx
6841      VAR_OS_API=posix
6842      VAR_OS_ENV=macosx
6843      ;;
6844    *bsd*)
6845      VAR_OS=bsd
6846      VAR_OS_API=posix
6847      VAR_OS_ENV=bsd
6848      ;;
6849    *cygwin*)
6850      VAR_OS=windows
6851      VAR_OS_API=winapi
6852      VAR_OS_ENV=windows.cygwin
6853      ;;
6854    *mingw*)
6855      VAR_OS=windows
6856      VAR_OS_API=winapi
6857      VAR_OS_ENV=windows.msys
6858      ;;
6859    *)
6860      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6861      ;;
6862  esac
6863
6864
6865  # First argument is the cpu name from the trip/quad
6866  case "$host_cpu" in
6867    x86_64)
6868      VAR_CPU=x86_64
6869      VAR_CPU_ARCH=x86
6870      VAR_CPU_BITS=64
6871      VAR_CPU_ENDIAN=little
6872      ;;
6873    i?86)
6874      VAR_CPU=x86
6875      VAR_CPU_ARCH=x86
6876      VAR_CPU_BITS=32
6877      VAR_CPU_ENDIAN=little
6878      ;;
6879    arm*)
6880      VAR_CPU=arm
6881      VAR_CPU_ARCH=arm
6882      VAR_CPU_BITS=32
6883      VAR_CPU_ENDIAN=little
6884      ;;
6885    powerpc)
6886      VAR_CPU=ppc
6887      VAR_CPU_ARCH=ppc
6888      VAR_CPU_BITS=32
6889      VAR_CPU_ENDIAN=big
6890       ;;
6891    powerpc64)
6892      VAR_CPU=ppc64
6893      VAR_CPU_ARCH=ppc
6894      VAR_CPU_BITS=64
6895      VAR_CPU_ENDIAN=big
6896       ;;
6897    sparc)
6898      VAR_CPU=sparc
6899      VAR_CPU_ARCH=sparc
6900      VAR_CPU_BITS=32
6901      VAR_CPU_ENDIAN=big
6902       ;;
6903    sparcv9)
6904      VAR_CPU=sparcv9
6905      VAR_CPU_ARCH=sparc
6906      VAR_CPU_BITS=64
6907      VAR_CPU_ENDIAN=big
6908       ;;
6909    *)
6910      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6911      ;;
6912  esac
6913
6914    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6915    OPENJDK_TARGET_OS="$VAR_OS"
6916    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6917    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6918    OPENJDK_TARGET_CPU="$VAR_CPU"
6919    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6920    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6921    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6922
6923
6924
6925
6926
6927
6928
6929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6930$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6932$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6933
6934
6935
6936# Check whether --with-target-bits was given.
6937if test "${with_target_bits+set}" = set; then :
6938  withval=$with_target_bits;
6939fi
6940
6941
6942  # We have three types of compiles:
6943  # native  == normal compilation, target system == build system
6944  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6945  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6946  #
6947  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6948    # We're doing a proper cross-compilation
6949    COMPILE_TYPE="cross"
6950  else
6951    COMPILE_TYPE="native"
6952  fi
6953
6954  if test "x$with_target_bits" != x; then
6955    if test "x$COMPILE_TYPE" = "xcross"; then
6956      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6957    fi
6958
6959    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6960      # A reduced build is requested
6961      COMPILE_TYPE="reduced"
6962      OPENJDK_TARGET_CPU_BITS=32
6963      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6964        OPENJDK_TARGET_CPU=x86
6965      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6966        OPENJDK_TARGET_CPU=sparc
6967      else
6968        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6969      fi
6970    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6971      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
6972    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6973      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6974$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6975    else
6976      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6977    fi
6978  fi
6979
6980
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6982$as_echo_n "checking compilation type... " >&6; }
6983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6984$as_echo "$COMPILE_TYPE" >&6; }
6985
6986
6987    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6988       REQUIRED_OS_NAME=SunOS
6989       REQUIRED_OS_VERSION=5.10
6990    fi
6991    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6992       REQUIRED_OS_NAME=Linux
6993       REQUIRED_OS_VERSION=2.6
6994    fi
6995    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6996        REQUIRED_OS_NAME=Windows
6997        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6998            REQUIRED_OS_VERSION=5.2
6999        else
7000            REQUIRED_OS_VERSION=5.1
7001        fi
7002    fi
7003    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7004        REQUIRED_OS_NAME=Darwin
7005        REQUIRED_OS_VERSION=11.2
7006    fi
7007
7008
7009
7010
7011
7012    # Also store the legacy naming of the cpu.
7013    # Ie i586 and amd64 instead of x86 and x86_64
7014    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7015    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7016      OPENJDK_TARGET_CPU_LEGACY="i586"
7017    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7018      # On all platforms except MacOSX replace x86_64 with amd64.
7019      OPENJDK_TARGET_CPU_LEGACY="amd64"
7020    fi
7021
7022
7023    # And the second legacy naming of the cpu.
7024    # Ie i386 and amd64 instead of x86 and x86_64.
7025    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7026    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7027      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7028    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7029      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7030    fi
7031
7032
7033    # This is the name of the cpu (but using i386 and amd64 instead of
7034    # x86 and x86_64, respectively), preceeded by a /, to be used when
7035    # locating libraries. On macosx, it's empty, though.
7036    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7037    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7038        OPENJDK_TARGET_CPU_LIBDIR=""
7039    fi
7040
7041
7042    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7043    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7044    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7045    OPENJDK_TARGET_CPU_ISADIR=""
7046    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7047      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7048          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7049      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7050          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7051      fi
7052    fi
7053
7054
7055    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7056    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7057    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7058      # On linux only, we replace x86 with i386.
7059      OPENJDK_TARGET_CPU_OSARCH="i386"
7060    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061      # On all platforms except macosx, we replace x86_64 with amd64.
7062      OPENJDK_TARGET_CPU_OSARCH="amd64"
7063    fi
7064
7065
7066    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7067    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7068      OPENJDK_TARGET_CPU_JLI="i386"
7069    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7070      # On all platforms except macosx, we replace x86_64 with amd64.
7071      OPENJDK_TARGET_CPU_JLI="amd64"
7072    fi
7073    # Now setup the -D flags for building libjli.
7074    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7075    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7076      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7077        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7078      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7079        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7080      fi
7081    fi
7082
7083
7084    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7085    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7086        OPENJDK_TARGET_OS_API_DIR="solaris"
7087    fi
7088    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7089        OPENJDK_TARGET_OS_API_DIR="windows"
7090    fi
7091
7092
7093    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7094        A_LP64="LP64:="
7095        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7096        # unpack200.exe
7097        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7098            ADD_LP64="-D_LP64=1"
7099        fi
7100    fi
7101    LP64=$A_LP64
7102
7103
7104    if test "x$COMPILE_TYPE" = "xcross"; then
7105      # FIXME: ... or should this include reduced builds..?
7106      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7107    else
7108      DEFINE_CROSS_COMPILE_ARCH=""
7109    fi
7110
7111
7112    # ZERO_ARCHDEF is used to enable architecture-specific code
7113    case "${OPENJDK_TARGET_CPU}" in
7114      ppc*)    ZERO_ARCHDEF=PPC   ;;
7115      s390*)   ZERO_ARCHDEF=S390  ;;
7116      sparc*)  ZERO_ARCHDEF=SPARC ;;
7117      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7118      x86)     ZERO_ARCHDEF=IA32  ;;
7119      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7120    esac
7121
7122
7123
7124
7125
7126# Continue setting up basic stuff. Most remaining code require fundamental tools.
7127
7128# Locate the directory of this script.
7129SCRIPT="$0"
7130
7131    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7132        # Follow a chain of symbolic links. Use readlink
7133        # where it exists, else fall back to horribly
7134        # complicated shell code.
7135        if test "x$READLINK_TESTED" != yes; then
7136            # On MacOSX there is a readlink tool with a different
7137            # purpose than the GNU readlink tool. Check the found readlink.
7138            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7139            if test "x$ISGNU" = x; then
7140                 # A readlink that we do not know how to use.
7141                 # Are there other non-GNU readlinks out there?
7142                 READLINK_TESTED=yes
7143                 READLINK=
7144            fi
7145        fi
7146
7147        if test "x$READLINK" != x; then
7148            SCRIPT=`$READLINK -f $SCRIPT`
7149        else
7150            # Save the current directory for restoring afterwards
7151            STARTDIR=$PWD
7152            COUNTER=0
7153            sym_link_dir=`$DIRNAME $SCRIPT`
7154            sym_link_file=`$BASENAME $SCRIPT`
7155            # Use the system pwd and not the shell builtin to resolve directory symlinks
7156            cd $sym_link_dir
7157            cd `$THEPWDCMD`
7158            sym_link_dir=`$THEPWDCMD`
7159            # Resolve file symlinks
7160            while test $COUNTER -lt 20; do
7161                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7162                if test "x$ISLINK" == x; then
7163                    # This is not a symbolic link! We are done!
7164                    break
7165                fi
7166                # Again resolve directory symlinks since the target of the just found
7167                # link could be in a different directory
7168                cd `$DIRNAME $ISLINK`
7169                sym_link_dir=`$THEPWDCMD`
7170                sym_link_file=`$BASENAME $ISLINK`
7171                let COUNTER=COUNTER+1
7172            done
7173            cd $STARTDIR
7174            SCRIPT=$sym_link_dir/$sym_link_file
7175        fi
7176    fi
7177
7178AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7179
7180# Where is the source? It is located two levels above the configure script.
7181CURDIR="$PWD"
7182cd "$AUTOCONF_DIR/../.."
7183SRC_ROOT="`$THEPWDCMD`"
7184
7185if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7186  PATH_SEP=";"
7187
7188  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7189  if test $SRC_ROOT_LENGTH -gt 100; then
7190      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7191  fi
7192
7193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7195$as_echo_n "checking cygwin release... " >&6; }
7196    CYGWIN_VERSION=`$UNAME -r`
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7198$as_echo "$CYGWIN_VERSION" >&6; }
7199    WINDOWS_ENV_VENDOR='cygwin'
7200    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7201
7202    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7203    if test "x$CYGWIN_VERSION_OK" = x; then
7204      { $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
7205$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;}
7206      as_fn_error $? "Cannot continue" "$LINENO" 5
7207    fi
7208    if test "x$CYGPATH" = x; then
7209        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7210    fi
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7212$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7213    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7214    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7215    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7216    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7218$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7219    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7220    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7221    if test "x$test_cygdrive_prefix" = x; then
7222        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7223    fi
7224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7226$as_echo_n "checking msys release... " >&6; }
7227    MSYS_VERSION=`$UNAME -r`
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7229$as_echo "$MSYS_VERSION" >&6; }
7230
7231    WINDOWS_ENV_VENDOR='msys'
7232    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7233
7234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7235$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7236    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7237    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7238
7239  windows_path="$MSYS_ROOT_PATH"
7240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7241    unix_path=`$CYGPATH -u "$windows_path"`
7242    MSYS_ROOT_PATH="$unix_path"
7243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7245    MSYS_ROOT_PATH="$unix_path"
7246  fi
7247
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7249$as_echo "$MSYS_ROOT_PATH" >&6; }
7250    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7251  else
7252    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7253  fi
7254
7255  # Test if windows or unix (cygwin/msys) find is first in path.
7256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7257$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7258  FIND_BINARY_OUTPUT=`find --version 2>&1`
7259  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7261$as_echo "unix style" >&6; }
7262  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7264$as_echo "Windows" >&6; }
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7266$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7267    { $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
7268$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7269    as_fn_error $? "Cannot continue" "$LINENO" 5
7270  else
7271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7272$as_echo "unknown" >&6; }
7273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7274$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7275  fi
7276
7277else
7278  PATH_SEP=":"
7279fi
7280
7281
7282
7283cd "$CURDIR"
7284
7285
7286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7287
7288  # Input might be given as Windows format, start by converting to
7289  # unix format.
7290  path="$SRC_ROOT"
7291  new_path=`$CYGPATH -u "$path"`
7292
7293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7296  # "foo.exe" is OK but "foo" is an error.
7297  #
7298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7299  # It is also a way to make sure we got the proper file name for the real test later on.
7300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7301  if test "x$test_shortpath" = x; then
7302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7303$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7304    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7305  fi
7306
7307  # Call helper function which possibly converts this using DOS-style short mode.
7308  # If so, the updated path is stored in $new_path.
7309
7310  input_path="$new_path"
7311  # Check if we need to convert this using DOS-style short mode. If the path
7312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7313  # take no chances and rewrite it.
7314  # Note: m4 eats our [], so we need to use [ and ] instead.
7315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7316  if test "x$has_forbidden_chars" != x; then
7317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7321      # Going to short mode and back again did indeed matter. Since short mode is
7322      # case insensitive, let's make it lowercase to improve readability.
7323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7324      # Now convert it back to Unix-stile (cygpath)
7325      input_path=`$CYGPATH -u "$shortmode_path"`
7326      new_path="$input_path"
7327    fi
7328  fi
7329
7330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7331  if test "x$test_cygdrive_prefix" = x; then
7332    # As a simple fix, exclude /usr/bin since it's not a real path.
7333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7335      # a path prefixed by /cygdrive for fixpath to work.
7336      new_path="$CYGWIN_ROOT_PATH$input_path"
7337    fi
7338  fi
7339
7340
7341  if test "x$path" != "x$new_path"; then
7342    SRC_ROOT="$new_path"
7343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7344$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7345  fi
7346
7347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7348
7349  path="$SRC_ROOT"
7350  has_colon=`$ECHO $path | $GREP ^.:`
7351  new_path="$path"
7352  if test "x$has_colon" = x; then
7353    # Not in mixed or Windows style, start by that.
7354    new_path=`cmd //c echo $path`
7355  fi
7356
7357
7358  input_path="$new_path"
7359  # Check if we need to convert this using DOS-style short mode. If the path
7360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7361  # take no chances and rewrite it.
7362  # Note: m4 eats our [], so we need to use [ and ] instead.
7363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7364  if test "x$has_forbidden_chars" != x; then
7365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7367  fi
7368
7369
7370  windows_path="$new_path"
7371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7372    unix_path=`$CYGPATH -u "$windows_path"`
7373    new_path="$unix_path"
7374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7376    new_path="$unix_path"
7377  fi
7378
7379  if test "x$path" != "x$new_path"; then
7380    SRC_ROOT="$new_path"
7381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7382$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7383  fi
7384
7385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7387
7388  else
7389    # We're on a posix platform. Hooray! :)
7390    path="$SRC_ROOT"
7391
7392    if test ! -f "$path" && test ! -d "$path"; then
7393      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7394    fi
7395
7396    has_space=`$ECHO "$path" | $GREP " "`
7397    if test "x$has_space" != x; then
7398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7399$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7400      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7401    fi
7402  fi
7403
7404
7405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7406
7407  # Input might be given as Windows format, start by converting to
7408  # unix format.
7409  path="$CURDIR"
7410  new_path=`$CYGPATH -u "$path"`
7411
7412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7415  # "foo.exe" is OK but "foo" is an error.
7416  #
7417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7418  # It is also a way to make sure we got the proper file name for the real test later on.
7419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7420  if test "x$test_shortpath" = x; then
7421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7422$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7423    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7424  fi
7425
7426  # Call helper function which possibly converts this using DOS-style short mode.
7427  # If so, the updated path is stored in $new_path.
7428
7429  input_path="$new_path"
7430  # Check if we need to convert this using DOS-style short mode. If the path
7431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7432  # take no chances and rewrite it.
7433  # Note: m4 eats our [], so we need to use [ and ] instead.
7434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7435  if test "x$has_forbidden_chars" != x; then
7436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7440      # Going to short mode and back again did indeed matter. Since short mode is
7441      # case insensitive, let's make it lowercase to improve readability.
7442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7443      # Now convert it back to Unix-stile (cygpath)
7444      input_path=`$CYGPATH -u "$shortmode_path"`
7445      new_path="$input_path"
7446    fi
7447  fi
7448
7449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7450  if test "x$test_cygdrive_prefix" = x; then
7451    # As a simple fix, exclude /usr/bin since it's not a real path.
7452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7454      # a path prefixed by /cygdrive for fixpath to work.
7455      new_path="$CYGWIN_ROOT_PATH$input_path"
7456    fi
7457  fi
7458
7459
7460  if test "x$path" != "x$new_path"; then
7461    CURDIR="$new_path"
7462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7463$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7464  fi
7465
7466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7467
7468  path="$CURDIR"
7469  has_colon=`$ECHO $path | $GREP ^.:`
7470  new_path="$path"
7471  if test "x$has_colon" = x; then
7472    # Not in mixed or Windows style, start by that.
7473    new_path=`cmd //c echo $path`
7474  fi
7475
7476
7477  input_path="$new_path"
7478  # Check if we need to convert this using DOS-style short mode. If the path
7479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7480  # take no chances and rewrite it.
7481  # Note: m4 eats our [], so we need to use [ and ] instead.
7482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7483  if test "x$has_forbidden_chars" != x; then
7484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7486  fi
7487
7488
7489  windows_path="$new_path"
7490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7491    unix_path=`$CYGPATH -u "$windows_path"`
7492    new_path="$unix_path"
7493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7495    new_path="$unix_path"
7496  fi
7497
7498  if test "x$path" != "x$new_path"; then
7499    CURDIR="$new_path"
7500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7501$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7502  fi
7503
7504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7506
7507  else
7508    # We're on a posix platform. Hooray! :)
7509    path="$CURDIR"
7510
7511    if test ! -f "$path" && test ! -d "$path"; then
7512      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7513    fi
7514
7515    has_space=`$ECHO "$path" | $GREP " "`
7516    if test "x$has_space" != x; then
7517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7518$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7519      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7520    fi
7521  fi
7522
7523
7524if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7525    # Add extra search paths on solaris for utilities like ar and as etc...
7526    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7527fi
7528
7529# You can force the sys-root if the sys-root encoded into the cross compiler tools
7530# is not correct.
7531
7532# Check whether --with-sys-root was given.
7533if test "${with_sys_root+set}" = set; then :
7534  withval=$with_sys_root;
7535fi
7536
7537
7538if test "x$with_sys_root" != x; then
7539  SYS_ROOT=$with_sys_root
7540else
7541  SYS_ROOT=/
7542fi
7543
7544
7545
7546# Check whether --with-tools-dir was given.
7547if test "${with_tools_dir+set}" = set; then :
7548  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7549fi
7550
7551
7552
7553# Check whether --with-devkit was given.
7554if test "${with_devkit+set}" = set; then :
7555  withval=$with_devkit;
7556    if test "x$with_sys_root" != x; then
7557      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7558    fi
7559    if test "x$with_tools_dir" != x; then
7560      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7561    fi
7562    TOOLS_DIR=$with_devkit/bin
7563    SYS_ROOT=$with_devkit/$host_alias/libc
7564
7565fi
7566
7567
7568
7569
7570# Setup default logging of stdout and stderr to build.log in the output root.
7571BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7572BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7573BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7574
7575
7576
7577
7578
7579# Check if it's a pure open build or if custom sources are to be used.
7580
7581  # Check whether --enable-openjdk-only was given.
7582if test "${enable_openjdk_only+set}" = set; then :
7583  enableval=$enable_openjdk_only;
7584else
7585  enable_openjdk_only="no"
7586fi
7587
7588
7589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7590$as_echo_n "checking for presence of closed sources... " >&6; }
7591  if test -d "$SRC_ROOT/jdk/src/closed"; then
7592    CLOSED_SOURCE_PRESENT=yes
7593  else
7594    CLOSED_SOURCE_PRESENT=no
7595  fi
7596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7597$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7598
7599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7600$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7601  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7603$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7604
7605  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7606    OPENJDK=true
7607    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7608      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7609$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7610    fi
7611  else
7612    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7613      OPENJDK=true
7614    else
7615      OPENJDK=false
7616    fi
7617  fi
7618
7619  if test "x$OPENJDK" = "xtrue"; then
7620    SET_OPENJDK="OPENJDK=true"
7621  fi
7622
7623
7624
7625
7626# These are needed to be able to create a configuration name (and thus the output directory)
7627
7628###############################################################################
7629#
7630# Check which variant of the JDK that we want to build.
7631# Currently we have:
7632#    normal:   standard edition
7633# but the custom make system may add other variants
7634#
7635# Effectively the JDK variant gives a name to a specific set of
7636# modules to compile into the JDK. In the future, these modules
7637# might even be Jigsaw modules.
7638#
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7640$as_echo_n "checking which variant of the JDK to build... " >&6; }
7641
7642# Check whether --with-jdk-variant was given.
7643if test "${with_jdk_variant+set}" = set; then :
7644  withval=$with_jdk_variant;
7645fi
7646
7647
7648if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7649    JDK_VARIANT="normal"
7650else
7651    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7652fi
7653
7654
7655
7656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7657$as_echo "$JDK_VARIANT" >&6; }
7658
7659
7660
7661###############################################################################
7662#
7663# Check which variants of the JVM that we want to build.
7664# Currently we have:
7665#    server: normal interpreter and a tiered C1/C2 compiler
7666#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7667#    minimal1: reduced form of client with optional VM services and features stripped out
7668#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7669#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7670#    zero: no machine code interpreter, no compiler
7671#    zeroshark: zero interpreter and shark/llvm compiler backend
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7673$as_echo_n "checking which variants of the JVM to build... " >&6; }
7674
7675# Check whether --with-jvm-variants was given.
7676if test "${with_jvm_variants+set}" = set; then :
7677  withval=$with_jvm_variants;
7678fi
7679
7680
7681if test "x$with_jvm_variants" = x; then
7682     with_jvm_variants="server"
7683fi
7684
7685JVM_VARIANTS=",$with_jvm_variants,"
7686TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7687
7688if test "x$TEST_VARIANTS" != "x,"; then
7689   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7690fi
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7692$as_echo "$with_jvm_variants" >&6; }
7693
7694JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7695JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7696JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7697JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7698JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7699JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7700
7701if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7702    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7703        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7704    fi
7705fi
7706if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7707    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7708        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7709    fi
7710fi
7711if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7712    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7713        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7714    fi
7715fi
7716
7717# Replace the commas with AND for use in the build directory name.
7718ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7719COUNT_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/'`
7720if test "x$COUNT_VARIANTS" != "x,1"; then
7721    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7722else
7723    BUILDING_MULTIPLE_JVM_VARIANTS=no
7724fi
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734INCLUDE_SA=true
7735if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7736    INCLUDE_SA=false
7737fi
7738if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7739    INCLUDE_SA=false
7740fi
7741
7742
7743if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7744   MACOSX_UNIVERSAL="true"
7745fi
7746
7747
7748
7749
7750
7751###############################################################################
7752#
7753# Set the debug level
7754#    release: no debug information, all optimizations, no asserts.
7755#    fastdebug: debug information (-g), all optimizations, all asserts
7756#    slowdebug: debug information (-g), no optimizations, all asserts
7757#
7758DEBUG_LEVEL="release"
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7760$as_echo_n "checking which debug level to use... " >&6; }
7761# Check whether --enable-debug was given.
7762if test "${enable_debug+set}" = set; then :
7763  enableval=$enable_debug;
7764        ENABLE_DEBUG="${enableval}"
7765        DEBUG_LEVEL="fastdebug"
7766
7767else
7768  ENABLE_DEBUG="no"
7769fi
7770
7771
7772
7773# Check whether --with-debug-level was given.
7774if test "${with_debug_level+set}" = set; then :
7775  withval=$with_debug_level;
7776        DEBUG_LEVEL="${withval}"
7777        if test "x$ENABLE_DEBUG" = xyes; then
7778			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7779        fi
7780
7781fi
7782
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7784$as_echo "$DEBUG_LEVEL" >&6; }
7785
7786if test "x$DEBUG_LEVEL" != xrelease && \
7787   test "x$DEBUG_LEVEL" != xfastdebug && \
7788   test "x$DEBUG_LEVEL" != xslowdebug; then
7789   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7790fi
7791
7792
7793###############################################################################
7794#
7795# Setup legacy vars/targets and new vars to deal with different debug levels.
7796#
7797
7798case $DEBUG_LEVEL in
7799      release )
7800          VARIANT="OPT"
7801          FASTDEBUG="false"
7802          DEBUG_CLASSFILES="false"
7803          BUILD_VARIANT_RELEASE=""
7804          HOTSPOT_DEBUG_LEVEL="product"
7805          HOTSPOT_EXPORT="product"
7806           ;;
7807      fastdebug )
7808          VARIANT="DBG"
7809          FASTDEBUG="true"
7810          DEBUG_CLASSFILES="true"
7811          BUILD_VARIANT_RELEASE="-fastdebug"
7812          HOTSPOT_DEBUG_LEVEL="fastdebug"
7813          HOTSPOT_EXPORT="fastdebug"
7814           ;;
7815      slowdebug )
7816          VARIANT="DBG"
7817          FASTDEBUG="false"
7818          DEBUG_CLASSFILES="true"
7819          BUILD_VARIANT_RELEASE="-debug"
7820          HOTSPOT_DEBUG_LEVEL="jvmg"
7821          HOTSPOT_EXPORT="debug"
7822           ;;
7823esac
7824
7825#####
7826# Generate the legacy makefile targets for hotspot.
7827# The hotspot api for selecting the build artifacts, really, needs to be improved.
7828# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7829# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7830# But until then ...
7831HOTSPOT_TARGET=""
7832
7833if test "x$JVM_VARIANT_SERVER" = xtrue; then
7834    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7835fi
7836
7837if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7838    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7839fi
7840
7841if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7842    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7843fi
7844
7845if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7846    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7847fi
7848
7849if test "x$JVM_VARIANT_ZERO" = xtrue; then
7850    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7851fi
7852
7853if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7854    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7855fi
7856
7857HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7858
7859# On Macosx universal binaries are produced, but they only contain
7860# 64 bit intel. This invalidates control of which jvms are built
7861# from configure, but only server is valid anyway. Fix this
7862# when hotspot makefiles are rewritten.
7863if test "x$MACOSX_UNIVERSAL" = xtrue; then
7864    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7865fi
7866
7867#####
7868
7869
7870
7871
7872
7873
7874
7875
7876# With basic setup done, call the custom early hook.
7877
7878
7879# To properly create a configuration name, we need to have the OpenJDK target
7880# and options (variants and debug level) parsed.
7881
7882
7883
7884# Check whether --with-conf-name was given.
7885if test "${with_conf_name+set}" = set; then :
7886  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7887fi
7888
7889
7890# Test from where we are running configure, in or outside of src root.
7891# To enable comparison of directories, CURDIR needs to be symlink free
7892# just like SRC_ROOT already is
7893NOSYM_CURDIR="$CURDIR"
7894
7895    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7896        # Follow a chain of symbolic links. Use readlink
7897        # where it exists, else fall back to horribly
7898        # complicated shell code.
7899        if test "x$READLINK_TESTED" != yes; then
7900            # On MacOSX there is a readlink tool with a different
7901            # purpose than the GNU readlink tool. Check the found readlink.
7902            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7903            if test "x$ISGNU" = x; then
7904                 # A readlink that we do not know how to use.
7905                 # Are there other non-GNU readlinks out there?
7906                 READLINK_TESTED=yes
7907                 READLINK=
7908            fi
7909        fi
7910
7911        if test "x$READLINK" != x; then
7912            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7913        else
7914            # Save the current directory for restoring afterwards
7915            STARTDIR=$PWD
7916            COUNTER=0
7917            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7918            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7919            # Use the system pwd and not the shell builtin to resolve directory symlinks
7920            cd $sym_link_dir
7921            cd `$THEPWDCMD`
7922            sym_link_dir=`$THEPWDCMD`
7923            # Resolve file symlinks
7924            while test $COUNTER -lt 20; do
7925                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7926                if test "x$ISLINK" == x; then
7927                    # This is not a symbolic link! We are done!
7928                    break
7929                fi
7930                # Again resolve directory symlinks since the target of the just found
7931                # link could be in a different directory
7932                cd `$DIRNAME $ISLINK`
7933                sym_link_dir=`$THEPWDCMD`
7934                sym_link_file=`$BASENAME $ISLINK`
7935                let COUNTER=COUNTER+1
7936            done
7937            cd $STARTDIR
7938            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7939        fi
7940    fi
7941
7942if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7943        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7944        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7945    # We are running configure from the src root.
7946    # Create a default ./build/target-variant-debuglevel output root.
7947    if test "x${CONF_NAME}" = x; then
7948        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7949    fi
7950    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7951    $MKDIR -p "$OUTPUT_ROOT"
7952    if test ! -d "$OUTPUT_ROOT"; then
7953        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7954    fi
7955else
7956    # We are running configure from outside of the src dir.
7957    # Then use the current directory as output dir!
7958    # If configuration is situated in normal build directory, just use the build
7959    # directory name as configuration name, otherwise use the complete path.
7960    if test "x${CONF_NAME}" = x; then
7961        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7962    fi
7963    OUTPUT_ROOT="$CURDIR"
7964
7965    # WARNING: This might be a bad thing to do. You need to be sure you want to
7966    # have a configuration in this directory. Do some sanity checks!
7967
7968    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7969      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7970      # other files
7971      files_present=`$LS $OUTPUT_ROOT`
7972      # Configure has already touched config.log and confdefs.h in the current dir when this check
7973      # is performed.
7974      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7975                                             | $TR -d '\n'`
7976      if test "x$filtered_files" != x; then
7977        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7978$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7979        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7980$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7981        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7982$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7983        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7984$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7985        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7986$as_echo "$as_me: seriously mess up just about everything." >&6;}
7987        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7988$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7990$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7991        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7992      fi
7993    fi
7994fi
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7996$as_echo_n "checking what configuration name to use... " >&6; }
7997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7998$as_echo "$CONF_NAME" >&6; }
7999
8000
8001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8002
8003  # Input might be given as Windows format, start by converting to
8004  # unix format.
8005  path="$OUTPUT_ROOT"
8006  new_path=`$CYGPATH -u "$path"`
8007
8008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8011  # "foo.exe" is OK but "foo" is an error.
8012  #
8013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8014  # It is also a way to make sure we got the proper file name for the real test later on.
8015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8016  if test "x$test_shortpath" = x; then
8017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8018$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8019    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8020  fi
8021
8022  # Call helper function which possibly converts this using DOS-style short mode.
8023  # If so, the updated path is stored in $new_path.
8024
8025  input_path="$new_path"
8026  # Check if we need to convert this using DOS-style short mode. If the path
8027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8028  # take no chances and rewrite it.
8029  # Note: m4 eats our [], so we need to use [ and ] instead.
8030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8031  if test "x$has_forbidden_chars" != x; then
8032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8036      # Going to short mode and back again did indeed matter. Since short mode is
8037      # case insensitive, let's make it lowercase to improve readability.
8038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8039      # Now convert it back to Unix-stile (cygpath)
8040      input_path=`$CYGPATH -u "$shortmode_path"`
8041      new_path="$input_path"
8042    fi
8043  fi
8044
8045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8046  if test "x$test_cygdrive_prefix" = x; then
8047    # As a simple fix, exclude /usr/bin since it's not a real path.
8048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8050      # a path prefixed by /cygdrive for fixpath to work.
8051      new_path="$CYGWIN_ROOT_PATH$input_path"
8052    fi
8053  fi
8054
8055
8056  if test "x$path" != "x$new_path"; then
8057    OUTPUT_ROOT="$new_path"
8058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8059$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8060  fi
8061
8062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8063
8064  path="$OUTPUT_ROOT"
8065  has_colon=`$ECHO $path | $GREP ^.:`
8066  new_path="$path"
8067  if test "x$has_colon" = x; then
8068    # Not in mixed or Windows style, start by that.
8069    new_path=`cmd //c echo $path`
8070  fi
8071
8072
8073  input_path="$new_path"
8074  # Check if we need to convert this using DOS-style short mode. If the path
8075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8076  # take no chances and rewrite it.
8077  # Note: m4 eats our [], so we need to use [ and ] instead.
8078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8079  if test "x$has_forbidden_chars" != x; then
8080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8082  fi
8083
8084
8085  windows_path="$new_path"
8086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8087    unix_path=`$CYGPATH -u "$windows_path"`
8088    new_path="$unix_path"
8089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8091    new_path="$unix_path"
8092  fi
8093
8094  if test "x$path" != "x$new_path"; then
8095    OUTPUT_ROOT="$new_path"
8096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8097$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8098  fi
8099
8100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8102
8103  else
8104    # We're on a posix platform. Hooray! :)
8105    path="$OUTPUT_ROOT"
8106
8107    if test ! -f "$path" && test ! -d "$path"; then
8108      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8109    fi
8110
8111    has_space=`$ECHO "$path" | $GREP " "`
8112    if test "x$has_space" != x; then
8113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8114$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8115      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8116    fi
8117  fi
8118
8119
8120SPEC=$OUTPUT_ROOT/spec.gmk
8121
8122CONF_NAME=$CONF_NAME
8123
8124OUTPUT_ROOT=$OUTPUT_ROOT
8125
8126
8127# Most of the probed defines are put into config.h
8128ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8129
8130# The spec.gmk file contains all variables for the make system.
8131ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8132
8133# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8134ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8135
8136# The bootcycle-spec.gmk file contains support for boot cycle builds.
8137ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8138
8139# The compare.sh is used to compare the build output to other builds.
8140ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8141
8142# Spec.sh is currently used by compare-objects.sh
8143ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8144
8145# The generated Makefile knows where the spec.gmk is and where the source is.
8146# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8147# which will look for generated configurations
8148ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8149
8150
8151# Save the arguments given to us
8152echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8153
8154
8155# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8156
8157    for ac_prog in apt-get yum port pkgutil pkgadd
8158do
8159  # Extract the first word of "$ac_prog", so it can be a program name with args.
8160set dummy $ac_prog; ac_word=$2
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8162$as_echo_n "checking for $ac_word... " >&6; }
8163if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8164  $as_echo_n "(cached) " >&6
8165else
8166  if test -n "$PKGHANDLER"; then
8167  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8168else
8169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170for as_dir in $PATH
8171do
8172  IFS=$as_save_IFS
8173  test -z "$as_dir" && as_dir=.
8174    for ac_exec_ext in '' $ac_executable_extensions; do
8175  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8176    ac_cv_prog_PKGHANDLER="$ac_prog"
8177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178    break 2
8179  fi
8180done
8181  done
8182IFS=$as_save_IFS
8183
8184fi
8185fi
8186PKGHANDLER=$ac_cv_prog_PKGHANDLER
8187if test -n "$PKGHANDLER"; then
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8189$as_echo "$PKGHANDLER" >&6; }
8190else
8191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192$as_echo "no" >&6; }
8193fi
8194
8195
8196  test -n "$PKGHANDLER" && break
8197done
8198
8199
8200
8201# Setup tools that requires more complex handling, or that is not needed by the configure script.
8202
8203
8204  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8205  if test "x$MAKE" != x; then
8206    # User has supplied a make, test it.
8207    if test ! -f "$MAKE"; then
8208      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8209    fi
8210
8211  MAKE_CANDIDATE=""$MAKE""
8212  DESCRIPTION="user supplied MAKE=$MAKE"
8213  if test "x$MAKE_CANDIDATE" != x; then
8214    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8215$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8216    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8217    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8218    if test "x$IS_GNU_MAKE" = x; then
8219      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8220$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8221    else
8222      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8223      if test "x$IS_MODERN_MAKE" = x; then
8224        { $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
8225$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;}
8226      else
8227        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8228          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8229            MAKE_EXPECTED_ENV='cygwin'
8230          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8231            MAKE_EXPECTED_ENV='msys'
8232          else
8233            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8234          fi
8235          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8236          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8237        else
8238          # Not relevant for non-Windows
8239          IS_MAKE_CORRECT_ENV=true
8240        fi
8241        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8242          { $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
8243$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;}
8244        else
8245          FOUND_MAKE=$MAKE_CANDIDATE
8246
8247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8248
8249  # First separate the path from the arguments. This will split at the first
8250  # space.
8251  complete="$FOUND_MAKE"
8252  path="${complete%% *}"
8253  tmp="$complete EOL"
8254  arguments="${tmp#* }"
8255
8256  # Input might be given as Windows format, start by converting to
8257  # unix format.
8258  new_path=`$CYGPATH -u "$path"`
8259
8260  # Now try to locate executable using which
8261  new_path=`$WHICH "$new_path" 2> /dev/null`
8262  # bat and cmd files are not always considered executable in cygwin causing which
8263  # to not find them
8264  if test "x$new_path" = x \
8265           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8266           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8267    new_path=`$CYGPATH -u "$path"`
8268  fi
8269  if test "x$new_path" = x; then
8270    # Oops. Which didn't find the executable.
8271    # The splitting of arguments from the executable at a space might have been incorrect,
8272    # since paths with space are more likely in Windows. Give it another try with the whole
8273    # argument.
8274    path="$complete"
8275    arguments="EOL"
8276    new_path=`$CYGPATH -u "$path"`
8277    new_path=`$WHICH "$new_path" 2> /dev/null`
8278    # bat and cmd files are not always considered executable in cygwin causing which
8279    # to not find them
8280    if test "x$new_path" = x \
8281             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8282             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8283      new_path=`$CYGPATH -u "$path"`
8284    fi
8285    if test "x$new_path" = x; then
8286      # It's still not found. Now this is an unrecoverable error.
8287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8289      has_space=`$ECHO "$complete" | $GREP " "`
8290      if test "x$has_space" != x; then
8291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8293      fi
8294      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8295    fi
8296  fi
8297
8298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8301  # "foo.exe" is OK but "foo" is an error.
8302  #
8303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8304  # It is also a way to make sure we got the proper file name for the real test later on.
8305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8306  if test "x$test_shortpath" = x; then
8307    # Short path failed, file does not exist as specified.
8308    # Try adding .exe or .cmd
8309    if test -f "${new_path}.exe"; then
8310       input_to_shortpath="${new_path}.exe"
8311    elif test -f "${new_path}.cmd"; then
8312       input_to_shortpath="${new_path}.cmd"
8313    else
8314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8315$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8318      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8319    fi
8320  else
8321    input_to_shortpath="$new_path"
8322  fi
8323
8324  # Call helper function which possibly converts this using DOS-style short mode.
8325  # If so, the updated path is stored in $new_path.
8326  new_path="$input_to_shortpath"
8327
8328  input_path="$input_to_shortpath"
8329  # Check if we need to convert this using DOS-style short mode. If the path
8330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8331  # take no chances and rewrite it.
8332  # Note: m4 eats our [], so we need to use [ and ] instead.
8333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8334  if test "x$has_forbidden_chars" != x; then
8335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8339      # Going to short mode and back again did indeed matter. Since short mode is
8340      # case insensitive, let's make it lowercase to improve readability.
8341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8342      # Now convert it back to Unix-stile (cygpath)
8343      input_path=`$CYGPATH -u "$shortmode_path"`
8344      new_path="$input_path"
8345    fi
8346  fi
8347
8348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8349  if test "x$test_cygdrive_prefix" = x; then
8350    # As a simple fix, exclude /usr/bin since it's not a real path.
8351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8353      # a path prefixed by /cygdrive for fixpath to work.
8354      new_path="$CYGWIN_ROOT_PATH$input_path"
8355    fi
8356  fi
8357
8358  # remove trailing .exe if any
8359  new_path="${new_path/%.exe/}"
8360
8361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8362
8363  # First separate the path from the arguments. This will split at the first
8364  # space.
8365  complete="$FOUND_MAKE"
8366  path="${complete%% *}"
8367  tmp="$complete EOL"
8368  arguments="${tmp#* }"
8369
8370  # Input might be given as Windows format, start by converting to
8371  # unix format.
8372  new_path="$path"
8373
8374  windows_path="$new_path"
8375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8376    unix_path=`$CYGPATH -u "$windows_path"`
8377    new_path="$unix_path"
8378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8380    new_path="$unix_path"
8381  fi
8382
8383
8384  # Now try to locate executable using which
8385  new_path=`$WHICH "$new_path" 2> /dev/null`
8386
8387  if test "x$new_path" = x; then
8388    # Oops. Which didn't find the executable.
8389    # The splitting of arguments from the executable at a space might have been incorrect,
8390    # since paths with space are more likely in Windows. Give it another try with the whole
8391    # argument.
8392    path="$complete"
8393    arguments="EOL"
8394    new_path="$path"
8395
8396  windows_path="$new_path"
8397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8398    unix_path=`$CYGPATH -u "$windows_path"`
8399    new_path="$unix_path"
8400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8402    new_path="$unix_path"
8403  fi
8404
8405
8406    new_path=`$WHICH "$new_path" 2> /dev/null`
8407
8408    if test "x$new_path" = x; then
8409      # It's still not found. Now this is an unrecoverable error.
8410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8412      has_space=`$ECHO "$complete" | $GREP " "`
8413      if test "x$has_space" != x; then
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8416      fi
8417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8418    fi
8419  fi
8420
8421  # Now new_path has a complete unix path to the binary
8422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8423    # Keep paths in /bin as-is, but remove trailing .exe if any
8424    new_path="${new_path/%.exe/}"
8425    # Do not save /bin paths to all_fixpath_prefixes!
8426  else
8427    # Not in mixed or Windows style, start by that.
8428    new_path=`cmd //c echo $new_path`
8429
8430  input_path="$new_path"
8431  # Check if we need to convert this using DOS-style short mode. If the path
8432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8433  # take no chances and rewrite it.
8434  # Note: m4 eats our [], so we need to use [ and ] instead.
8435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8436  if test "x$has_forbidden_chars" != x; then
8437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8439  fi
8440
8441    # Output is in $new_path
8442
8443  windows_path="$new_path"
8444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8445    unix_path=`$CYGPATH -u "$windows_path"`
8446    new_path="$unix_path"
8447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8449    new_path="$unix_path"
8450  fi
8451
8452    # remove trailing .exe if any
8453    new_path="${new_path/%.exe/}"
8454
8455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8457  fi
8458
8459  else
8460    # We're on a posix platform. Hooray! :)
8461    # First separate the path from the arguments. This will split at the first
8462    # space.
8463    complete="$FOUND_MAKE"
8464    path="${complete%% *}"
8465    tmp="$complete EOL"
8466    arguments="${tmp#* }"
8467
8468    # Cannot rely on the command "which" here since it doesn't always work.
8469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8470    if test -z "$is_absolute_path"; then
8471      # Path to executable is not absolute. Find it.
8472      IFS_save="$IFS"
8473      IFS=:
8474      for p in $PATH; do
8475        if test -f "$p/$path" && test -x "$p/$path"; then
8476          new_path="$p/$path"
8477          break
8478        fi
8479      done
8480      IFS="$IFS_save"
8481    else
8482      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8483$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8484      new_path="$path"
8485    fi
8486
8487    if test "x$new_path" = x; then
8488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8490        has_space=`$ECHO "$complete" | $GREP " "`
8491        if test "x$has_space" != x; then
8492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8494        fi
8495        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8496      fi
8497  fi
8498
8499      # Now join together the path and the arguments once again
8500      if test "x$arguments" != xEOL; then
8501        new_complete="$new_path ${arguments% *}"
8502      else
8503        new_complete="$new_path"
8504      fi
8505
8506  if test "x$complete" != "x$new_complete"; then
8507      FOUND_MAKE="$new_complete"
8508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8509$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8510    fi
8511
8512        fi
8513      fi
8514    fi
8515  fi
8516
8517    if test "x$FOUND_MAKE" = x; then
8518      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8519    fi
8520  else
8521    # Try our hardest to locate a correct version of GNU make
8522    for ac_prog in gmake
8523do
8524  # Extract the first word of "$ac_prog", so it can be a program name with args.
8525set dummy $ac_prog; ac_word=$2
8526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8527$as_echo_n "checking for $ac_word... " >&6; }
8528if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8529  $as_echo_n "(cached) " >&6
8530else
8531  case $CHECK_GMAKE in
8532  [\\/]* | ?:[\\/]*)
8533  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8534  ;;
8535  *)
8536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8537for as_dir in $PATH
8538do
8539  IFS=$as_save_IFS
8540  test -z "$as_dir" && as_dir=.
8541    for ac_exec_ext in '' $ac_executable_extensions; do
8542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8543    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8545    break 2
8546  fi
8547done
8548  done
8549IFS=$as_save_IFS
8550
8551  ;;
8552esac
8553fi
8554CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8555if test -n "$CHECK_GMAKE"; then
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8557$as_echo "$CHECK_GMAKE" >&6; }
8558else
8559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8560$as_echo "no" >&6; }
8561fi
8562
8563
8564  test -n "$CHECK_GMAKE" && break
8565done
8566
8567
8568  MAKE_CANDIDATE=""$CHECK_GMAKE""
8569  DESCRIPTION="gmake in PATH"
8570  if test "x$MAKE_CANDIDATE" != x; then
8571    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8572$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8573    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8574    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8575    if test "x$IS_GNU_MAKE" = x; then
8576      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8577$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8578    else
8579      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8580      if test "x$IS_MODERN_MAKE" = x; then
8581        { $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
8582$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;}
8583      else
8584        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8585          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8586            MAKE_EXPECTED_ENV='cygwin'
8587          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8588            MAKE_EXPECTED_ENV='msys'
8589          else
8590            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8591          fi
8592          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8593          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8594        else
8595          # Not relevant for non-Windows
8596          IS_MAKE_CORRECT_ENV=true
8597        fi
8598        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8599          { $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
8600$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;}
8601        else
8602          FOUND_MAKE=$MAKE_CANDIDATE
8603
8604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8605
8606  # First separate the path from the arguments. This will split at the first
8607  # space.
8608  complete="$FOUND_MAKE"
8609  path="${complete%% *}"
8610  tmp="$complete EOL"
8611  arguments="${tmp#* }"
8612
8613  # Input might be given as Windows format, start by converting to
8614  # unix format.
8615  new_path=`$CYGPATH -u "$path"`
8616
8617  # Now try to locate executable using which
8618  new_path=`$WHICH "$new_path" 2> /dev/null`
8619  # bat and cmd files are not always considered executable in cygwin causing which
8620  # to not find them
8621  if test "x$new_path" = x \
8622           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8623           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8624    new_path=`$CYGPATH -u "$path"`
8625  fi
8626  if test "x$new_path" = x; then
8627    # Oops. Which didn't find the executable.
8628    # The splitting of arguments from the executable at a space might have been incorrect,
8629    # since paths with space are more likely in Windows. Give it another try with the whole
8630    # argument.
8631    path="$complete"
8632    arguments="EOL"
8633    new_path=`$CYGPATH -u "$path"`
8634    new_path=`$WHICH "$new_path" 2> /dev/null`
8635    # bat and cmd files are not always considered executable in cygwin causing which
8636    # to not find them
8637    if test "x$new_path" = x \
8638             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8639             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8640      new_path=`$CYGPATH -u "$path"`
8641    fi
8642    if test "x$new_path" = x; then
8643      # It's still not found. Now this is an unrecoverable error.
8644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8646      has_space=`$ECHO "$complete" | $GREP " "`
8647      if test "x$has_space" != x; then
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8650      fi
8651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8652    fi
8653  fi
8654
8655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8658  # "foo.exe" is OK but "foo" is an error.
8659  #
8660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8661  # It is also a way to make sure we got the proper file name for the real test later on.
8662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8663  if test "x$test_shortpath" = x; then
8664    # Short path failed, file does not exist as specified.
8665    # Try adding .exe or .cmd
8666    if test -f "${new_path}.exe"; then
8667       input_to_shortpath="${new_path}.exe"
8668    elif test -f "${new_path}.cmd"; then
8669       input_to_shortpath="${new_path}.cmd"
8670    else
8671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8676    fi
8677  else
8678    input_to_shortpath="$new_path"
8679  fi
8680
8681  # Call helper function which possibly converts this using DOS-style short mode.
8682  # If so, the updated path is stored in $new_path.
8683  new_path="$input_to_shortpath"
8684
8685  input_path="$input_to_shortpath"
8686  # Check if we need to convert this using DOS-style short mode. If the path
8687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8688  # take no chances and rewrite it.
8689  # Note: m4 eats our [], so we need to use [ and ] instead.
8690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8691  if test "x$has_forbidden_chars" != x; then
8692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8696      # Going to short mode and back again did indeed matter. Since short mode is
8697      # case insensitive, let's make it lowercase to improve readability.
8698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8699      # Now convert it back to Unix-stile (cygpath)
8700      input_path=`$CYGPATH -u "$shortmode_path"`
8701      new_path="$input_path"
8702    fi
8703  fi
8704
8705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8706  if test "x$test_cygdrive_prefix" = x; then
8707    # As a simple fix, exclude /usr/bin since it's not a real path.
8708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8710      # a path prefixed by /cygdrive for fixpath to work.
8711      new_path="$CYGWIN_ROOT_PATH$input_path"
8712    fi
8713  fi
8714
8715  # remove trailing .exe if any
8716  new_path="${new_path/%.exe/}"
8717
8718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8719
8720  # First separate the path from the arguments. This will split at the first
8721  # space.
8722  complete="$FOUND_MAKE"
8723  path="${complete%% *}"
8724  tmp="$complete EOL"
8725  arguments="${tmp#* }"
8726
8727  # Input might be given as Windows format, start by converting to
8728  # unix format.
8729  new_path="$path"
8730
8731  windows_path="$new_path"
8732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8733    unix_path=`$CYGPATH -u "$windows_path"`
8734    new_path="$unix_path"
8735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8737    new_path="$unix_path"
8738  fi
8739
8740
8741  # Now try to locate executable using which
8742  new_path=`$WHICH "$new_path" 2> /dev/null`
8743
8744  if test "x$new_path" = x; then
8745    # Oops. Which didn't find the executable.
8746    # The splitting of arguments from the executable at a space might have been incorrect,
8747    # since paths with space are more likely in Windows. Give it another try with the whole
8748    # argument.
8749    path="$complete"
8750    arguments="EOL"
8751    new_path="$path"
8752
8753  windows_path="$new_path"
8754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8755    unix_path=`$CYGPATH -u "$windows_path"`
8756    new_path="$unix_path"
8757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8759    new_path="$unix_path"
8760  fi
8761
8762
8763    new_path=`$WHICH "$new_path" 2> /dev/null`
8764
8765    if test "x$new_path" = x; then
8766      # It's still not found. Now this is an unrecoverable error.
8767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8769      has_space=`$ECHO "$complete" | $GREP " "`
8770      if test "x$has_space" != x; then
8771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8773      fi
8774      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8775    fi
8776  fi
8777
8778  # Now new_path has a complete unix path to the binary
8779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8780    # Keep paths in /bin as-is, but remove trailing .exe if any
8781    new_path="${new_path/%.exe/}"
8782    # Do not save /bin paths to all_fixpath_prefixes!
8783  else
8784    # Not in mixed or Windows style, start by that.
8785    new_path=`cmd //c echo $new_path`
8786
8787  input_path="$new_path"
8788  # Check if we need to convert this using DOS-style short mode. If the path
8789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8790  # take no chances and rewrite it.
8791  # Note: m4 eats our [], so we need to use [ and ] instead.
8792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8793  if test "x$has_forbidden_chars" != x; then
8794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8796  fi
8797
8798    # Output is in $new_path
8799
8800  windows_path="$new_path"
8801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8802    unix_path=`$CYGPATH -u "$windows_path"`
8803    new_path="$unix_path"
8804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8806    new_path="$unix_path"
8807  fi
8808
8809    # remove trailing .exe if any
8810    new_path="${new_path/%.exe/}"
8811
8812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8814  fi
8815
8816  else
8817    # We're on a posix platform. Hooray! :)
8818    # First separate the path from the arguments. This will split at the first
8819    # space.
8820    complete="$FOUND_MAKE"
8821    path="${complete%% *}"
8822    tmp="$complete EOL"
8823    arguments="${tmp#* }"
8824
8825    # Cannot rely on the command "which" here since it doesn't always work.
8826    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8827    if test -z "$is_absolute_path"; then
8828      # Path to executable is not absolute. Find it.
8829      IFS_save="$IFS"
8830      IFS=:
8831      for p in $PATH; do
8832        if test -f "$p/$path" && test -x "$p/$path"; then
8833          new_path="$p/$path"
8834          break
8835        fi
8836      done
8837      IFS="$IFS_save"
8838    else
8839      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8840$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8841      new_path="$path"
8842    fi
8843
8844    if test "x$new_path" = x; then
8845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8847        has_space=`$ECHO "$complete" | $GREP " "`
8848        if test "x$has_space" != x; then
8849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8851        fi
8852        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8853      fi
8854  fi
8855
8856      # Now join together the path and the arguments once again
8857      if test "x$arguments" != xEOL; then
8858        new_complete="$new_path ${arguments% *}"
8859      else
8860        new_complete="$new_path"
8861      fi
8862
8863  if test "x$complete" != "x$new_complete"; then
8864      FOUND_MAKE="$new_complete"
8865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8866$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8867    fi
8868
8869        fi
8870      fi
8871    fi
8872  fi
8873
8874
8875    if test "x$FOUND_MAKE" = x; then
8876      for ac_prog in make
8877do
8878  # Extract the first word of "$ac_prog", so it can be a program name with args.
8879set dummy $ac_prog; ac_word=$2
8880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8881$as_echo_n "checking for $ac_word... " >&6; }
8882if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8883  $as_echo_n "(cached) " >&6
8884else
8885  case $CHECK_MAKE in
8886  [\\/]* | ?:[\\/]*)
8887  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8888  ;;
8889  *)
8890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891for as_dir in $PATH
8892do
8893  IFS=$as_save_IFS
8894  test -z "$as_dir" && as_dir=.
8895    for ac_exec_ext in '' $ac_executable_extensions; do
8896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8897    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8899    break 2
8900  fi
8901done
8902  done
8903IFS=$as_save_IFS
8904
8905  ;;
8906esac
8907fi
8908CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8909if test -n "$CHECK_MAKE"; then
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8911$as_echo "$CHECK_MAKE" >&6; }
8912else
8913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8914$as_echo "no" >&6; }
8915fi
8916
8917
8918  test -n "$CHECK_MAKE" && break
8919done
8920
8921
8922  MAKE_CANDIDATE=""$CHECK_MAKE""
8923  DESCRIPTION="make in PATH"
8924  if test "x$MAKE_CANDIDATE" != x; then
8925    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8926$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8927    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8928    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8929    if test "x$IS_GNU_MAKE" = x; then
8930      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8931$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8932    else
8933      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8934      if test "x$IS_MODERN_MAKE" = x; then
8935        { $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
8936$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;}
8937      else
8938        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8939          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8940            MAKE_EXPECTED_ENV='cygwin'
8941          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8942            MAKE_EXPECTED_ENV='msys'
8943          else
8944            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8945          fi
8946          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8947          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8948        else
8949          # Not relevant for non-Windows
8950          IS_MAKE_CORRECT_ENV=true
8951        fi
8952        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8953          { $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
8954$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;}
8955        else
8956          FOUND_MAKE=$MAKE_CANDIDATE
8957
8958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8959
8960  # First separate the path from the arguments. This will split at the first
8961  # space.
8962  complete="$FOUND_MAKE"
8963  path="${complete%% *}"
8964  tmp="$complete EOL"
8965  arguments="${tmp#* }"
8966
8967  # Input might be given as Windows format, start by converting to
8968  # unix format.
8969  new_path=`$CYGPATH -u "$path"`
8970
8971  # Now try to locate executable using which
8972  new_path=`$WHICH "$new_path" 2> /dev/null`
8973  # bat and cmd files are not always considered executable in cygwin causing which
8974  # to not find them
8975  if test "x$new_path" = x \
8976           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8977           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8978    new_path=`$CYGPATH -u "$path"`
8979  fi
8980  if test "x$new_path" = x; then
8981    # Oops. Which didn't find the executable.
8982    # The splitting of arguments from the executable at a space might have been incorrect,
8983    # since paths with space are more likely in Windows. Give it another try with the whole
8984    # argument.
8985    path="$complete"
8986    arguments="EOL"
8987    new_path=`$CYGPATH -u "$path"`
8988    new_path=`$WHICH "$new_path" 2> /dev/null`
8989    # bat and cmd files are not always considered executable in cygwin causing which
8990    # to not find them
8991    if test "x$new_path" = x \
8992             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8993             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8994      new_path=`$CYGPATH -u "$path"`
8995    fi
8996    if test "x$new_path" = x; then
8997      # It's still not found. Now this is an unrecoverable error.
8998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9000      has_space=`$ECHO "$complete" | $GREP " "`
9001      if test "x$has_space" != x; then
9002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9004      fi
9005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9006    fi
9007  fi
9008
9009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9012  # "foo.exe" is OK but "foo" is an error.
9013  #
9014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9015  # It is also a way to make sure we got the proper file name for the real test later on.
9016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9017  if test "x$test_shortpath" = x; then
9018    # Short path failed, file does not exist as specified.
9019    # Try adding .exe or .cmd
9020    if test -f "${new_path}.exe"; then
9021       input_to_shortpath="${new_path}.exe"
9022    elif test -f "${new_path}.cmd"; then
9023       input_to_shortpath="${new_path}.cmd"
9024    else
9025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9030    fi
9031  else
9032    input_to_shortpath="$new_path"
9033  fi
9034
9035  # Call helper function which possibly converts this using DOS-style short mode.
9036  # If so, the updated path is stored in $new_path.
9037  new_path="$input_to_shortpath"
9038
9039  input_path="$input_to_shortpath"
9040  # Check if we need to convert this using DOS-style short mode. If the path
9041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9042  # take no chances and rewrite it.
9043  # Note: m4 eats our [], so we need to use [ and ] instead.
9044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9045  if test "x$has_forbidden_chars" != x; then
9046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9050      # Going to short mode and back again did indeed matter. Since short mode is
9051      # case insensitive, let's make it lowercase to improve readability.
9052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9053      # Now convert it back to Unix-stile (cygpath)
9054      input_path=`$CYGPATH -u "$shortmode_path"`
9055      new_path="$input_path"
9056    fi
9057  fi
9058
9059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9060  if test "x$test_cygdrive_prefix" = x; then
9061    # As a simple fix, exclude /usr/bin since it's not a real path.
9062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9064      # a path prefixed by /cygdrive for fixpath to work.
9065      new_path="$CYGWIN_ROOT_PATH$input_path"
9066    fi
9067  fi
9068
9069  # remove trailing .exe if any
9070  new_path="${new_path/%.exe/}"
9071
9072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9073
9074  # First separate the path from the arguments. This will split at the first
9075  # space.
9076  complete="$FOUND_MAKE"
9077  path="${complete%% *}"
9078  tmp="$complete EOL"
9079  arguments="${tmp#* }"
9080
9081  # Input might be given as Windows format, start by converting to
9082  # unix format.
9083  new_path="$path"
9084
9085  windows_path="$new_path"
9086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9087    unix_path=`$CYGPATH -u "$windows_path"`
9088    new_path="$unix_path"
9089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9091    new_path="$unix_path"
9092  fi
9093
9094
9095  # Now try to locate executable using which
9096  new_path=`$WHICH "$new_path" 2> /dev/null`
9097
9098  if test "x$new_path" = x; then
9099    # Oops. Which didn't find the executable.
9100    # The splitting of arguments from the executable at a space might have been incorrect,
9101    # since paths with space are more likely in Windows. Give it another try with the whole
9102    # argument.
9103    path="$complete"
9104    arguments="EOL"
9105    new_path="$path"
9106
9107  windows_path="$new_path"
9108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9109    unix_path=`$CYGPATH -u "$windows_path"`
9110    new_path="$unix_path"
9111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9113    new_path="$unix_path"
9114  fi
9115
9116
9117    new_path=`$WHICH "$new_path" 2> /dev/null`
9118
9119    if test "x$new_path" = x; then
9120      # It's still not found. Now this is an unrecoverable error.
9121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9122$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9123      has_space=`$ECHO "$complete" | $GREP " "`
9124      if test "x$has_space" != x; then
9125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9127      fi
9128      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9129    fi
9130  fi
9131
9132  # Now new_path has a complete unix path to the binary
9133  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9134    # Keep paths in /bin as-is, but remove trailing .exe if any
9135    new_path="${new_path/%.exe/}"
9136    # Do not save /bin paths to all_fixpath_prefixes!
9137  else
9138    # Not in mixed or Windows style, start by that.
9139    new_path=`cmd //c echo $new_path`
9140
9141  input_path="$new_path"
9142  # Check if we need to convert this using DOS-style short mode. If the path
9143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9144  # take no chances and rewrite it.
9145  # Note: m4 eats our [], so we need to use [ and ] instead.
9146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9147  if test "x$has_forbidden_chars" != x; then
9148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9150  fi
9151
9152    # Output is in $new_path
9153
9154  windows_path="$new_path"
9155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9156    unix_path=`$CYGPATH -u "$windows_path"`
9157    new_path="$unix_path"
9158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9160    new_path="$unix_path"
9161  fi
9162
9163    # remove trailing .exe if any
9164    new_path="${new_path/%.exe/}"
9165
9166    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9167    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9168  fi
9169
9170  else
9171    # We're on a posix platform. Hooray! :)
9172    # First separate the path from the arguments. This will split at the first
9173    # space.
9174    complete="$FOUND_MAKE"
9175    path="${complete%% *}"
9176    tmp="$complete EOL"
9177    arguments="${tmp#* }"
9178
9179    # Cannot rely on the command "which" here since it doesn't always work.
9180    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9181    if test -z "$is_absolute_path"; then
9182      # Path to executable is not absolute. Find it.
9183      IFS_save="$IFS"
9184      IFS=:
9185      for p in $PATH; do
9186        if test -f "$p/$path" && test -x "$p/$path"; then
9187          new_path="$p/$path"
9188          break
9189        fi
9190      done
9191      IFS="$IFS_save"
9192    else
9193      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9194$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9195      new_path="$path"
9196    fi
9197
9198    if test "x$new_path" = x; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9201        has_space=`$ECHO "$complete" | $GREP " "`
9202        if test "x$has_space" != x; then
9203          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9204$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9205        fi
9206        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9207      fi
9208  fi
9209
9210      # Now join together the path and the arguments once again
9211      if test "x$arguments" != xEOL; then
9212        new_complete="$new_path ${arguments% *}"
9213      else
9214        new_complete="$new_path"
9215      fi
9216
9217  if test "x$complete" != "x$new_complete"; then
9218      FOUND_MAKE="$new_complete"
9219      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9220$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9221    fi
9222
9223        fi
9224      fi
9225    fi
9226  fi
9227
9228    fi
9229
9230    if test "x$FOUND_MAKE" = x; then
9231      if test "x$TOOLS_DIR" != x; then
9232        # We have a tools-dir, check that as well before giving up.
9233        OLD_PATH=$PATH
9234        PATH=$TOOLS_DIR:$PATH
9235        for ac_prog in gmake
9236do
9237  # Extract the first word of "$ac_prog", so it can be a program name with args.
9238set dummy $ac_prog; ac_word=$2
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240$as_echo_n "checking for $ac_word... " >&6; }
9241if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9242  $as_echo_n "(cached) " >&6
9243else
9244  case $CHECK_TOOLSDIR_GMAKE in
9245  [\\/]* | ?:[\\/]*)
9246  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9247  ;;
9248  *)
9249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9250for as_dir in $PATH
9251do
9252  IFS=$as_save_IFS
9253  test -z "$as_dir" && as_dir=.
9254    for ac_exec_ext in '' $ac_executable_extensions; do
9255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9256    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9258    break 2
9259  fi
9260done
9261  done
9262IFS=$as_save_IFS
9263
9264  ;;
9265esac
9266fi
9267CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9268if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9270$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9271else
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
9274fi
9275
9276
9277  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9278done
9279
9280
9281  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9282  DESCRIPTION="gmake in tools-dir"
9283  if test "x$MAKE_CANDIDATE" != x; then
9284    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9285$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9286    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9287    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9288    if test "x$IS_GNU_MAKE" = x; then
9289      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9290$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9291    else
9292      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9293      if test "x$IS_MODERN_MAKE" = x; then
9294        { $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
9295$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;}
9296      else
9297        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9298          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9299            MAKE_EXPECTED_ENV='cygwin'
9300          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9301            MAKE_EXPECTED_ENV='msys'
9302          else
9303            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9304          fi
9305          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9306          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9307        else
9308          # Not relevant for non-Windows
9309          IS_MAKE_CORRECT_ENV=true
9310        fi
9311        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9312          { $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
9313$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;}
9314        else
9315          FOUND_MAKE=$MAKE_CANDIDATE
9316
9317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9318
9319  # First separate the path from the arguments. This will split at the first
9320  # space.
9321  complete="$FOUND_MAKE"
9322  path="${complete%% *}"
9323  tmp="$complete EOL"
9324  arguments="${tmp#* }"
9325
9326  # Input might be given as Windows format, start by converting to
9327  # unix format.
9328  new_path=`$CYGPATH -u "$path"`
9329
9330  # Now try to locate executable using which
9331  new_path=`$WHICH "$new_path" 2> /dev/null`
9332  # bat and cmd files are not always considered executable in cygwin causing which
9333  # to not find them
9334  if test "x$new_path" = x \
9335           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9336           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9337    new_path=`$CYGPATH -u "$path"`
9338  fi
9339  if test "x$new_path" = x; then
9340    # Oops. Which didn't find the executable.
9341    # The splitting of arguments from the executable at a space might have been incorrect,
9342    # since paths with space are more likely in Windows. Give it another try with the whole
9343    # argument.
9344    path="$complete"
9345    arguments="EOL"
9346    new_path=`$CYGPATH -u "$path"`
9347    new_path=`$WHICH "$new_path" 2> /dev/null`
9348    # bat and cmd files are not always considered executable in cygwin causing which
9349    # to not find them
9350    if test "x$new_path" = x \
9351             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9352             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9353      new_path=`$CYGPATH -u "$path"`
9354    fi
9355    if test "x$new_path" = x; then
9356      # It's still not found. Now this is an unrecoverable error.
9357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9359      has_space=`$ECHO "$complete" | $GREP " "`
9360      if test "x$has_space" != x; then
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9363      fi
9364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9365    fi
9366  fi
9367
9368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9371  # "foo.exe" is OK but "foo" is an error.
9372  #
9373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9374  # It is also a way to make sure we got the proper file name for the real test later on.
9375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9376  if test "x$test_shortpath" = x; then
9377    # Short path failed, file does not exist as specified.
9378    # Try adding .exe or .cmd
9379    if test -f "${new_path}.exe"; then
9380       input_to_shortpath="${new_path}.exe"
9381    elif test -f "${new_path}.cmd"; then
9382       input_to_shortpath="${new_path}.cmd"
9383    else
9384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9388      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9389    fi
9390  else
9391    input_to_shortpath="$new_path"
9392  fi
9393
9394  # Call helper function which possibly converts this using DOS-style short mode.
9395  # If so, the updated path is stored in $new_path.
9396  new_path="$input_to_shortpath"
9397
9398  input_path="$input_to_shortpath"
9399  # Check if we need to convert this using DOS-style short mode. If the path
9400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9401  # take no chances and rewrite it.
9402  # Note: m4 eats our [], so we need to use [ and ] instead.
9403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9404  if test "x$has_forbidden_chars" != x; then
9405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9409      # Going to short mode and back again did indeed matter. Since short mode is
9410      # case insensitive, let's make it lowercase to improve readability.
9411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9412      # Now convert it back to Unix-stile (cygpath)
9413      input_path=`$CYGPATH -u "$shortmode_path"`
9414      new_path="$input_path"
9415    fi
9416  fi
9417
9418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9419  if test "x$test_cygdrive_prefix" = x; then
9420    # As a simple fix, exclude /usr/bin since it's not a real path.
9421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9423      # a path prefixed by /cygdrive for fixpath to work.
9424      new_path="$CYGWIN_ROOT_PATH$input_path"
9425    fi
9426  fi
9427
9428  # remove trailing .exe if any
9429  new_path="${new_path/%.exe/}"
9430
9431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9432
9433  # First separate the path from the arguments. This will split at the first
9434  # space.
9435  complete="$FOUND_MAKE"
9436  path="${complete%% *}"
9437  tmp="$complete EOL"
9438  arguments="${tmp#* }"
9439
9440  # Input might be given as Windows format, start by converting to
9441  # unix format.
9442  new_path="$path"
9443
9444  windows_path="$new_path"
9445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9446    unix_path=`$CYGPATH -u "$windows_path"`
9447    new_path="$unix_path"
9448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9450    new_path="$unix_path"
9451  fi
9452
9453
9454  # Now try to locate executable using which
9455  new_path=`$WHICH "$new_path" 2> /dev/null`
9456
9457  if test "x$new_path" = x; then
9458    # Oops. Which didn't find the executable.
9459    # The splitting of arguments from the executable at a space might have been incorrect,
9460    # since paths with space are more likely in Windows. Give it another try with the whole
9461    # argument.
9462    path="$complete"
9463    arguments="EOL"
9464    new_path="$path"
9465
9466  windows_path="$new_path"
9467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9468    unix_path=`$CYGPATH -u "$windows_path"`
9469    new_path="$unix_path"
9470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9472    new_path="$unix_path"
9473  fi
9474
9475
9476    new_path=`$WHICH "$new_path" 2> /dev/null`
9477
9478    if test "x$new_path" = x; then
9479      # It's still not found. Now this is an unrecoverable error.
9480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9481$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9482      has_space=`$ECHO "$complete" | $GREP " "`
9483      if test "x$has_space" != x; then
9484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9486      fi
9487      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9488    fi
9489  fi
9490
9491  # Now new_path has a complete unix path to the binary
9492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9493    # Keep paths in /bin as-is, but remove trailing .exe if any
9494    new_path="${new_path/%.exe/}"
9495    # Do not save /bin paths to all_fixpath_prefixes!
9496  else
9497    # Not in mixed or Windows style, start by that.
9498    new_path=`cmd //c echo $new_path`
9499
9500  input_path="$new_path"
9501  # Check if we need to convert this using DOS-style short mode. If the path
9502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9503  # take no chances and rewrite it.
9504  # Note: m4 eats our [], so we need to use [ and ] instead.
9505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9506  if test "x$has_forbidden_chars" != x; then
9507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9509  fi
9510
9511    # Output is in $new_path
9512
9513  windows_path="$new_path"
9514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515    unix_path=`$CYGPATH -u "$windows_path"`
9516    new_path="$unix_path"
9517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9519    new_path="$unix_path"
9520  fi
9521
9522    # remove trailing .exe if any
9523    new_path="${new_path/%.exe/}"
9524
9525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9527  fi
9528
9529  else
9530    # We're on a posix platform. Hooray! :)
9531    # First separate the path from the arguments. This will split at the first
9532    # space.
9533    complete="$FOUND_MAKE"
9534    path="${complete%% *}"
9535    tmp="$complete EOL"
9536    arguments="${tmp#* }"
9537
9538    # Cannot rely on the command "which" here since it doesn't always work.
9539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9540    if test -z "$is_absolute_path"; then
9541      # Path to executable is not absolute. Find it.
9542      IFS_save="$IFS"
9543      IFS=:
9544      for p in $PATH; do
9545        if test -f "$p/$path" && test -x "$p/$path"; then
9546          new_path="$p/$path"
9547          break
9548        fi
9549      done
9550      IFS="$IFS_save"
9551    else
9552      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9553$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9554      new_path="$path"
9555    fi
9556
9557    if test "x$new_path" = x; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9559$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9560        has_space=`$ECHO "$complete" | $GREP " "`
9561        if test "x$has_space" != x; then
9562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9564        fi
9565        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9566      fi
9567  fi
9568
9569      # Now join together the path and the arguments once again
9570      if test "x$arguments" != xEOL; then
9571        new_complete="$new_path ${arguments% *}"
9572      else
9573        new_complete="$new_path"
9574      fi
9575
9576  if test "x$complete" != "x$new_complete"; then
9577      FOUND_MAKE="$new_complete"
9578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9579$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9580    fi
9581
9582        fi
9583      fi
9584    fi
9585  fi
9586
9587        if test "x$FOUND_MAKE" = x; then
9588          for ac_prog in make
9589do
9590  # Extract the first word of "$ac_prog", so it can be a program name with args.
9591set dummy $ac_prog; ac_word=$2
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9595  $as_echo_n "(cached) " >&6
9596else
9597  case $CHECK_TOOLSDIR_MAKE in
9598  [\\/]* | ?:[\\/]*)
9599  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9600  ;;
9601  *)
9602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9603for as_dir in $PATH
9604do
9605  IFS=$as_save_IFS
9606  test -z "$as_dir" && as_dir=.
9607    for ac_exec_ext in '' $ac_executable_extensions; do
9608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9609    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9611    break 2
9612  fi
9613done
9614  done
9615IFS=$as_save_IFS
9616
9617  ;;
9618esac
9619fi
9620CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9621if test -n "$CHECK_TOOLSDIR_MAKE"; then
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9623$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9624else
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627fi
9628
9629
9630  test -n "$CHECK_TOOLSDIR_MAKE" && break
9631done
9632
9633
9634  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9635  DESCRIPTION="make in tools-dir"
9636  if test "x$MAKE_CANDIDATE" != x; then
9637    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9638$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9639    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9640    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9641    if test "x$IS_GNU_MAKE" = x; then
9642      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9643$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9644    else
9645      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9646      if test "x$IS_MODERN_MAKE" = x; then
9647        { $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
9648$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;}
9649      else
9650        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9651          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9652            MAKE_EXPECTED_ENV='cygwin'
9653          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9654            MAKE_EXPECTED_ENV='msys'
9655          else
9656            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9657          fi
9658          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9659          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9660        else
9661          # Not relevant for non-Windows
9662          IS_MAKE_CORRECT_ENV=true
9663        fi
9664        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9665          { $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
9666$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;}
9667        else
9668          FOUND_MAKE=$MAKE_CANDIDATE
9669
9670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9671
9672  # First separate the path from the arguments. This will split at the first
9673  # space.
9674  complete="$FOUND_MAKE"
9675  path="${complete%% *}"
9676  tmp="$complete EOL"
9677  arguments="${tmp#* }"
9678
9679  # Input might be given as Windows format, start by converting to
9680  # unix format.
9681  new_path=`$CYGPATH -u "$path"`
9682
9683  # Now try to locate executable using which
9684  new_path=`$WHICH "$new_path" 2> /dev/null`
9685  # bat and cmd files are not always considered executable in cygwin causing which
9686  # to not find them
9687  if test "x$new_path" = x \
9688           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9689           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9690    new_path=`$CYGPATH -u "$path"`
9691  fi
9692  if test "x$new_path" = x; then
9693    # Oops. Which didn't find the executable.
9694    # The splitting of arguments from the executable at a space might have been incorrect,
9695    # since paths with space are more likely in Windows. Give it another try with the whole
9696    # argument.
9697    path="$complete"
9698    arguments="EOL"
9699    new_path=`$CYGPATH -u "$path"`
9700    new_path=`$WHICH "$new_path" 2> /dev/null`
9701    # bat and cmd files are not always considered executable in cygwin causing which
9702    # to not find them
9703    if test "x$new_path" = x \
9704             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9705             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9706      new_path=`$CYGPATH -u "$path"`
9707    fi
9708    if test "x$new_path" = x; then
9709      # It's still not found. Now this is an unrecoverable error.
9710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9711$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9712      has_space=`$ECHO "$complete" | $GREP " "`
9713      if test "x$has_space" != x; then
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9716      fi
9717      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9718    fi
9719  fi
9720
9721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9724  # "foo.exe" is OK but "foo" is an error.
9725  #
9726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9727  # It is also a way to make sure we got the proper file name for the real test later on.
9728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9729  if test "x$test_shortpath" = x; then
9730    # Short path failed, file does not exist as specified.
9731    # Try adding .exe or .cmd
9732    if test -f "${new_path}.exe"; then
9733       input_to_shortpath="${new_path}.exe"
9734    elif test -f "${new_path}.cmd"; then
9735       input_to_shortpath="${new_path}.cmd"
9736    else
9737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9738$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9739      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9740$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9741      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9742    fi
9743  else
9744    input_to_shortpath="$new_path"
9745  fi
9746
9747  # Call helper function which possibly converts this using DOS-style short mode.
9748  # If so, the updated path is stored in $new_path.
9749  new_path="$input_to_shortpath"
9750
9751  input_path="$input_to_shortpath"
9752  # Check if we need to convert this using DOS-style short mode. If the path
9753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9754  # take no chances and rewrite it.
9755  # Note: m4 eats our [], so we need to use [ and ] instead.
9756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9757  if test "x$has_forbidden_chars" != x; then
9758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9762      # Going to short mode and back again did indeed matter. Since short mode is
9763      # case insensitive, let's make it lowercase to improve readability.
9764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9765      # Now convert it back to Unix-stile (cygpath)
9766      input_path=`$CYGPATH -u "$shortmode_path"`
9767      new_path="$input_path"
9768    fi
9769  fi
9770
9771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9772  if test "x$test_cygdrive_prefix" = x; then
9773    # As a simple fix, exclude /usr/bin since it's not a real path.
9774    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9776      # a path prefixed by /cygdrive for fixpath to work.
9777      new_path="$CYGWIN_ROOT_PATH$input_path"
9778    fi
9779  fi
9780
9781  # remove trailing .exe if any
9782  new_path="${new_path/%.exe/}"
9783
9784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9785
9786  # First separate the path from the arguments. This will split at the first
9787  # space.
9788  complete="$FOUND_MAKE"
9789  path="${complete%% *}"
9790  tmp="$complete EOL"
9791  arguments="${tmp#* }"
9792
9793  # Input might be given as Windows format, start by converting to
9794  # unix format.
9795  new_path="$path"
9796
9797  windows_path="$new_path"
9798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9799    unix_path=`$CYGPATH -u "$windows_path"`
9800    new_path="$unix_path"
9801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9803    new_path="$unix_path"
9804  fi
9805
9806
9807  # Now try to locate executable using which
9808  new_path=`$WHICH "$new_path" 2> /dev/null`
9809
9810  if test "x$new_path" = x; then
9811    # Oops. Which didn't find the executable.
9812    # The splitting of arguments from the executable at a space might have been incorrect,
9813    # since paths with space are more likely in Windows. Give it another try with the whole
9814    # argument.
9815    path="$complete"
9816    arguments="EOL"
9817    new_path="$path"
9818
9819  windows_path="$new_path"
9820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9821    unix_path=`$CYGPATH -u "$windows_path"`
9822    new_path="$unix_path"
9823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9825    new_path="$unix_path"
9826  fi
9827
9828
9829    new_path=`$WHICH "$new_path" 2> /dev/null`
9830
9831    if test "x$new_path" = x; then
9832      # It's still not found. Now this is an unrecoverable error.
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9835      has_space=`$ECHO "$complete" | $GREP " "`
9836      if test "x$has_space" != x; then
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9839      fi
9840      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9841    fi
9842  fi
9843
9844  # Now new_path has a complete unix path to the binary
9845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9846    # Keep paths in /bin as-is, but remove trailing .exe if any
9847    new_path="${new_path/%.exe/}"
9848    # Do not save /bin paths to all_fixpath_prefixes!
9849  else
9850    # Not in mixed or Windows style, start by that.
9851    new_path=`cmd //c echo $new_path`
9852
9853  input_path="$new_path"
9854  # Check if we need to convert this using DOS-style short mode. If the path
9855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9856  # take no chances and rewrite it.
9857  # Note: m4 eats our [], so we need to use [ and ] instead.
9858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9859  if test "x$has_forbidden_chars" != x; then
9860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9862  fi
9863
9864    # Output is in $new_path
9865
9866  windows_path="$new_path"
9867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9868    unix_path=`$CYGPATH -u "$windows_path"`
9869    new_path="$unix_path"
9870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9872    new_path="$unix_path"
9873  fi
9874
9875    # remove trailing .exe if any
9876    new_path="${new_path/%.exe/}"
9877
9878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9880  fi
9881
9882  else
9883    # We're on a posix platform. Hooray! :)
9884    # First separate the path from the arguments. This will split at the first
9885    # space.
9886    complete="$FOUND_MAKE"
9887    path="${complete%% *}"
9888    tmp="$complete EOL"
9889    arguments="${tmp#* }"
9890
9891    # Cannot rely on the command "which" here since it doesn't always work.
9892    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9893    if test -z "$is_absolute_path"; then
9894      # Path to executable is not absolute. Find it.
9895      IFS_save="$IFS"
9896      IFS=:
9897      for p in $PATH; do
9898        if test -f "$p/$path" && test -x "$p/$path"; then
9899          new_path="$p/$path"
9900          break
9901        fi
9902      done
9903      IFS="$IFS_save"
9904    else
9905      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9906$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9907      new_path="$path"
9908    fi
9909
9910    if test "x$new_path" = x; then
9911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9912$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9913        has_space=`$ECHO "$complete" | $GREP " "`
9914        if test "x$has_space" != x; then
9915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9917        fi
9918        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9919      fi
9920  fi
9921
9922      # Now join together the path and the arguments once again
9923      if test "x$arguments" != xEOL; then
9924        new_complete="$new_path ${arguments% *}"
9925      else
9926        new_complete="$new_path"
9927      fi
9928
9929  if test "x$complete" != "x$new_complete"; then
9930      FOUND_MAKE="$new_complete"
9931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9932$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9933    fi
9934
9935        fi
9936      fi
9937    fi
9938  fi
9939
9940        fi
9941        PATH=$OLD_PATH
9942      fi
9943    fi
9944
9945    if test "x$FOUND_MAKE" = x; then
9946      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
9947    fi
9948  fi
9949
9950  MAKE=$FOUND_MAKE
9951
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9953$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9954
9955
9956
9957    # Test if find supports -delete
9958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9959$as_echo_n "checking if find supports -delete... " >&6; }
9960    FIND_DELETE="-delete"
9961
9962    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9963
9964    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9965
9966    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9967    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9968        # No, it does not.
9969        rm $DELETEDIR/TestIfFindSupportsDelete
9970        FIND_DELETE="-exec rm \{\} \+"
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973    else
9974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9975$as_echo "yes" >&6; }
9976    fi
9977    rmdir $DELETEDIR
9978
9979
9980
9981# These tools might not be installed by default,
9982# need hint on how to install them.
9983
9984    for ac_prog in unzip
9985do
9986  # Extract the first word of "$ac_prog", so it can be a program name with args.
9987set dummy $ac_prog; ac_word=$2
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9989$as_echo_n "checking for $ac_word... " >&6; }
9990if test "${ac_cv_path_UNZIP+set}" = set; then :
9991  $as_echo_n "(cached) " >&6
9992else
9993  case $UNZIP in
9994  [\\/]* | ?:[\\/]*)
9995  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9996  ;;
9997  *)
9998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9999for as_dir in $PATH
10000do
10001  IFS=$as_save_IFS
10002  test -z "$as_dir" && as_dir=.
10003    for ac_exec_ext in '' $ac_executable_extensions; do
10004  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10005    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10007    break 2
10008  fi
10009done
10010  done
10011IFS=$as_save_IFS
10012
10013  ;;
10014esac
10015fi
10016UNZIP=$ac_cv_path_UNZIP
10017if test -n "$UNZIP"; then
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10019$as_echo "$UNZIP" >&6; }
10020else
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022$as_echo "no" >&6; }
10023fi
10024
10025
10026  test -n "$UNZIP" && break
10027done
10028
10029
10030    if test "x$UNZIP" = x; then
10031        if test "xunzip" = x; then
10032          PROG_NAME=unzip
10033        else
10034          PROG_NAME=unzip
10035        fi
10036        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10037$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10038        as_fn_error $? "Cannot continue" "$LINENO" 5
10039    fi
10040
10041
10042
10043    for ac_prog in zip
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if test "${ac_cv_path_ZIP+set}" = set; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $ZIP in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10064    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075ZIP=$ac_cv_path_ZIP
10076if test -n "$ZIP"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10078$as_echo "$ZIP" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$ZIP" && break
10086done
10087
10088
10089    if test "x$ZIP" = x; then
10090        if test "xzip" = x; then
10091          PROG_NAME=zip
10092        else
10093          PROG_NAME=zip
10094        fi
10095        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10096$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10097        as_fn_error $? "Cannot continue" "$LINENO" 5
10098    fi
10099
10100
10101
10102# Non-required basic tools
10103
10104# Extract the first word of "ldd", so it can be a program name with args.
10105set dummy ldd; ac_word=$2
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10107$as_echo_n "checking for $ac_word... " >&6; }
10108if test "${ac_cv_path_LDD+set}" = set; then :
10109  $as_echo_n "(cached) " >&6
10110else
10111  case $LDD in
10112  [\\/]* | ?:[\\/]*)
10113  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10114  ;;
10115  *)
10116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10117for as_dir in $PATH
10118do
10119  IFS=$as_save_IFS
10120  test -z "$as_dir" && as_dir=.
10121    for ac_exec_ext in '' $ac_executable_extensions; do
10122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10123    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10125    break 2
10126  fi
10127done
10128  done
10129IFS=$as_save_IFS
10130
10131  ;;
10132esac
10133fi
10134LDD=$ac_cv_path_LDD
10135if test -n "$LDD"; then
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10137$as_echo "$LDD" >&6; }
10138else
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
10144if test "x$LDD" = "x"; then
10145    # List shared lib dependencies is used for
10146    # debug output and checking for forbidden dependencies.
10147    # We can build without it.
10148    LDD="true"
10149fi
10150# Extract the first word of "otool", so it can be a program name with args.
10151set dummy otool; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if test "${ac_cv_path_OTOOL+set}" = set; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $OTOOL in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10169    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180OTOOL=$ac_cv_path_OTOOL
10181if test -n "$OTOOL"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10183$as_echo "$OTOOL" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190if test "x$OTOOL" = "x"; then
10191   OTOOL="true"
10192fi
10193for ac_prog in readelf greadelf
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if test "${ac_cv_path_READELF+set}" = set; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $READELF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10214    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225READELF=$ac_cv_path_READELF
10226if test -n "$READELF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10228$as_echo "$READELF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$READELF" && break
10236done
10237
10238# Extract the first word of "hg", so it can be a program name with args.
10239set dummy hg; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if test "${ac_cv_path_HG+set}" = set; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $HG in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10257    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  ;;
10266esac
10267fi
10268HG=$ac_cv_path_HG
10269if test -n "$HG"; then
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10271$as_echo "$HG" >&6; }
10272else
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
10275fi
10276
10277
10278# Extract the first word of "stat", so it can be a program name with args.
10279set dummy stat; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if test "${ac_cv_path_STAT+set}" = set; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $STAT in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10297    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308STAT=$ac_cv_path_STAT
10309if test -n "$STAT"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10311$as_echo "$STAT" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318# Extract the first word of "time", so it can be a program name with args.
10319set dummy time; ac_word=$2
10320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10321$as_echo_n "checking for $ac_word... " >&6; }
10322if test "${ac_cv_path_TIME+set}" = set; then :
10323  $as_echo_n "(cached) " >&6
10324else
10325  case $TIME in
10326  [\\/]* | ?:[\\/]*)
10327  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10328  ;;
10329  *)
10330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10331for as_dir in $PATH
10332do
10333  IFS=$as_save_IFS
10334  test -z "$as_dir" && as_dir=.
10335    for ac_exec_ext in '' $ac_executable_extensions; do
10336  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10337    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10339    break 2
10340  fi
10341done
10342  done
10343IFS=$as_save_IFS
10344
10345  ;;
10346esac
10347fi
10348TIME=$ac_cv_path_TIME
10349if test -n "$TIME"; then
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10351$as_echo "$TIME" >&6; }
10352else
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
10355fi
10356
10357
10358
10359if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10360
10361    for ac_prog in comm
10362do
10363  # Extract the first word of "$ac_prog", so it can be a program name with args.
10364set dummy $ac_prog; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if test "${ac_cv_path_COMM+set}" = set; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $COMM in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10382    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393COMM=$ac_cv_path_COMM
10394if test -n "$COMM"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10396$as_echo "$COMM" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403  test -n "$COMM" && break
10404done
10405
10406
10407    if test "x$COMM" = x; then
10408        if test "xcomm" = x; then
10409          PROG_NAME=comm
10410        else
10411          PROG_NAME=comm
10412        fi
10413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10415        as_fn_error $? "Cannot continue" "$LINENO" 5
10416    fi
10417
10418
10419fi
10420
10421if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10422
10423    for ac_prog in xattr
10424do
10425  # Extract the first word of "$ac_prog", so it can be a program name with args.
10426set dummy $ac_prog; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if test "${ac_cv_path_XATTR+set}" = set; then :
10430  $as_echo_n "(cached) " >&6
10431else
10432  case $XATTR in
10433  [\\/]* | ?:[\\/]*)
10434  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10435  ;;
10436  *)
10437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440  IFS=$as_save_IFS
10441  test -z "$as_dir" && as_dir=.
10442    for ac_exec_ext in '' $ac_executable_extensions; do
10443  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10444    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446    break 2
10447  fi
10448done
10449  done
10450IFS=$as_save_IFS
10451
10452  ;;
10453esac
10454fi
10455XATTR=$ac_cv_path_XATTR
10456if test -n "$XATTR"; then
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10458$as_echo "$XATTR" >&6; }
10459else
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464
10465  test -n "$XATTR" && break
10466done
10467
10468
10469    if test "x$XATTR" = x; then
10470        if test "xxattr" = x; then
10471          PROG_NAME=xattr
10472        else
10473          PROG_NAME=xattr
10474        fi
10475        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10476$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10477        as_fn_error $? "Cannot continue" "$LINENO" 5
10478    fi
10479
10480
10481fi
10482
10483
10484# Check if pkg-config is available.
10485
10486
10487if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10488	if test -n "$ac_tool_prefix"; then
10489  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10490set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $PKG_CONFIG in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10508    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10520if test -n "$PKG_CONFIG"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10522$as_echo "$PKG_CONFIG" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529fi
10530if test -z "$ac_cv_path_PKG_CONFIG"; then
10531  ac_pt_PKG_CONFIG=$PKG_CONFIG
10532  # Extract the first word of "pkg-config", so it can be a program name with args.
10533set dummy pkg-config; ac_word=$2
10534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10535$as_echo_n "checking for $ac_word... " >&6; }
10536if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10537  $as_echo_n "(cached) " >&6
10538else
10539  case $ac_pt_PKG_CONFIG in
10540  [\\/]* | ?:[\\/]*)
10541  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10542  ;;
10543  *)
10544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10545for as_dir in $PATH
10546do
10547  IFS=$as_save_IFS
10548  test -z "$as_dir" && as_dir=.
10549    for ac_exec_ext in '' $ac_executable_extensions; do
10550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10551    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10553    break 2
10554  fi
10555done
10556  done
10557IFS=$as_save_IFS
10558
10559  ;;
10560esac
10561fi
10562ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10563if test -n "$ac_pt_PKG_CONFIG"; then
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10565$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10566else
10567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568$as_echo "no" >&6; }
10569fi
10570
10571  if test "x$ac_pt_PKG_CONFIG" = x; then
10572    PKG_CONFIG=""
10573  else
10574    case $cross_compiling:$ac_tool_warned in
10575yes:)
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10577$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10578ac_tool_warned=yes ;;
10579esac
10580    PKG_CONFIG=$ac_pt_PKG_CONFIG
10581  fi
10582else
10583  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10584fi
10585
10586fi
10587if test -n "$PKG_CONFIG"; then
10588	_pkg_min_version=0.9.0
10589	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10590$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10591	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10592		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10593$as_echo "yes" >&6; }
10594	else
10595		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
10597		PKG_CONFIG=""
10598	fi
10599
10600fi
10601
10602# After basic tools have been setup, we can check build os specific details.
10603
10604###############################################################################
10605
10606# Note that this is the build platform OS version!
10607
10608OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10609OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10610OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10611OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10612
10613
10614
10615
10616
10617# Setup builddeps, for automatic downloading of tools we need.
10618# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10619# boot-jdk setup, but we need to have basic tools setup first.
10620
10621
10622# Check whether --with-builddeps-conf was given.
10623if test "${with_builddeps_conf+set}" = set; then :
10624  withval=$with_builddeps_conf;
10625fi
10626
10627
10628
10629# Check whether --with-builddeps-server was given.
10630if test "${with_builddeps_server+set}" = set; then :
10631  withval=$with_builddeps_server;
10632fi
10633
10634
10635
10636# Check whether --with-builddeps-dir was given.
10637if test "${with_builddeps_dir+set}" = set; then :
10638  withval=$with_builddeps_dir;
10639else
10640  with_builddeps_dir=/localhome/builddeps
10641fi
10642
10643
10644
10645# Check whether --with-builddeps-group was given.
10646if test "${with_builddeps_group+set}" = set; then :
10647  withval=$with_builddeps_group;
10648fi
10649
10650
10651
10652
10653    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10654        if test "x$with_builddeps_conf" != x; then
10655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10656$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10657            builddepsfile=$with_builddeps_conf
10658            if test -s $builddepsfile; then
10659                . $builddepsfile
10660                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10661$as_echo "loaded!" >&6; }
10662            else
10663               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10664           fi
10665        else
10666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10667$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10668            builddepsfile=`mktemp`
10669            touch $builddepsfile
10670            # Put all found confs into a single file.
10671            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10672            # Source the file to acquire the variables
10673            if test -s $builddepsfile; then
10674                . $builddepsfile
10675                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10676$as_echo "found at least one!" >&6; }
10677            else
10678               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10679           fi
10680        fi
10681        # Create build and target names that use _ instead of "-" and ".".
10682        # This is necessary to use them in variable names.
10683        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10684        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10685        # Extract rewrite information for build and target
10686        eval rewritten_build=\${REWRITE_${build_var}}
10687        if test "x$rewritten_build" = x; then
10688            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10689            echo Build stays the same $rewritten_build
10690        else
10691            echo Rewriting build for builddeps into $rewritten_build
10692        fi
10693        eval rewritten_target=\${REWRITE_${target_var}}
10694        if test "x$rewritten_target" = x; then
10695            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10696            echo Target stays the same $rewritten_target
10697        else
10698            echo Rewriting target for builddeps into $rewritten_target
10699        fi
10700        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10701        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10702    fi
10703    for ac_prog in 7z unzip
10704do
10705  # Extract the first word of "$ac_prog", so it can be a program name with args.
10706set dummy $ac_prog; ac_word=$2
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10708$as_echo_n "checking for $ac_word... " >&6; }
10709if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10710  $as_echo_n "(cached) " >&6
10711else
10712  if test -n "$BDEPS_UNZIP"; then
10713  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10714else
10715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10716for as_dir in $PATH
10717do
10718  IFS=$as_save_IFS
10719  test -z "$as_dir" && as_dir=.
10720    for ac_exec_ext in '' $ac_executable_extensions; do
10721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10722    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10724    break 2
10725  fi
10726done
10727  done
10728IFS=$as_save_IFS
10729
10730fi
10731fi
10732BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10733if test -n "$BDEPS_UNZIP"; then
10734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10735$as_echo "$BDEPS_UNZIP" >&6; }
10736else
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
10739fi
10740
10741
10742  test -n "$BDEPS_UNZIP" && break
10743done
10744
10745    if test "x$BDEPS_UNZIP" = x7z; then
10746        BDEPS_UNZIP="7z x"
10747    fi
10748
10749    for ac_prog in wget lftp ftp
10750do
10751  # Extract the first word of "$ac_prog", so it can be a program name with args.
10752set dummy $ac_prog; ac_word=$2
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754$as_echo_n "checking for $ac_word... " >&6; }
10755if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10756  $as_echo_n "(cached) " >&6
10757else
10758  if test -n "$BDEPS_FTP"; then
10759  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10760else
10761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10768    ac_cv_prog_BDEPS_FTP="$ac_prog"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776fi
10777fi
10778BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10779if test -n "$BDEPS_FTP"; then
10780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10781$as_echo "$BDEPS_FTP" >&6; }
10782else
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10784$as_echo "no" >&6; }
10785fi
10786
10787
10788  test -n "$BDEPS_FTP" && break
10789done
10790
10791
10792
10793###############################################################################
10794#
10795# Determine OpenJDK variants, options and version numbers.
10796#
10797###############################################################################
10798
10799# We need build & target for this.
10800
10801
10802###############################################################################
10803#
10804# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10805# We always build headless support.
10806#
10807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10808$as_echo_n "checking headful support... " >&6; }
10809# Check whether --enable-headful was given.
10810if test "${enable_headful+set}" = set; then :
10811  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10812else
10813  SUPPORT_HEADFUL=yes
10814fi
10815
10816
10817SUPPORT_HEADLESS=yes
10818BUILD_HEADLESS="BUILD_HEADLESS:=true"
10819
10820if test "x$SUPPORT_HEADFUL" = xyes; then
10821    # We are building both headful and headless.
10822    headful_msg="inlude support for both headful and headless"
10823fi
10824
10825if test "x$SUPPORT_HEADFUL" = xno; then
10826    # Thus we are building headless only.
10827    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10828    headful_msg="headless only"
10829fi
10830
10831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10832$as_echo "$headful_msg" >&6; }
10833
10834
10835
10836
10837
10838# Control wether Hotspot runs Queens test after build.
10839# Check whether --enable-hotspot-test-in-build was given.
10840if test "${enable_hotspot_test_in_build+set}" = set; then :
10841  enableval=$enable_hotspot_test_in_build;
10842else
10843  enable_hotspot_test_in_build=no
10844fi
10845
10846if test "x$enable_hotspot_test_in_build" = "xyes"; then
10847    TEST_IN_BUILD=true
10848else
10849    TEST_IN_BUILD=false
10850fi
10851
10852
10853###############################################################################
10854#
10855# Choose cacerts source file
10856#
10857
10858# Check whether --with-cacerts-file was given.
10859if test "${with_cacerts_file+set}" = set; then :
10860  withval=$with_cacerts_file;
10861fi
10862
10863if test "x$with_cacerts_file" != x; then
10864    CACERTS_FILE=$with_cacerts_file
10865else
10866    if test "x$OPENJDK" = "xtrue"; then
10867        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10868    else
10869        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10870    fi
10871fi
10872
10873
10874###############################################################################
10875#
10876# Enable or disable unlimited crypto
10877#
10878# Check whether --enable-unlimited-crypto was given.
10879if test "${enable_unlimited_crypto+set}" = set; then :
10880  enableval=$enable_unlimited_crypto;
10881else
10882  enable_unlimited_crypto=no
10883fi
10884
10885if test "x$enable_unlimited_crypto" = "xyes"; then
10886    UNLIMITED_CRYPTO=true
10887else
10888    UNLIMITED_CRYPTO=false
10889fi
10890
10891
10892###############################################################################
10893#
10894# Enable or disable the elliptic curve crypto implementation
10895#
10896
10897
10898###############################################################################
10899#
10900# Compress jars
10901#
10902COMPRESS_JARS=false
10903
10904
10905
10906
10907# Source the version numbers
10908. $AUTOCONF_DIR/version-numbers
10909
10910# Get the settings from parameters
10911
10912# Check whether --with-milestone was given.
10913if test "${with_milestone+set}" = set; then :
10914  withval=$with_milestone;
10915fi
10916
10917if test "x$with_milestone" = xyes; then
10918  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10919elif test "x$with_milestone" != x; then
10920    MILESTONE="$with_milestone"
10921fi
10922if test "x$MILESTONE" = x; then
10923  MILESTONE=internal
10924fi
10925
10926
10927# Check whether --with-build-number was given.
10928if test "${with_build_number+set}" = set; then :
10929  withval=$with_build_number;
10930fi
10931
10932if test "x$with_build_number" = xyes; then
10933  as_fn_error $? "Build number must have a value" "$LINENO" 5
10934elif test "x$with_build_number" != x; then
10935  JDK_BUILD_NUMBER="$with_build_number"
10936fi
10937if test "x$JDK_BUILD_NUMBER" = x; then
10938  JDK_BUILD_NUMBER=b00
10939fi
10940
10941
10942# Check whether --with-user-release-suffix was given.
10943if test "${with_user_release_suffix+set}" = set; then :
10944  withval=$with_user_release_suffix;
10945fi
10946
10947if test "x$with_user_release_suffix" = xyes; then
10948  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10949elif test "x$with_user_release_suffix" != x; then
10950  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10951else
10952  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10953  # Avoid [:alnum:] since it depends on the locale.
10954  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10955  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10956fi
10957
10958
10959# Now set the JDK version, milestone, build number etc.
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974COPYRIGHT_YEAR=`date +'%Y'`
10975
10976
10977if test "x$JDK_UPDATE_VERSION" != x; then
10978  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10979else
10980  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10981fi
10982
10983
10984COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10985
10986
10987
10988###############################################################################
10989#
10990# Setup BootJDK, used to bootstrap the build.
10991#
10992###############################################################################
10993
10994
10995BOOT_JDK_FOUND=no
10996
10997# Check whether --with-boot-jdk was given.
10998if test "${with_boot_jdk+set}" = set; then :
10999  withval=$with_boot_jdk;
11000fi
11001
11002
11003# We look for the Boot JDK through various means, going from more certain to
11004# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11005# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11006# must check if this is indeed valid; otherwise we'll continue looking.
11007
11008# Test: Is bootjdk explicitely set by command line arguments?
11009
11010  if test "x$BOOT_JDK_FOUND" = xno; then
11011    # Now execute the test
11012
11013if test "x$with_boot_jdk" != x; then
11014    BOOT_JDK=$with_boot_jdk
11015    BOOT_JDK_FOUND=maybe
11016    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11017$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11018fi
11019
11020
11021    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11022    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11023      # Do we have a bin/java?
11024      if test ! -x "$BOOT_JDK/bin/java"; then
11025        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11027        BOOT_JDK_FOUND=no
11028      else
11029        # Do we have a bin/javac?
11030        if test ! -x "$BOOT_JDK/bin/javac"; then
11031          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11033          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11034$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11035          BOOT_JDK_FOUND=no
11036        else
11037          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11038          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11039            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11041            BOOT_JDK_FOUND=no
11042          else
11043            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11044            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11045
11046            # Extra M4 quote needed to protect [] in grep expression.
11047            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11048            if test "x$FOUND_VERSION_78" = x; then
11049              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11051              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11052$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11053              BOOT_JDK_FOUND=no
11054            else
11055              # We're done! :-)
11056              BOOT_JDK_FOUND=yes
11057
11058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11059
11060  # Input might be given as Windows format, start by converting to
11061  # unix format.
11062  path="$BOOT_JDK"
11063  new_path=`$CYGPATH -u "$path"`
11064
11065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11068  # "foo.exe" is OK but "foo" is an error.
11069  #
11070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11071  # It is also a way to make sure we got the proper file name for the real test later on.
11072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11073  if test "x$test_shortpath" = x; then
11074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11076    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11077  fi
11078
11079  # Call helper function which possibly converts this using DOS-style short mode.
11080  # If so, the updated path is stored in $new_path.
11081
11082  input_path="$new_path"
11083  # Check if we need to convert this using DOS-style short mode. If the path
11084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11085  # take no chances and rewrite it.
11086  # Note: m4 eats our [], so we need to use [ and ] instead.
11087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11088  if test "x$has_forbidden_chars" != x; then
11089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11093      # Going to short mode and back again did indeed matter. Since short mode is
11094      # case insensitive, let's make it lowercase to improve readability.
11095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11096      # Now convert it back to Unix-stile (cygpath)
11097      input_path=`$CYGPATH -u "$shortmode_path"`
11098      new_path="$input_path"
11099    fi
11100  fi
11101
11102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11103  if test "x$test_cygdrive_prefix" = x; then
11104    # As a simple fix, exclude /usr/bin since it's not a real path.
11105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11107      # a path prefixed by /cygdrive for fixpath to work.
11108      new_path="$CYGWIN_ROOT_PATH$input_path"
11109    fi
11110  fi
11111
11112
11113  if test "x$path" != "x$new_path"; then
11114    BOOT_JDK="$new_path"
11115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11117  fi
11118
11119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11120
11121  path="$BOOT_JDK"
11122  has_colon=`$ECHO $path | $GREP ^.:`
11123  new_path="$path"
11124  if test "x$has_colon" = x; then
11125    # Not in mixed or Windows style, start by that.
11126    new_path=`cmd //c echo $path`
11127  fi
11128
11129
11130  input_path="$new_path"
11131  # Check if we need to convert this using DOS-style short mode. If the path
11132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11133  # take no chances and rewrite it.
11134  # Note: m4 eats our [], so we need to use [ and ] instead.
11135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11136  if test "x$has_forbidden_chars" != x; then
11137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11139  fi
11140
11141
11142  windows_path="$new_path"
11143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11144    unix_path=`$CYGPATH -u "$windows_path"`
11145    new_path="$unix_path"
11146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11148    new_path="$unix_path"
11149  fi
11150
11151  if test "x$path" != "x$new_path"; then
11152    BOOT_JDK="$new_path"
11153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11155  fi
11156
11157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11159
11160  else
11161    # We're on a posix platform. Hooray! :)
11162    path="$BOOT_JDK"
11163
11164    if test ! -f "$path" && test ! -d "$path"; then
11165      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11166    fi
11167
11168    has_space=`$ECHO "$path" | $GREP " "`
11169    if test "x$has_space" != x; then
11170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11172      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11173    fi
11174  fi
11175
11176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11177$as_echo_n "checking for Boot JDK... " >&6; }
11178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11179$as_echo "$BOOT_JDK" >&6; }
11180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11181$as_echo_n "checking Boot JDK version... " >&6; }
11182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11184$as_echo "$BOOT_JDK_VERSION" >&6; }
11185            fi # end check jdk version
11186          fi # end check rt.jar
11187        fi # end check javac
11188      fi # end check java
11189    fi # end check boot jdk found
11190  fi
11191
11192if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11193  # Having specified an argument which is incorrect will produce an instant failure;
11194  # we should not go on looking
11195  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11196fi
11197
11198# Test: Is bootjdk available from builddeps?
11199
11200  if test "x$BOOT_JDK_FOUND" = xno; then
11201    # Now execute the test
11202
11203
11204
11205    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11206        # Source the builddeps file again, to make sure it uses the latest variables!
11207        . $builddepsfile
11208        # Look for a target and build machine specific resource!
11209        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11210        if test "x$resource" = x; then
11211            # Ok, lets instead look for a target specific resource
11212            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11213        fi
11214        if test "x$resource" = x; then
11215            # Ok, lets instead look for a build specific resource
11216            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11217        fi
11218        if test "x$resource" = x; then
11219            # Ok, lets instead look for a generic resource
11220            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11221            resource=${builddep_bootjdk}
11222        fi
11223        if test "x$resource" != x; then
11224            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11225$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11226	    # If the resource in the builddeps.conf file is an existing directory,
11227	    # for example /java/linux/cups
11228	    if test -d ${resource}; then
11229	       depdir=${resource}
11230	    else
11231
11232# bootjdk is for example mymodule
11233# $resource is for example libs/general/libmymod_1_2_3.zip
11234# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11235# $with_builddeps_dir is for example /localhome/builddeps
11236# depdir is the name of the variable into which we store the depdir, eg MYMOD
11237# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11238# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11239    filename=`basename $resource`
11240    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11241    filebase=${filename%%.*}
11242    extension=${filename#*.}
11243    installdir=$with_builddeps_dir/$filebase
11244    if test ! -f $installdir/$filename.unpacked; then
11245        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11246$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11247        if test ! -d $installdir; then
11248            mkdir -p $installdir
11249        fi
11250        if test ! -d $installdir; then
11251            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11252        fi
11253        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11254        touch $tmpfile
11255        if test ! -f $tmpfile; then
11256            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11257        fi
11258
11259    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11260    # $tmpfile is the local file name for the downloaded file.
11261    VALID_TOOL=no
11262    if test "x$BDEPS_FTP" = xwget; then
11263       VALID_TOOL=yes
11264       wget -O $tmpfile $with_builddeps_server/$resource
11265    fi
11266    if test "x$BDEPS_FTP" = xlftp; then
11267       VALID_TOOL=yes
11268       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11269    fi
11270    if test "x$BDEPS_FTP" = xftp; then
11271        VALID_TOOL=yes
11272        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11273        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11274        FTPUSERPWD=${FTPSERVER%%@*}
11275        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11276            FTPUSER=${userpwd%%:*}
11277            FTPPWD=${userpwd#*@}
11278            FTPSERVER=${FTPSERVER#*@}
11279        else
11280            FTPUSER=ftp
11281            FTPPWD=ftp
11282        fi
11283        # the "pass" command does not work on some
11284        # ftp clients (read ftp.exe) but if it works,
11285        # passive mode is better!
11286        (\
11287            echo "user $FTPUSER $FTPPWD"        ;\
11288            echo "pass"                         ;\
11289            echo "bin"                          ;\
11290            echo "get $FTPPATH $tmpfile"              ;\
11291        ) | ftp -in $FTPSERVER
11292    fi
11293    if test "x$VALID_TOOL" != xyes; then
11294       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11295    fi
11296
11297        mv $tmpfile $installdir/$filename
11298        if test ! -s $installdir/$filename; then
11299            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11300        fi
11301        case "$extension" in
11302            zip)  echo "Unzipping $installdir/$filename..."
11303               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11304            ;;
11305            tar.gz) echo "Untaring $installdir/$filename..."
11306               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11307            ;;
11308            tgz) echo "Untaring $installdir/$filename..."
11309               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11310            ;;
11311            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11312            ;;
11313        esac
11314    fi
11315    if test -f $installdir/$filename.unpacked; then
11316        depdir=$installdir
11317    fi
11318
11319	    fi
11320            # Source the builddeps file again, because in the previous command, the depdir
11321            # was updated to point at the current build dependency install directory.
11322            . $builddepsfile
11323            # Now extract variables from the builddeps.conf files.
11324            theroot=${builddep_bootjdk_ROOT}
11325            thecflags=${builddep_bootjdk_CFLAGS}
11326            thelibs=${builddep_bootjdk_LIBS}
11327            if test "x$depdir" = x; then
11328                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11329            fi
11330            BOOT_JDK=$depdir
11331            if test "x$theroot" != x; then
11332               BOOT_JDK="$theroot"
11333            fi
11334            if test "x$thecflags" != x; then
11335               BOOT_JDK_CFLAGS="$thecflags"
11336            fi
11337            if test "x$thelibs" != x; then
11338               BOOT_JDK_LIBS="$thelibs"
11339            fi
11340            BOOT_JDK_FOUND=maybe
11341            else BOOT_JDK_FOUND=no
11342
11343        fi
11344        else BOOT_JDK_FOUND=no
11345
11346    fi
11347
11348
11349
11350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11352      # Do we have a bin/java?
11353      if test ! -x "$BOOT_JDK/bin/java"; then
11354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11356        BOOT_JDK_FOUND=no
11357      else
11358        # Do we have a bin/javac?
11359        if test ! -x "$BOOT_JDK/bin/javac"; then
11360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11364          BOOT_JDK_FOUND=no
11365        else
11366          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11367          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11368            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11370            BOOT_JDK_FOUND=no
11371          else
11372            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11373            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11374
11375            # Extra M4 quote needed to protect [] in grep expression.
11376            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11377            if test "x$FOUND_VERSION_78" = x; then
11378              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11380              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11381$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11382              BOOT_JDK_FOUND=no
11383            else
11384              # We're done! :-)
11385              BOOT_JDK_FOUND=yes
11386
11387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11388
11389  # Input might be given as Windows format, start by converting to
11390  # unix format.
11391  path="$BOOT_JDK"
11392  new_path=`$CYGPATH -u "$path"`
11393
11394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11397  # "foo.exe" is OK but "foo" is an error.
11398  #
11399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11400  # It is also a way to make sure we got the proper file name for the real test later on.
11401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11402  if test "x$test_shortpath" = x; then
11403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11405    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11406  fi
11407
11408  # Call helper function which possibly converts this using DOS-style short mode.
11409  # If so, the updated path is stored in $new_path.
11410
11411  input_path="$new_path"
11412  # Check if we need to convert this using DOS-style short mode. If the path
11413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11414  # take no chances and rewrite it.
11415  # Note: m4 eats our [], so we need to use [ and ] instead.
11416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11417  if test "x$has_forbidden_chars" != x; then
11418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11422      # Going to short mode and back again did indeed matter. Since short mode is
11423      # case insensitive, let's make it lowercase to improve readability.
11424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11425      # Now convert it back to Unix-stile (cygpath)
11426      input_path=`$CYGPATH -u "$shortmode_path"`
11427      new_path="$input_path"
11428    fi
11429  fi
11430
11431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11432  if test "x$test_cygdrive_prefix" = x; then
11433    # As a simple fix, exclude /usr/bin since it's not a real path.
11434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11436      # a path prefixed by /cygdrive for fixpath to work.
11437      new_path="$CYGWIN_ROOT_PATH$input_path"
11438    fi
11439  fi
11440
11441
11442  if test "x$path" != "x$new_path"; then
11443    BOOT_JDK="$new_path"
11444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11446  fi
11447
11448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11449
11450  path="$BOOT_JDK"
11451  has_colon=`$ECHO $path | $GREP ^.:`
11452  new_path="$path"
11453  if test "x$has_colon" = x; then
11454    # Not in mixed or Windows style, start by that.
11455    new_path=`cmd //c echo $path`
11456  fi
11457
11458
11459  input_path="$new_path"
11460  # Check if we need to convert this using DOS-style short mode. If the path
11461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11462  # take no chances and rewrite it.
11463  # Note: m4 eats our [], so we need to use [ and ] instead.
11464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11465  if test "x$has_forbidden_chars" != x; then
11466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11468  fi
11469
11470
11471  windows_path="$new_path"
11472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11473    unix_path=`$CYGPATH -u "$windows_path"`
11474    new_path="$unix_path"
11475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11477    new_path="$unix_path"
11478  fi
11479
11480  if test "x$path" != "x$new_path"; then
11481    BOOT_JDK="$new_path"
11482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11484  fi
11485
11486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11488
11489  else
11490    # We're on a posix platform. Hooray! :)
11491    path="$BOOT_JDK"
11492
11493    if test ! -f "$path" && test ! -d "$path"; then
11494      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11495    fi
11496
11497    has_space=`$ECHO "$path" | $GREP " "`
11498    if test "x$has_space" != x; then
11499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11501      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11502    fi
11503  fi
11504
11505              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11506$as_echo_n "checking for Boot JDK... " >&6; }
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11508$as_echo "$BOOT_JDK" >&6; }
11509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11510$as_echo_n "checking Boot JDK version... " >&6; }
11511              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11512              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11513$as_echo "$BOOT_JDK_VERSION" >&6; }
11514            fi # end check jdk version
11515          fi # end check rt.jar
11516        fi # end check javac
11517      fi # end check java
11518    fi # end check boot jdk found
11519  fi
11520
11521
11522# Test: Is $JAVA_HOME set?
11523
11524  if test "x$BOOT_JDK_FOUND" = xno; then
11525    # Now execute the test
11526
11527    if test "x$JAVA_HOME" != x; then
11528        JAVA_HOME_PROCESSED="$JAVA_HOME"
11529
11530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11531
11532  # Input might be given as Windows format, start by converting to
11533  # unix format.
11534  path="$JAVA_HOME_PROCESSED"
11535  new_path=`$CYGPATH -u "$path"`
11536
11537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11540  # "foo.exe" is OK but "foo" is an error.
11541  #
11542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11543  # It is also a way to make sure we got the proper file name for the real test later on.
11544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11545  if test "x$test_shortpath" = x; then
11546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11547$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11548    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11549  fi
11550
11551  # Call helper function which possibly converts this using DOS-style short mode.
11552  # If so, the updated path is stored in $new_path.
11553
11554  input_path="$new_path"
11555  # Check if we need to convert this using DOS-style short mode. If the path
11556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11557  # take no chances and rewrite it.
11558  # Note: m4 eats our [], so we need to use [ and ] instead.
11559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11560  if test "x$has_forbidden_chars" != x; then
11561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11565      # Going to short mode and back again did indeed matter. Since short mode is
11566      # case insensitive, let's make it lowercase to improve readability.
11567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11568      # Now convert it back to Unix-stile (cygpath)
11569      input_path=`$CYGPATH -u "$shortmode_path"`
11570      new_path="$input_path"
11571    fi
11572  fi
11573
11574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11575  if test "x$test_cygdrive_prefix" = x; then
11576    # As a simple fix, exclude /usr/bin since it's not a real path.
11577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11579      # a path prefixed by /cygdrive for fixpath to work.
11580      new_path="$CYGWIN_ROOT_PATH$input_path"
11581    fi
11582  fi
11583
11584
11585  if test "x$path" != "x$new_path"; then
11586    JAVA_HOME_PROCESSED="$new_path"
11587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11588$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11589  fi
11590
11591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11592
11593  path="$JAVA_HOME_PROCESSED"
11594  has_colon=`$ECHO $path | $GREP ^.:`
11595  new_path="$path"
11596  if test "x$has_colon" = x; then
11597    # Not in mixed or Windows style, start by that.
11598    new_path=`cmd //c echo $path`
11599  fi
11600
11601
11602  input_path="$new_path"
11603  # Check if we need to convert this using DOS-style short mode. If the path
11604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11605  # take no chances and rewrite it.
11606  # Note: m4 eats our [], so we need to use [ and ] instead.
11607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11608  if test "x$has_forbidden_chars" != x; then
11609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11611  fi
11612
11613
11614  windows_path="$new_path"
11615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11616    unix_path=`$CYGPATH -u "$windows_path"`
11617    new_path="$unix_path"
11618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11620    new_path="$unix_path"
11621  fi
11622
11623  if test "x$path" != "x$new_path"; then
11624    JAVA_HOME_PROCESSED="$new_path"
11625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11626$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11627  fi
11628
11629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11631
11632  else
11633    # We're on a posix platform. Hooray! :)
11634    path="$JAVA_HOME_PROCESSED"
11635
11636    if test ! -f "$path" && test ! -d "$path"; then
11637      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11638    fi
11639
11640    has_space=`$ECHO "$path" | $GREP " "`
11641    if test "x$has_space" != x; then
11642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11643$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11645    fi
11646  fi
11647
11648        if test ! -d "$JAVA_HOME_PROCESSED"; then
11649            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11650$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11651        else
11652          # Aha, the user has set a JAVA_HOME
11653          # let us use that as the Boot JDK.
11654          BOOT_JDK="$JAVA_HOME_PROCESSED"
11655          BOOT_JDK_FOUND=maybe
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11657$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11658        fi
11659    fi
11660
11661
11662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11663    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11664      # Do we have a bin/java?
11665      if test ! -x "$BOOT_JDK/bin/java"; then
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11668        BOOT_JDK_FOUND=no
11669      else
11670        # Do we have a bin/javac?
11671        if test ! -x "$BOOT_JDK/bin/javac"; then
11672          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11674          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11675$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11676          BOOT_JDK_FOUND=no
11677        else
11678          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11679          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11680            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11682            BOOT_JDK_FOUND=no
11683          else
11684            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11686
11687            # Extra M4 quote needed to protect [] in grep expression.
11688            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11689            if test "x$FOUND_VERSION_78" = x; then
11690              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11692              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11693$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11694              BOOT_JDK_FOUND=no
11695            else
11696              # We're done! :-)
11697              BOOT_JDK_FOUND=yes
11698
11699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11700
11701  # Input might be given as Windows format, start by converting to
11702  # unix format.
11703  path="$BOOT_JDK"
11704  new_path=`$CYGPATH -u "$path"`
11705
11706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11709  # "foo.exe" is OK but "foo" is an error.
11710  #
11711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11712  # It is also a way to make sure we got the proper file name for the real test later on.
11713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11714  if test "x$test_shortpath" = x; then
11715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11717    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11718  fi
11719
11720  # Call helper function which possibly converts this using DOS-style short mode.
11721  # If so, the updated path is stored in $new_path.
11722
11723  input_path="$new_path"
11724  # Check if we need to convert this using DOS-style short mode. If the path
11725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11726  # take no chances and rewrite it.
11727  # Note: m4 eats our [], so we need to use [ and ] instead.
11728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11729  if test "x$has_forbidden_chars" != x; then
11730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11734      # Going to short mode and back again did indeed matter. Since short mode is
11735      # case insensitive, let's make it lowercase to improve readability.
11736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11737      # Now convert it back to Unix-stile (cygpath)
11738      input_path=`$CYGPATH -u "$shortmode_path"`
11739      new_path="$input_path"
11740    fi
11741  fi
11742
11743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11744  if test "x$test_cygdrive_prefix" = x; then
11745    # As a simple fix, exclude /usr/bin since it's not a real path.
11746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11748      # a path prefixed by /cygdrive for fixpath to work.
11749      new_path="$CYGWIN_ROOT_PATH$input_path"
11750    fi
11751  fi
11752
11753
11754  if test "x$path" != "x$new_path"; then
11755    BOOT_JDK="$new_path"
11756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11758  fi
11759
11760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11761
11762  path="$BOOT_JDK"
11763  has_colon=`$ECHO $path | $GREP ^.:`
11764  new_path="$path"
11765  if test "x$has_colon" = x; then
11766    # Not in mixed or Windows style, start by that.
11767    new_path=`cmd //c echo $path`
11768  fi
11769
11770
11771  input_path="$new_path"
11772  # Check if we need to convert this using DOS-style short mode. If the path
11773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11774  # take no chances and rewrite it.
11775  # Note: m4 eats our [], so we need to use [ and ] instead.
11776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11777  if test "x$has_forbidden_chars" != x; then
11778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11780  fi
11781
11782
11783  windows_path="$new_path"
11784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11785    unix_path=`$CYGPATH -u "$windows_path"`
11786    new_path="$unix_path"
11787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11789    new_path="$unix_path"
11790  fi
11791
11792  if test "x$path" != "x$new_path"; then
11793    BOOT_JDK="$new_path"
11794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11796  fi
11797
11798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11800
11801  else
11802    # We're on a posix platform. Hooray! :)
11803    path="$BOOT_JDK"
11804
11805    if test ! -f "$path" && test ! -d "$path"; then
11806      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11807    fi
11808
11809    has_space=`$ECHO "$path" | $GREP " "`
11810    if test "x$has_space" != x; then
11811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11813      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11814    fi
11815  fi
11816
11817              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11818$as_echo_n "checking for Boot JDK... " >&6; }
11819              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11820$as_echo "$BOOT_JDK" >&6; }
11821              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11822$as_echo_n "checking Boot JDK version... " >&6; }
11823              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11824              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11825$as_echo "$BOOT_JDK_VERSION" >&6; }
11826            fi # end check jdk version
11827          fi # end check rt.jar
11828        fi # end check javac
11829      fi # end check java
11830    fi # end check boot jdk found
11831  fi
11832
11833
11834# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11835
11836  if test "x$BOOT_JDK_FOUND" = xno; then
11837    # Now execute the test
11838
11839    if test -x /usr/libexec/java_home; then
11840        BOOT_JDK=`/usr/libexec/java_home`
11841        BOOT_JDK_FOUND=maybe
11842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11843$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11844    fi
11845
11846
11847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11849      # Do we have a bin/java?
11850      if test ! -x "$BOOT_JDK/bin/java"; then
11851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11853        BOOT_JDK_FOUND=no
11854      else
11855        # Do we have a bin/javac?
11856        if test ! -x "$BOOT_JDK/bin/javac"; then
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11861          BOOT_JDK_FOUND=no
11862        else
11863          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11864          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11867            BOOT_JDK_FOUND=no
11868          else
11869            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11870            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11871
11872            # Extra M4 quote needed to protect [] in grep expression.
11873            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11874            if test "x$FOUND_VERSION_78" = x; then
11875              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11877              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11878$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11879              BOOT_JDK_FOUND=no
11880            else
11881              # We're done! :-)
11882              BOOT_JDK_FOUND=yes
11883
11884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11885
11886  # Input might be given as Windows format, start by converting to
11887  # unix format.
11888  path="$BOOT_JDK"
11889  new_path=`$CYGPATH -u "$path"`
11890
11891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11894  # "foo.exe" is OK but "foo" is an error.
11895  #
11896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11897  # It is also a way to make sure we got the proper file name for the real test later on.
11898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11899  if test "x$test_shortpath" = x; then
11900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11902    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11903  fi
11904
11905  # Call helper function which possibly converts this using DOS-style short mode.
11906  # If so, the updated path is stored in $new_path.
11907
11908  input_path="$new_path"
11909  # Check if we need to convert this using DOS-style short mode. If the path
11910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11911  # take no chances and rewrite it.
11912  # Note: m4 eats our [], so we need to use [ and ] instead.
11913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11914  if test "x$has_forbidden_chars" != x; then
11915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11919      # Going to short mode and back again did indeed matter. Since short mode is
11920      # case insensitive, let's make it lowercase to improve readability.
11921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11922      # Now convert it back to Unix-stile (cygpath)
11923      input_path=`$CYGPATH -u "$shortmode_path"`
11924      new_path="$input_path"
11925    fi
11926  fi
11927
11928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11929  if test "x$test_cygdrive_prefix" = x; then
11930    # As a simple fix, exclude /usr/bin since it's not a real path.
11931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11933      # a path prefixed by /cygdrive for fixpath to work.
11934      new_path="$CYGWIN_ROOT_PATH$input_path"
11935    fi
11936  fi
11937
11938
11939  if test "x$path" != "x$new_path"; then
11940    BOOT_JDK="$new_path"
11941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11943  fi
11944
11945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11946
11947  path="$BOOT_JDK"
11948  has_colon=`$ECHO $path | $GREP ^.:`
11949  new_path="$path"
11950  if test "x$has_colon" = x; then
11951    # Not in mixed or Windows style, start by that.
11952    new_path=`cmd //c echo $path`
11953  fi
11954
11955
11956  input_path="$new_path"
11957  # Check if we need to convert this using DOS-style short mode. If the path
11958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11959  # take no chances and rewrite it.
11960  # Note: m4 eats our [], so we need to use [ and ] instead.
11961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11962  if test "x$has_forbidden_chars" != x; then
11963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11965  fi
11966
11967
11968  windows_path="$new_path"
11969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11970    unix_path=`$CYGPATH -u "$windows_path"`
11971    new_path="$unix_path"
11972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11974    new_path="$unix_path"
11975  fi
11976
11977  if test "x$path" != "x$new_path"; then
11978    BOOT_JDK="$new_path"
11979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11981  fi
11982
11983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11985
11986  else
11987    # We're on a posix platform. Hooray! :)
11988    path="$BOOT_JDK"
11989
11990    if test ! -f "$path" && test ! -d "$path"; then
11991      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11992    fi
11993
11994    has_space=`$ECHO "$path" | $GREP " "`
11995    if test "x$has_space" != x; then
11996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11999    fi
12000  fi
12001
12002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12003$as_echo_n "checking for Boot JDK... " >&6; }
12004              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12005$as_echo "$BOOT_JDK" >&6; }
12006              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12007$as_echo_n "checking Boot JDK version... " >&6; }
12008              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12010$as_echo "$BOOT_JDK_VERSION" >&6; }
12011            fi # end check jdk version
12012          fi # end check rt.jar
12013        fi # end check javac
12014      fi # end check java
12015    fi # end check boot jdk found
12016  fi
12017
12018
12019# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12020
12021  if test "x$BOOT_JDK_FOUND" = xno; then
12022    # Now execute the test
12023
12024    # Extract the first word of "javac", so it can be a program name with args.
12025set dummy javac; ac_word=$2
12026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12027$as_echo_n "checking for $ac_word... " >&6; }
12028if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12029  $as_echo_n "(cached) " >&6
12030else
12031  case $JAVAC_CHECK in
12032  [\\/]* | ?:[\\/]*)
12033  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12034  ;;
12035  *)
12036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12037for as_dir in $PATH
12038do
12039  IFS=$as_save_IFS
12040  test -z "$as_dir" && as_dir=.
12041    for ac_exec_ext in '' $ac_executable_extensions; do
12042  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12043    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12045    break 2
12046  fi
12047done
12048  done
12049IFS=$as_save_IFS
12050
12051  ;;
12052esac
12053fi
12054JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12055if test -n "$JAVAC_CHECK"; then
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12057$as_echo "$JAVAC_CHECK" >&6; }
12058else
12059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12060$as_echo "no" >&6; }
12061fi
12062
12063
12064    # Extract the first word of "java", so it can be a program name with args.
12065set dummy java; ac_word=$2
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12067$as_echo_n "checking for $ac_word... " >&6; }
12068if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12069  $as_echo_n "(cached) " >&6
12070else
12071  case $JAVA_CHECK in
12072  [\\/]* | ?:[\\/]*)
12073  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12074  ;;
12075  *)
12076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12077for as_dir in $PATH
12078do
12079  IFS=$as_save_IFS
12080  test -z "$as_dir" && as_dir=.
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12083    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12085    break 2
12086  fi
12087done
12088  done
12089IFS=$as_save_IFS
12090
12091  ;;
12092esac
12093fi
12094JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12095if test -n "$JAVA_CHECK"; then
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12097$as_echo "$JAVA_CHECK" >&6; }
12098else
12099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100$as_echo "no" >&6; }
12101fi
12102
12103
12104    BINARY="$JAVAC_CHECK"
12105    if test "x$JAVAC_CHECK" = x; then
12106        BINARY="$JAVA_CHECK"
12107    fi
12108    if test "x$BINARY" != x; then
12109        # So there is a java(c) binary, it might be part of a JDK.
12110        # Lets find the JDK/JRE directory by following symbolic links.
12111        # Linux/GNU systems often have links from /usr/bin/java to
12112        # /etc/alternatives/java to the real JDK binary.
12113
12114    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12115        # Follow a chain of symbolic links. Use readlink
12116        # where it exists, else fall back to horribly
12117        # complicated shell code.
12118        if test "x$READLINK_TESTED" != yes; then
12119            # On MacOSX there is a readlink tool with a different
12120            # purpose than the GNU readlink tool. Check the found readlink.
12121            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12122            if test "x$ISGNU" = x; then
12123                 # A readlink that we do not know how to use.
12124                 # Are there other non-GNU readlinks out there?
12125                 READLINK_TESTED=yes
12126                 READLINK=
12127            fi
12128        fi
12129
12130        if test "x$READLINK" != x; then
12131            BINARY=`$READLINK -f $BINARY`
12132        else
12133            # Save the current directory for restoring afterwards
12134            STARTDIR=$PWD
12135            COUNTER=0
12136            sym_link_dir=`$DIRNAME $BINARY`
12137            sym_link_file=`$BASENAME $BINARY`
12138            # Use the system pwd and not the shell builtin to resolve directory symlinks
12139            cd $sym_link_dir
12140            cd `$THEPWDCMD`
12141            sym_link_dir=`$THEPWDCMD`
12142            # Resolve file symlinks
12143            while test $COUNTER -lt 20; do
12144                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12145                if test "x$ISLINK" == x; then
12146                    # This is not a symbolic link! We are done!
12147                    break
12148                fi
12149                # Again resolve directory symlinks since the target of the just found
12150                # link could be in a different directory
12151                cd `$DIRNAME $ISLINK`
12152                sym_link_dir=`$THEPWDCMD`
12153                sym_link_file=`$BASENAME $ISLINK`
12154                let COUNTER=COUNTER+1
12155            done
12156            cd $STARTDIR
12157            BINARY=$sym_link_dir/$sym_link_file
12158        fi
12159    fi
12160
12161        BOOT_JDK=`dirname "$BINARY"`
12162        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12163        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12164            # Looks like we found ourselves an JDK
12165            BOOT_JDK_FOUND=maybe
12166            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12167$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12168        fi
12169    fi
12170
12171
12172    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12173    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12174      # Do we have a bin/java?
12175      if test ! -x "$BOOT_JDK/bin/java"; then
12176        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12178        BOOT_JDK_FOUND=no
12179      else
12180        # Do we have a bin/javac?
12181        if test ! -x "$BOOT_JDK/bin/javac"; then
12182          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12184          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12185$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12186          BOOT_JDK_FOUND=no
12187        else
12188          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12189          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12192            BOOT_JDK_FOUND=no
12193          else
12194            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12195            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12196
12197            # Extra M4 quote needed to protect [] in grep expression.
12198            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12199            if test "x$FOUND_VERSION_78" = x; then
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12202              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12203$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12204              BOOT_JDK_FOUND=no
12205            else
12206              # We're done! :-)
12207              BOOT_JDK_FOUND=yes
12208
12209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12210
12211  # Input might be given as Windows format, start by converting to
12212  # unix format.
12213  path="$BOOT_JDK"
12214  new_path=`$CYGPATH -u "$path"`
12215
12216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12219  # "foo.exe" is OK but "foo" is an error.
12220  #
12221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12222  # It is also a way to make sure we got the proper file name for the real test later on.
12223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12224  if test "x$test_shortpath" = x; then
12225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12227    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12228  fi
12229
12230  # Call helper function which possibly converts this using DOS-style short mode.
12231  # If so, the updated path is stored in $new_path.
12232
12233  input_path="$new_path"
12234  # Check if we need to convert this using DOS-style short mode. If the path
12235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12236  # take no chances and rewrite it.
12237  # Note: m4 eats our [], so we need to use [ and ] instead.
12238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12239  if test "x$has_forbidden_chars" != x; then
12240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12244      # Going to short mode and back again did indeed matter. Since short mode is
12245      # case insensitive, let's make it lowercase to improve readability.
12246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12247      # Now convert it back to Unix-stile (cygpath)
12248      input_path=`$CYGPATH -u "$shortmode_path"`
12249      new_path="$input_path"
12250    fi
12251  fi
12252
12253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12254  if test "x$test_cygdrive_prefix" = x; then
12255    # As a simple fix, exclude /usr/bin since it's not a real path.
12256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12258      # a path prefixed by /cygdrive for fixpath to work.
12259      new_path="$CYGWIN_ROOT_PATH$input_path"
12260    fi
12261  fi
12262
12263
12264  if test "x$path" != "x$new_path"; then
12265    BOOT_JDK="$new_path"
12266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12268  fi
12269
12270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12271
12272  path="$BOOT_JDK"
12273  has_colon=`$ECHO $path | $GREP ^.:`
12274  new_path="$path"
12275  if test "x$has_colon" = x; then
12276    # Not in mixed or Windows style, start by that.
12277    new_path=`cmd //c echo $path`
12278  fi
12279
12280
12281  input_path="$new_path"
12282  # Check if we need to convert this using DOS-style short mode. If the path
12283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12284  # take no chances and rewrite it.
12285  # Note: m4 eats our [], so we need to use [ and ] instead.
12286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12287  if test "x$has_forbidden_chars" != x; then
12288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12290  fi
12291
12292
12293  windows_path="$new_path"
12294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12295    unix_path=`$CYGPATH -u "$windows_path"`
12296    new_path="$unix_path"
12297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12299    new_path="$unix_path"
12300  fi
12301
12302  if test "x$path" != "x$new_path"; then
12303    BOOT_JDK="$new_path"
12304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12306  fi
12307
12308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12310
12311  else
12312    # We're on a posix platform. Hooray! :)
12313    path="$BOOT_JDK"
12314
12315    if test ! -f "$path" && test ! -d "$path"; then
12316      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12317    fi
12318
12319    has_space=`$ECHO "$path" | $GREP " "`
12320    if test "x$has_space" != x; then
12321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12324    fi
12325  fi
12326
12327              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12328$as_echo_n "checking for Boot JDK... " >&6; }
12329              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12330$as_echo "$BOOT_JDK" >&6; }
12331              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12332$as_echo_n "checking Boot JDK version... " >&6; }
12333              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12334              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12335$as_echo "$BOOT_JDK_VERSION" >&6; }
12336            fi # end check jdk version
12337          fi # end check rt.jar
12338        fi # end check javac
12339      fi # end check java
12340    fi # end check boot jdk found
12341  fi
12342
12343
12344# Test: Is there a JDK installed in default, well-known locations?
12345
12346  if test "x$BOOT_JDK_FOUND" = xno; then
12347    # Now execute the test
12348
12349  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12350
12351  if test "x$BOOT_JDK_FOUND" = xno; then
12352    # Now execute the test
12353
12354  if test "x$ProgramW6432" != x; then
12355    VIRTUAL_DIR="$ProgramW6432/Java"
12356
12357  windows_path="$VIRTUAL_DIR"
12358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12359    unix_path=`$CYGPATH -u "$windows_path"`
12360    VIRTUAL_DIR="$unix_path"
12361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12363    VIRTUAL_DIR="$unix_path"
12364  fi
12365
12366
12367  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12368  BOOT_JDK_SUFFIX=""
12369  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12370  if test "x$ALL_JDKS_FOUND" != x; then
12371    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12372
12373  if test "x$BOOT_JDK_FOUND" = xno; then
12374    # Now execute the test
12375
12376        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12377        if test -d "$BOOT_JDK"; then
12378          BOOT_JDK_FOUND=maybe
12379          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12380$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12381        fi
12382
12383
12384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12386      # Do we have a bin/java?
12387      if test ! -x "$BOOT_JDK/bin/java"; then
12388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12390        BOOT_JDK_FOUND=no
12391      else
12392        # Do we have a bin/javac?
12393        if test ! -x "$BOOT_JDK/bin/javac"; then
12394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12398          BOOT_JDK_FOUND=no
12399        else
12400          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12401          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12402            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12404            BOOT_JDK_FOUND=no
12405          else
12406            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12407            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12408
12409            # Extra M4 quote needed to protect [] in grep expression.
12410            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12411            if test "x$FOUND_VERSION_78" = x; then
12412              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12414              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12415$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12416              BOOT_JDK_FOUND=no
12417            else
12418              # We're done! :-)
12419              BOOT_JDK_FOUND=yes
12420
12421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12422
12423  # Input might be given as Windows format, start by converting to
12424  # unix format.
12425  path="$BOOT_JDK"
12426  new_path=`$CYGPATH -u "$path"`
12427
12428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12431  # "foo.exe" is OK but "foo" is an error.
12432  #
12433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12434  # It is also a way to make sure we got the proper file name for the real test later on.
12435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12436  if test "x$test_shortpath" = x; then
12437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12439    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12440  fi
12441
12442  # Call helper function which possibly converts this using DOS-style short mode.
12443  # If so, the updated path is stored in $new_path.
12444
12445  input_path="$new_path"
12446  # Check if we need to convert this using DOS-style short mode. If the path
12447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12448  # take no chances and rewrite it.
12449  # Note: m4 eats our [], so we need to use [ and ] instead.
12450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12451  if test "x$has_forbidden_chars" != x; then
12452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12456      # Going to short mode and back again did indeed matter. Since short mode is
12457      # case insensitive, let's make it lowercase to improve readability.
12458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12459      # Now convert it back to Unix-stile (cygpath)
12460      input_path=`$CYGPATH -u "$shortmode_path"`
12461      new_path="$input_path"
12462    fi
12463  fi
12464
12465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12466  if test "x$test_cygdrive_prefix" = x; then
12467    # As a simple fix, exclude /usr/bin since it's not a real path.
12468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12470      # a path prefixed by /cygdrive for fixpath to work.
12471      new_path="$CYGWIN_ROOT_PATH$input_path"
12472    fi
12473  fi
12474
12475
12476  if test "x$path" != "x$new_path"; then
12477    BOOT_JDK="$new_path"
12478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12480  fi
12481
12482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12483
12484  path="$BOOT_JDK"
12485  has_colon=`$ECHO $path | $GREP ^.:`
12486  new_path="$path"
12487  if test "x$has_colon" = x; then
12488    # Not in mixed or Windows style, start by that.
12489    new_path=`cmd //c echo $path`
12490  fi
12491
12492
12493  input_path="$new_path"
12494  # Check if we need to convert this using DOS-style short mode. If the path
12495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12496  # take no chances and rewrite it.
12497  # Note: m4 eats our [], so we need to use [ and ] instead.
12498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12499  if test "x$has_forbidden_chars" != x; then
12500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12502  fi
12503
12504
12505  windows_path="$new_path"
12506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12507    unix_path=`$CYGPATH -u "$windows_path"`
12508    new_path="$unix_path"
12509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12511    new_path="$unix_path"
12512  fi
12513
12514  if test "x$path" != "x$new_path"; then
12515    BOOT_JDK="$new_path"
12516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12518  fi
12519
12520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12522
12523  else
12524    # We're on a posix platform. Hooray! :)
12525    path="$BOOT_JDK"
12526
12527    if test ! -f "$path" && test ! -d "$path"; then
12528      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12529    fi
12530
12531    has_space=`$ECHO "$path" | $GREP " "`
12532    if test "x$has_space" != x; then
12533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12536    fi
12537  fi
12538
12539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12540$as_echo_n "checking for Boot JDK... " >&6; }
12541              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12542$as_echo "$BOOT_JDK" >&6; }
12543              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12544$as_echo_n "checking Boot JDK version... " >&6; }
12545              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12546              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12547$as_echo "$BOOT_JDK_VERSION" >&6; }
12548            fi # end check jdk version
12549          fi # end check rt.jar
12550        fi # end check javac
12551      fi # end check java
12552    fi # end check boot jdk found
12553  fi
12554
12555    done
12556  fi
12557
12558  fi
12559
12560
12561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12563      # Do we have a bin/java?
12564      if test ! -x "$BOOT_JDK/bin/java"; then
12565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12567        BOOT_JDK_FOUND=no
12568      else
12569        # Do we have a bin/javac?
12570        if test ! -x "$BOOT_JDK/bin/javac"; then
12571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12575          BOOT_JDK_FOUND=no
12576        else
12577          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12578          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12581            BOOT_JDK_FOUND=no
12582          else
12583            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12585
12586            # Extra M4 quote needed to protect [] in grep expression.
12587            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12588            if test "x$FOUND_VERSION_78" = x; then
12589              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12591              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12592$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12593              BOOT_JDK_FOUND=no
12594            else
12595              # We're done! :-)
12596              BOOT_JDK_FOUND=yes
12597
12598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12599
12600  # Input might be given as Windows format, start by converting to
12601  # unix format.
12602  path="$BOOT_JDK"
12603  new_path=`$CYGPATH -u "$path"`
12604
12605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12608  # "foo.exe" is OK but "foo" is an error.
12609  #
12610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12611  # It is also a way to make sure we got the proper file name for the real test later on.
12612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12613  if test "x$test_shortpath" = x; then
12614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12616    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12617  fi
12618
12619  # Call helper function which possibly converts this using DOS-style short mode.
12620  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12633      # Going to short mode and back again did indeed matter. Since short mode is
12634      # case insensitive, let's make it lowercase to improve readability.
12635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12636      # Now convert it back to Unix-stile (cygpath)
12637      input_path=`$CYGPATH -u "$shortmode_path"`
12638      new_path="$input_path"
12639    fi
12640  fi
12641
12642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12643  if test "x$test_cygdrive_prefix" = x; then
12644    # As a simple fix, exclude /usr/bin since it's not a real path.
12645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12647      # a path prefixed by /cygdrive for fixpath to work.
12648      new_path="$CYGWIN_ROOT_PATH$input_path"
12649    fi
12650  fi
12651
12652
12653  if test "x$path" != "x$new_path"; then
12654    BOOT_JDK="$new_path"
12655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12657  fi
12658
12659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12660
12661  path="$BOOT_JDK"
12662  has_colon=`$ECHO $path | $GREP ^.:`
12663  new_path="$path"
12664  if test "x$has_colon" = x; then
12665    # Not in mixed or Windows style, start by that.
12666    new_path=`cmd //c echo $path`
12667  fi
12668
12669
12670  input_path="$new_path"
12671  # Check if we need to convert this using DOS-style short mode. If the path
12672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12673  # take no chances and rewrite it.
12674  # Note: m4 eats our [], so we need to use [ and ] instead.
12675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12676  if test "x$has_forbidden_chars" != x; then
12677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12679  fi
12680
12681
12682  windows_path="$new_path"
12683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12684    unix_path=`$CYGPATH -u "$windows_path"`
12685    new_path="$unix_path"
12686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12688    new_path="$unix_path"
12689  fi
12690
12691  if test "x$path" != "x$new_path"; then
12692    BOOT_JDK="$new_path"
12693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12695  fi
12696
12697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12699
12700  else
12701    # We're on a posix platform. Hooray! :)
12702    path="$BOOT_JDK"
12703
12704    if test ! -f "$path" && test ! -d "$path"; then
12705      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12706    fi
12707
12708    has_space=`$ECHO "$path" | $GREP " "`
12709    if test "x$has_space" != x; then
12710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12713    fi
12714  fi
12715
12716              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12717$as_echo_n "checking for Boot JDK... " >&6; }
12718              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12719$as_echo "$BOOT_JDK" >&6; }
12720              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12721$as_echo_n "checking Boot JDK version... " >&6; }
12722              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12723              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12724$as_echo "$BOOT_JDK_VERSION" >&6; }
12725            fi # end check jdk version
12726          fi # end check rt.jar
12727        fi # end check javac
12728      fi # end check java
12729    fi # end check boot jdk found
12730  fi
12731
12732
12733  if test "x$BOOT_JDK_FOUND" = xno; then
12734    # Now execute the test
12735
12736  if test "x$PROGRAMW6432" != x; then
12737    VIRTUAL_DIR="$PROGRAMW6432/Java"
12738
12739  windows_path="$VIRTUAL_DIR"
12740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12741    unix_path=`$CYGPATH -u "$windows_path"`
12742    VIRTUAL_DIR="$unix_path"
12743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12745    VIRTUAL_DIR="$unix_path"
12746  fi
12747
12748
12749  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12750  BOOT_JDK_SUFFIX=""
12751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12752  if test "x$ALL_JDKS_FOUND" != x; then
12753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12754
12755  if test "x$BOOT_JDK_FOUND" = xno; then
12756    # Now execute the test
12757
12758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12759        if test -d "$BOOT_JDK"; then
12760          BOOT_JDK_FOUND=maybe
12761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12763        fi
12764
12765
12766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12768      # Do we have a bin/java?
12769      if test ! -x "$BOOT_JDK/bin/java"; then
12770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12772        BOOT_JDK_FOUND=no
12773      else
12774        # Do we have a bin/javac?
12775        if test ! -x "$BOOT_JDK/bin/javac"; then
12776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12780          BOOT_JDK_FOUND=no
12781        else
12782          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12783          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12786            BOOT_JDK_FOUND=no
12787          else
12788            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12789            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12790
12791            # Extra M4 quote needed to protect [] in grep expression.
12792            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12793            if test "x$FOUND_VERSION_78" = x; then
12794              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12796              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12797$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12798              BOOT_JDK_FOUND=no
12799            else
12800              # We're done! :-)
12801              BOOT_JDK_FOUND=yes
12802
12803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12804
12805  # Input might be given as Windows format, start by converting to
12806  # unix format.
12807  path="$BOOT_JDK"
12808  new_path=`$CYGPATH -u "$path"`
12809
12810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12813  # "foo.exe" is OK but "foo" is an error.
12814  #
12815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12816  # It is also a way to make sure we got the proper file name for the real test later on.
12817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12818  if test "x$test_shortpath" = x; then
12819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12822  fi
12823
12824  # Call helper function which possibly converts this using DOS-style short mode.
12825  # If so, the updated path is stored in $new_path.
12826
12827  input_path="$new_path"
12828  # Check if we need to convert this using DOS-style short mode. If the path
12829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12830  # take no chances and rewrite it.
12831  # Note: m4 eats our [], so we need to use [ and ] instead.
12832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12833  if test "x$has_forbidden_chars" != x; then
12834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12838      # Going to short mode and back again did indeed matter. Since short mode is
12839      # case insensitive, let's make it lowercase to improve readability.
12840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12841      # Now convert it back to Unix-stile (cygpath)
12842      input_path=`$CYGPATH -u "$shortmode_path"`
12843      new_path="$input_path"
12844    fi
12845  fi
12846
12847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12848  if test "x$test_cygdrive_prefix" = x; then
12849    # As a simple fix, exclude /usr/bin since it's not a real path.
12850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12852      # a path prefixed by /cygdrive for fixpath to work.
12853      new_path="$CYGWIN_ROOT_PATH$input_path"
12854    fi
12855  fi
12856
12857
12858  if test "x$path" != "x$new_path"; then
12859    BOOT_JDK="$new_path"
12860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12862  fi
12863
12864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12865
12866  path="$BOOT_JDK"
12867  has_colon=`$ECHO $path | $GREP ^.:`
12868  new_path="$path"
12869  if test "x$has_colon" = x; then
12870    # Not in mixed or Windows style, start by that.
12871    new_path=`cmd //c echo $path`
12872  fi
12873
12874
12875  input_path="$new_path"
12876  # Check if we need to convert this using DOS-style short mode. If the path
12877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12878  # take no chances and rewrite it.
12879  # Note: m4 eats our [], so we need to use [ and ] instead.
12880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12881  if test "x$has_forbidden_chars" != x; then
12882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12884  fi
12885
12886
12887  windows_path="$new_path"
12888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12889    unix_path=`$CYGPATH -u "$windows_path"`
12890    new_path="$unix_path"
12891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12893    new_path="$unix_path"
12894  fi
12895
12896  if test "x$path" != "x$new_path"; then
12897    BOOT_JDK="$new_path"
12898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12900  fi
12901
12902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12904
12905  else
12906    # We're on a posix platform. Hooray! :)
12907    path="$BOOT_JDK"
12908
12909    if test ! -f "$path" && test ! -d "$path"; then
12910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12911    fi
12912
12913    has_space=`$ECHO "$path" | $GREP " "`
12914    if test "x$has_space" != x; then
12915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12917      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12918    fi
12919  fi
12920
12921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12922$as_echo_n "checking for Boot JDK... " >&6; }
12923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12924$as_echo "$BOOT_JDK" >&6; }
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12926$as_echo_n "checking Boot JDK version... " >&6; }
12927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12929$as_echo "$BOOT_JDK_VERSION" >&6; }
12930            fi # end check jdk version
12931          fi # end check rt.jar
12932        fi # end check javac
12933      fi # end check java
12934    fi # end check boot jdk found
12935  fi
12936
12937    done
12938  fi
12939
12940  fi
12941
12942
12943    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12944    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12945      # Do we have a bin/java?
12946      if test ! -x "$BOOT_JDK/bin/java"; then
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12949        BOOT_JDK_FOUND=no
12950      else
12951        # Do we have a bin/javac?
12952        if test ! -x "$BOOT_JDK/bin/javac"; then
12953          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12955          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12956$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12957          BOOT_JDK_FOUND=no
12958        else
12959          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12960          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12963            BOOT_JDK_FOUND=no
12964          else
12965            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12967
12968            # Extra M4 quote needed to protect [] in grep expression.
12969            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12970            if test "x$FOUND_VERSION_78" = x; then
12971              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12973              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12974$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12975              BOOT_JDK_FOUND=no
12976            else
12977              # We're done! :-)
12978              BOOT_JDK_FOUND=yes
12979
12980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12981
12982  # Input might be given as Windows format, start by converting to
12983  # unix format.
12984  path="$BOOT_JDK"
12985  new_path=`$CYGPATH -u "$path"`
12986
12987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12990  # "foo.exe" is OK but "foo" is an error.
12991  #
12992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12993  # It is also a way to make sure we got the proper file name for the real test later on.
12994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12995  if test "x$test_shortpath" = x; then
12996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12999  fi
13000
13001  # Call helper function which possibly converts this using DOS-style short mode.
13002  # If so, the updated path is stored in $new_path.
13003
13004  input_path="$new_path"
13005  # Check if we need to convert this using DOS-style short mode. If the path
13006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13007  # take no chances and rewrite it.
13008  # Note: m4 eats our [], so we need to use [ and ] instead.
13009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13010  if test "x$has_forbidden_chars" != x; then
13011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13015      # Going to short mode and back again did indeed matter. Since short mode is
13016      # case insensitive, let's make it lowercase to improve readability.
13017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13018      # Now convert it back to Unix-stile (cygpath)
13019      input_path=`$CYGPATH -u "$shortmode_path"`
13020      new_path="$input_path"
13021    fi
13022  fi
13023
13024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13025  if test "x$test_cygdrive_prefix" = x; then
13026    # As a simple fix, exclude /usr/bin since it's not a real path.
13027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13029      # a path prefixed by /cygdrive for fixpath to work.
13030      new_path="$CYGWIN_ROOT_PATH$input_path"
13031    fi
13032  fi
13033
13034
13035  if test "x$path" != "x$new_path"; then
13036    BOOT_JDK="$new_path"
13037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13039  fi
13040
13041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13042
13043  path="$BOOT_JDK"
13044  has_colon=`$ECHO $path | $GREP ^.:`
13045  new_path="$path"
13046  if test "x$has_colon" = x; then
13047    # Not in mixed or Windows style, start by that.
13048    new_path=`cmd //c echo $path`
13049  fi
13050
13051
13052  input_path="$new_path"
13053  # Check if we need to convert this using DOS-style short mode. If the path
13054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13055  # take no chances and rewrite it.
13056  # Note: m4 eats our [], so we need to use [ and ] instead.
13057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13058  if test "x$has_forbidden_chars" != x; then
13059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13061  fi
13062
13063
13064  windows_path="$new_path"
13065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13066    unix_path=`$CYGPATH -u "$windows_path"`
13067    new_path="$unix_path"
13068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13070    new_path="$unix_path"
13071  fi
13072
13073  if test "x$path" != "x$new_path"; then
13074    BOOT_JDK="$new_path"
13075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13077  fi
13078
13079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13081
13082  else
13083    # We're on a posix platform. Hooray! :)
13084    path="$BOOT_JDK"
13085
13086    if test ! -f "$path" && test ! -d "$path"; then
13087      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13088    fi
13089
13090    has_space=`$ECHO "$path" | $GREP " "`
13091    if test "x$has_space" != x; then
13092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13094      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13095    fi
13096  fi
13097
13098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13099$as_echo_n "checking for Boot JDK... " >&6; }
13100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13101$as_echo "$BOOT_JDK" >&6; }
13102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13103$as_echo_n "checking Boot JDK version... " >&6; }
13104              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13106$as_echo "$BOOT_JDK_VERSION" >&6; }
13107            fi # end check jdk version
13108          fi # end check rt.jar
13109        fi # end check javac
13110      fi # end check java
13111    fi # end check boot jdk found
13112  fi
13113
13114
13115  if test "x$BOOT_JDK_FOUND" = xno; then
13116    # Now execute the test
13117
13118  if test "x$PROGRAMFILES" != x; then
13119    VIRTUAL_DIR="$PROGRAMFILES/Java"
13120
13121  windows_path="$VIRTUAL_DIR"
13122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13123    unix_path=`$CYGPATH -u "$windows_path"`
13124    VIRTUAL_DIR="$unix_path"
13125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13127    VIRTUAL_DIR="$unix_path"
13128  fi
13129
13130
13131  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13132  BOOT_JDK_SUFFIX=""
13133  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13134  if test "x$ALL_JDKS_FOUND" != x; then
13135    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13136
13137  if test "x$BOOT_JDK_FOUND" = xno; then
13138    # Now execute the test
13139
13140        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13141        if test -d "$BOOT_JDK"; then
13142          BOOT_JDK_FOUND=maybe
13143          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13144$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13145        fi
13146
13147
13148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13150      # Do we have a bin/java?
13151      if test ! -x "$BOOT_JDK/bin/java"; then
13152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13154        BOOT_JDK_FOUND=no
13155      else
13156        # Do we have a bin/javac?
13157        if test ! -x "$BOOT_JDK/bin/javac"; then
13158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13162          BOOT_JDK_FOUND=no
13163        else
13164          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13165          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13168            BOOT_JDK_FOUND=no
13169          else
13170            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13172
13173            # Extra M4 quote needed to protect [] in grep expression.
13174            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13175            if test "x$FOUND_VERSION_78" = x; then
13176              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13178              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13179$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13180              BOOT_JDK_FOUND=no
13181            else
13182              # We're done! :-)
13183              BOOT_JDK_FOUND=yes
13184
13185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13186
13187  # Input might be given as Windows format, start by converting to
13188  # unix format.
13189  path="$BOOT_JDK"
13190  new_path=`$CYGPATH -u "$path"`
13191
13192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13195  # "foo.exe" is OK but "foo" is an error.
13196  #
13197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13198  # It is also a way to make sure we got the proper file name for the real test later on.
13199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13200  if test "x$test_shortpath" = x; then
13201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13204  fi
13205
13206  # Call helper function which possibly converts this using DOS-style short mode.
13207  # If so, the updated path is stored in $new_path.
13208
13209  input_path="$new_path"
13210  # Check if we need to convert this using DOS-style short mode. If the path
13211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13212  # take no chances and rewrite it.
13213  # Note: m4 eats our [], so we need to use [ and ] instead.
13214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13215  if test "x$has_forbidden_chars" != x; then
13216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13220      # Going to short mode and back again did indeed matter. Since short mode is
13221      # case insensitive, let's make it lowercase to improve readability.
13222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13223      # Now convert it back to Unix-stile (cygpath)
13224      input_path=`$CYGPATH -u "$shortmode_path"`
13225      new_path="$input_path"
13226    fi
13227  fi
13228
13229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13230  if test "x$test_cygdrive_prefix" = x; then
13231    # As a simple fix, exclude /usr/bin since it's not a real path.
13232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13234      # a path prefixed by /cygdrive for fixpath to work.
13235      new_path="$CYGWIN_ROOT_PATH$input_path"
13236    fi
13237  fi
13238
13239
13240  if test "x$path" != "x$new_path"; then
13241    BOOT_JDK="$new_path"
13242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13244  fi
13245
13246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13247
13248  path="$BOOT_JDK"
13249  has_colon=`$ECHO $path | $GREP ^.:`
13250  new_path="$path"
13251  if test "x$has_colon" = x; then
13252    # Not in mixed or Windows style, start by that.
13253    new_path=`cmd //c echo $path`
13254  fi
13255
13256
13257  input_path="$new_path"
13258  # Check if we need to convert this using DOS-style short mode. If the path
13259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13260  # take no chances and rewrite it.
13261  # Note: m4 eats our [], so we need to use [ and ] instead.
13262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13263  if test "x$has_forbidden_chars" != x; then
13264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13266  fi
13267
13268
13269  windows_path="$new_path"
13270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13271    unix_path=`$CYGPATH -u "$windows_path"`
13272    new_path="$unix_path"
13273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13275    new_path="$unix_path"
13276  fi
13277
13278  if test "x$path" != "x$new_path"; then
13279    BOOT_JDK="$new_path"
13280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13282  fi
13283
13284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13286
13287  else
13288    # We're on a posix platform. Hooray! :)
13289    path="$BOOT_JDK"
13290
13291    if test ! -f "$path" && test ! -d "$path"; then
13292      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13293    fi
13294
13295    has_space=`$ECHO "$path" | $GREP " "`
13296    if test "x$has_space" != x; then
13297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13299      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13300    fi
13301  fi
13302
13303              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13304$as_echo_n "checking for Boot JDK... " >&6; }
13305              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13306$as_echo "$BOOT_JDK" >&6; }
13307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13308$as_echo_n "checking Boot JDK version... " >&6; }
13309              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13311$as_echo "$BOOT_JDK_VERSION" >&6; }
13312            fi # end check jdk version
13313          fi # end check rt.jar
13314        fi # end check javac
13315      fi # end check java
13316    fi # end check boot jdk found
13317  fi
13318
13319    done
13320  fi
13321
13322  fi
13323
13324
13325    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13326    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13327      # Do we have a bin/java?
13328      if test ! -x "$BOOT_JDK/bin/java"; then
13329        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13331        BOOT_JDK_FOUND=no
13332      else
13333        # Do we have a bin/javac?
13334        if test ! -x "$BOOT_JDK/bin/javac"; then
13335          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13337          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13338$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13339          BOOT_JDK_FOUND=no
13340        else
13341          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13342          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13345            BOOT_JDK_FOUND=no
13346          else
13347            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13349
13350            # Extra M4 quote needed to protect [] in grep expression.
13351            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13352            if test "x$FOUND_VERSION_78" = x; then
13353              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13355              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13356$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13357              BOOT_JDK_FOUND=no
13358            else
13359              # We're done! :-)
13360              BOOT_JDK_FOUND=yes
13361
13362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13363
13364  # Input might be given as Windows format, start by converting to
13365  # unix format.
13366  path="$BOOT_JDK"
13367  new_path=`$CYGPATH -u "$path"`
13368
13369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13372  # "foo.exe" is OK but "foo" is an error.
13373  #
13374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13375  # It is also a way to make sure we got the proper file name for the real test later on.
13376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13377  if test "x$test_shortpath" = x; then
13378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13381  fi
13382
13383  # Call helper function which possibly converts this using DOS-style short mode.
13384  # If so, the updated path is stored in $new_path.
13385
13386  input_path="$new_path"
13387  # Check if we need to convert this using DOS-style short mode. If the path
13388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13389  # take no chances and rewrite it.
13390  # Note: m4 eats our [], so we need to use [ and ] instead.
13391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13392  if test "x$has_forbidden_chars" != x; then
13393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13397      # Going to short mode and back again did indeed matter. Since short mode is
13398      # case insensitive, let's make it lowercase to improve readability.
13399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13400      # Now convert it back to Unix-stile (cygpath)
13401      input_path=`$CYGPATH -u "$shortmode_path"`
13402      new_path="$input_path"
13403    fi
13404  fi
13405
13406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13407  if test "x$test_cygdrive_prefix" = x; then
13408    # As a simple fix, exclude /usr/bin since it's not a real path.
13409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13411      # a path prefixed by /cygdrive for fixpath to work.
13412      new_path="$CYGWIN_ROOT_PATH$input_path"
13413    fi
13414  fi
13415
13416
13417  if test "x$path" != "x$new_path"; then
13418    BOOT_JDK="$new_path"
13419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13421  fi
13422
13423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13424
13425  path="$BOOT_JDK"
13426  has_colon=`$ECHO $path | $GREP ^.:`
13427  new_path="$path"
13428  if test "x$has_colon" = x; then
13429    # Not in mixed or Windows style, start by that.
13430    new_path=`cmd //c echo $path`
13431  fi
13432
13433
13434  input_path="$new_path"
13435  # Check if we need to convert this using DOS-style short mode. If the path
13436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13437  # take no chances and rewrite it.
13438  # Note: m4 eats our [], so we need to use [ and ] instead.
13439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13440  if test "x$has_forbidden_chars" != x; then
13441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13443  fi
13444
13445
13446  windows_path="$new_path"
13447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13448    unix_path=`$CYGPATH -u "$windows_path"`
13449    new_path="$unix_path"
13450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13452    new_path="$unix_path"
13453  fi
13454
13455  if test "x$path" != "x$new_path"; then
13456    BOOT_JDK="$new_path"
13457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13459  fi
13460
13461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13463
13464  else
13465    # We're on a posix platform. Hooray! :)
13466    path="$BOOT_JDK"
13467
13468    if test ! -f "$path" && test ! -d "$path"; then
13469      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13470    fi
13471
13472    has_space=`$ECHO "$path" | $GREP " "`
13473    if test "x$has_space" != x; then
13474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13477    fi
13478  fi
13479
13480              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13481$as_echo_n "checking for Boot JDK... " >&6; }
13482              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13483$as_echo "$BOOT_JDK" >&6; }
13484              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13485$as_echo_n "checking Boot JDK version... " >&6; }
13486              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13488$as_echo "$BOOT_JDK_VERSION" >&6; }
13489            fi # end check jdk version
13490          fi # end check rt.jar
13491        fi # end check javac
13492      fi # end check java
13493    fi # end check boot jdk found
13494  fi
13495
13496
13497  if test "x$BOOT_JDK_FOUND" = xno; then
13498    # Now execute the test
13499
13500  if test "x$ProgramFiles" != x; then
13501    VIRTUAL_DIR="$ProgramFiles/Java"
13502
13503  windows_path="$VIRTUAL_DIR"
13504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13505    unix_path=`$CYGPATH -u "$windows_path"`
13506    VIRTUAL_DIR="$unix_path"
13507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13509    VIRTUAL_DIR="$unix_path"
13510  fi
13511
13512
13513  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13514  BOOT_JDK_SUFFIX=""
13515  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13516  if test "x$ALL_JDKS_FOUND" != x; then
13517    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13518
13519  if test "x$BOOT_JDK_FOUND" = xno; then
13520    # Now execute the test
13521
13522        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13523        if test -d "$BOOT_JDK"; then
13524          BOOT_JDK_FOUND=maybe
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13526$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13527        fi
13528
13529
13530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13532      # Do we have a bin/java?
13533      if test ! -x "$BOOT_JDK/bin/java"; then
13534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13536        BOOT_JDK_FOUND=no
13537      else
13538        # Do we have a bin/javac?
13539        if test ! -x "$BOOT_JDK/bin/javac"; then
13540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13544          BOOT_JDK_FOUND=no
13545        else
13546          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13547          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13548            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13550            BOOT_JDK_FOUND=no
13551          else
13552            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13554
13555            # Extra M4 quote needed to protect [] in grep expression.
13556            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13557            if test "x$FOUND_VERSION_78" = x; then
13558              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13560              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13561$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13562              BOOT_JDK_FOUND=no
13563            else
13564              # We're done! :-)
13565              BOOT_JDK_FOUND=yes
13566
13567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13568
13569  # Input might be given as Windows format, start by converting to
13570  # unix format.
13571  path="$BOOT_JDK"
13572  new_path=`$CYGPATH -u "$path"`
13573
13574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13577  # "foo.exe" is OK but "foo" is an error.
13578  #
13579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13580  # It is also a way to make sure we got the proper file name for the real test later on.
13581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13582  if test "x$test_shortpath" = x; then
13583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13585    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13586  fi
13587
13588  # Call helper function which possibly converts this using DOS-style short mode.
13589  # If so, the updated path is stored in $new_path.
13590
13591  input_path="$new_path"
13592  # Check if we need to convert this using DOS-style short mode. If the path
13593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13594  # take no chances and rewrite it.
13595  # Note: m4 eats our [], so we need to use [ and ] instead.
13596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13597  if test "x$has_forbidden_chars" != x; then
13598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13602      # Going to short mode and back again did indeed matter. Since short mode is
13603      # case insensitive, let's make it lowercase to improve readability.
13604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13605      # Now convert it back to Unix-stile (cygpath)
13606      input_path=`$CYGPATH -u "$shortmode_path"`
13607      new_path="$input_path"
13608    fi
13609  fi
13610
13611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13612  if test "x$test_cygdrive_prefix" = x; then
13613    # As a simple fix, exclude /usr/bin since it's not a real path.
13614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13616      # a path prefixed by /cygdrive for fixpath to work.
13617      new_path="$CYGWIN_ROOT_PATH$input_path"
13618    fi
13619  fi
13620
13621
13622  if test "x$path" != "x$new_path"; then
13623    BOOT_JDK="$new_path"
13624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13626  fi
13627
13628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13629
13630  path="$BOOT_JDK"
13631  has_colon=`$ECHO $path | $GREP ^.:`
13632  new_path="$path"
13633  if test "x$has_colon" = x; then
13634    # Not in mixed or Windows style, start by that.
13635    new_path=`cmd //c echo $path`
13636  fi
13637
13638
13639  input_path="$new_path"
13640  # Check if we need to convert this using DOS-style short mode. If the path
13641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13642  # take no chances and rewrite it.
13643  # Note: m4 eats our [], so we need to use [ and ] instead.
13644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13645  if test "x$has_forbidden_chars" != x; then
13646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13648  fi
13649
13650
13651  windows_path="$new_path"
13652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13653    unix_path=`$CYGPATH -u "$windows_path"`
13654    new_path="$unix_path"
13655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13657    new_path="$unix_path"
13658  fi
13659
13660  if test "x$path" != "x$new_path"; then
13661    BOOT_JDK="$new_path"
13662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13664  fi
13665
13666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13668
13669  else
13670    # We're on a posix platform. Hooray! :)
13671    path="$BOOT_JDK"
13672
13673    if test ! -f "$path" && test ! -d "$path"; then
13674      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13675    fi
13676
13677    has_space=`$ECHO "$path" | $GREP " "`
13678    if test "x$has_space" != x; then
13679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13681      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13682    fi
13683  fi
13684
13685              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13686$as_echo_n "checking for Boot JDK... " >&6; }
13687              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13688$as_echo "$BOOT_JDK" >&6; }
13689              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13690$as_echo_n "checking Boot JDK version... " >&6; }
13691              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13692              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13693$as_echo "$BOOT_JDK_VERSION" >&6; }
13694            fi # end check jdk version
13695          fi # end check rt.jar
13696        fi # end check javac
13697      fi # end check java
13698    fi # end check boot jdk found
13699  fi
13700
13701    done
13702  fi
13703
13704  fi
13705
13706
13707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13709      # Do we have a bin/java?
13710      if test ! -x "$BOOT_JDK/bin/java"; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13713        BOOT_JDK_FOUND=no
13714      else
13715        # Do we have a bin/javac?
13716        if test ! -x "$BOOT_JDK/bin/javac"; then
13717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13721          BOOT_JDK_FOUND=no
13722        else
13723          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13724          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13727            BOOT_JDK_FOUND=no
13728          else
13729            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13731
13732            # Extra M4 quote needed to protect [] in grep expression.
13733            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13734            if test "x$FOUND_VERSION_78" = x; then
13735              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13737              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13738$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13739              BOOT_JDK_FOUND=no
13740            else
13741              # We're done! :-)
13742              BOOT_JDK_FOUND=yes
13743
13744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13745
13746  # Input might be given as Windows format, start by converting to
13747  # unix format.
13748  path="$BOOT_JDK"
13749  new_path=`$CYGPATH -u "$path"`
13750
13751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13754  # "foo.exe" is OK but "foo" is an error.
13755  #
13756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13757  # It is also a way to make sure we got the proper file name for the real test later on.
13758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13759  if test "x$test_shortpath" = x; then
13760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13762    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13763  fi
13764
13765  # Call helper function which possibly converts this using DOS-style short mode.
13766  # If so, the updated path is stored in $new_path.
13767
13768  input_path="$new_path"
13769  # Check if we need to convert this using DOS-style short mode. If the path
13770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13771  # take no chances and rewrite it.
13772  # Note: m4 eats our [], so we need to use [ and ] instead.
13773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13774  if test "x$has_forbidden_chars" != x; then
13775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13779      # Going to short mode and back again did indeed matter. Since short mode is
13780      # case insensitive, let's make it lowercase to improve readability.
13781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13782      # Now convert it back to Unix-stile (cygpath)
13783      input_path=`$CYGPATH -u "$shortmode_path"`
13784      new_path="$input_path"
13785    fi
13786  fi
13787
13788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13789  if test "x$test_cygdrive_prefix" = x; then
13790    # As a simple fix, exclude /usr/bin since it's not a real path.
13791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13793      # a path prefixed by /cygdrive for fixpath to work.
13794      new_path="$CYGWIN_ROOT_PATH$input_path"
13795    fi
13796  fi
13797
13798
13799  if test "x$path" != "x$new_path"; then
13800    BOOT_JDK="$new_path"
13801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13803  fi
13804
13805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13806
13807  path="$BOOT_JDK"
13808  has_colon=`$ECHO $path | $GREP ^.:`
13809  new_path="$path"
13810  if test "x$has_colon" = x; then
13811    # Not in mixed or Windows style, start by that.
13812    new_path=`cmd //c echo $path`
13813  fi
13814
13815
13816  input_path="$new_path"
13817  # Check if we need to convert this using DOS-style short mode. If the path
13818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13819  # take no chances and rewrite it.
13820  # Note: m4 eats our [], so we need to use [ and ] instead.
13821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13822  if test "x$has_forbidden_chars" != x; then
13823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13825  fi
13826
13827
13828  windows_path="$new_path"
13829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13830    unix_path=`$CYGPATH -u "$windows_path"`
13831    new_path="$unix_path"
13832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13834    new_path="$unix_path"
13835  fi
13836
13837  if test "x$path" != "x$new_path"; then
13838    BOOT_JDK="$new_path"
13839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13841  fi
13842
13843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13845
13846  else
13847    # We're on a posix platform. Hooray! :)
13848    path="$BOOT_JDK"
13849
13850    if test ! -f "$path" && test ! -d "$path"; then
13851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13852    fi
13853
13854    has_space=`$ECHO "$path" | $GREP " "`
13855    if test "x$has_space" != x; then
13856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13859    fi
13860  fi
13861
13862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13863$as_echo_n "checking for Boot JDK... " >&6; }
13864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13865$as_echo "$BOOT_JDK" >&6; }
13866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13867$as_echo_n "checking Boot JDK version... " >&6; }
13868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13870$as_echo "$BOOT_JDK_VERSION" >&6; }
13871            fi # end check jdk version
13872          fi # end check rt.jar
13873        fi # end check javac
13874      fi # end check java
13875    fi # end check boot jdk found
13876  fi
13877
13878
13879  if test "x$BOOT_JDK_FOUND" = xno; then
13880    # Now execute the test
13881
13882  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13883  BOOT_JDK_SUFFIX=""
13884  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13885  if test "x$ALL_JDKS_FOUND" != x; then
13886    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13887
13888  if test "x$BOOT_JDK_FOUND" = xno; then
13889    # Now execute the test
13890
13891        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13892        if test -d "$BOOT_JDK"; then
13893          BOOT_JDK_FOUND=maybe
13894          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13895$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13896        fi
13897
13898
13899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13901      # Do we have a bin/java?
13902      if test ! -x "$BOOT_JDK/bin/java"; then
13903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13905        BOOT_JDK_FOUND=no
13906      else
13907        # Do we have a bin/javac?
13908        if test ! -x "$BOOT_JDK/bin/javac"; then
13909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13913          BOOT_JDK_FOUND=no
13914        else
13915          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13916          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13919            BOOT_JDK_FOUND=no
13920          else
13921            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13923
13924            # Extra M4 quote needed to protect [] in grep expression.
13925            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13926            if test "x$FOUND_VERSION_78" = x; then
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13929              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13930$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13931              BOOT_JDK_FOUND=no
13932            else
13933              # We're done! :-)
13934              BOOT_JDK_FOUND=yes
13935
13936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13937
13938  # Input might be given as Windows format, start by converting to
13939  # unix format.
13940  path="$BOOT_JDK"
13941  new_path=`$CYGPATH -u "$path"`
13942
13943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13946  # "foo.exe" is OK but "foo" is an error.
13947  #
13948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13949  # It is also a way to make sure we got the proper file name for the real test later on.
13950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13951  if test "x$test_shortpath" = x; then
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13955  fi
13956
13957  # Call helper function which possibly converts this using DOS-style short mode.
13958  # If so, the updated path is stored in $new_path.
13959
13960  input_path="$new_path"
13961  # Check if we need to convert this using DOS-style short mode. If the path
13962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13963  # take no chances and rewrite it.
13964  # Note: m4 eats our [], so we need to use [ and ] instead.
13965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13966  if test "x$has_forbidden_chars" != x; then
13967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13971      # Going to short mode and back again did indeed matter. Since short mode is
13972      # case insensitive, let's make it lowercase to improve readability.
13973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13974      # Now convert it back to Unix-stile (cygpath)
13975      input_path=`$CYGPATH -u "$shortmode_path"`
13976      new_path="$input_path"
13977    fi
13978  fi
13979
13980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13981  if test "x$test_cygdrive_prefix" = x; then
13982    # As a simple fix, exclude /usr/bin since it's not a real path.
13983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13985      # a path prefixed by /cygdrive for fixpath to work.
13986      new_path="$CYGWIN_ROOT_PATH$input_path"
13987    fi
13988  fi
13989
13990
13991  if test "x$path" != "x$new_path"; then
13992    BOOT_JDK="$new_path"
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13995  fi
13996
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998
13999  path="$BOOT_JDK"
14000  has_colon=`$ECHO $path | $GREP ^.:`
14001  new_path="$path"
14002  if test "x$has_colon" = x; then
14003    # Not in mixed or Windows style, start by that.
14004    new_path=`cmd //c echo $path`
14005  fi
14006
14007
14008  input_path="$new_path"
14009  # Check if we need to convert this using DOS-style short mode. If the path
14010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14011  # take no chances and rewrite it.
14012  # Note: m4 eats our [], so we need to use [ and ] instead.
14013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14014  if test "x$has_forbidden_chars" != x; then
14015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14017  fi
14018
14019
14020  windows_path="$new_path"
14021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14022    unix_path=`$CYGPATH -u "$windows_path"`
14023    new_path="$unix_path"
14024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14026    new_path="$unix_path"
14027  fi
14028
14029  if test "x$path" != "x$new_path"; then
14030    BOOT_JDK="$new_path"
14031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14033  fi
14034
14035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14037
14038  else
14039    # We're on a posix platform. Hooray! :)
14040    path="$BOOT_JDK"
14041
14042    if test ! -f "$path" && test ! -d "$path"; then
14043      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14044    fi
14045
14046    has_space=`$ECHO "$path" | $GREP " "`
14047    if test "x$has_space" != x; then
14048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14050      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14051    fi
14052  fi
14053
14054              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14055$as_echo_n "checking for Boot JDK... " >&6; }
14056              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14057$as_echo "$BOOT_JDK" >&6; }
14058              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14059$as_echo_n "checking Boot JDK version... " >&6; }
14060              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14062$as_echo "$BOOT_JDK_VERSION" >&6; }
14063            fi # end check jdk version
14064          fi # end check rt.jar
14065        fi # end check javac
14066      fi # end check java
14067    fi # end check boot jdk found
14068  fi
14069
14070    done
14071  fi
14072
14073
14074    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14075    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14076      # Do we have a bin/java?
14077      if test ! -x "$BOOT_JDK/bin/java"; then
14078        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14080        BOOT_JDK_FOUND=no
14081      else
14082        # Do we have a bin/javac?
14083        if test ! -x "$BOOT_JDK/bin/javac"; then
14084          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14086          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14087$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14088          BOOT_JDK_FOUND=no
14089        else
14090          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14091          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14092            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14094            BOOT_JDK_FOUND=no
14095          else
14096            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14097            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14098
14099            # Extra M4 quote needed to protect [] in grep expression.
14100            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14101            if test "x$FOUND_VERSION_78" = x; then
14102              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14104              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14105$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14106              BOOT_JDK_FOUND=no
14107            else
14108              # We're done! :-)
14109              BOOT_JDK_FOUND=yes
14110
14111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14112
14113  # Input might be given as Windows format, start by converting to
14114  # unix format.
14115  path="$BOOT_JDK"
14116  new_path=`$CYGPATH -u "$path"`
14117
14118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14121  # "foo.exe" is OK but "foo" is an error.
14122  #
14123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14124  # It is also a way to make sure we got the proper file name for the real test later on.
14125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14126  if test "x$test_shortpath" = x; then
14127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14129    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14130  fi
14131
14132  # Call helper function which possibly converts this using DOS-style short mode.
14133  # If so, the updated path is stored in $new_path.
14134
14135  input_path="$new_path"
14136  # Check if we need to convert this using DOS-style short mode. If the path
14137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14138  # take no chances and rewrite it.
14139  # Note: m4 eats our [], so we need to use [ and ] instead.
14140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14141  if test "x$has_forbidden_chars" != x; then
14142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14146      # Going to short mode and back again did indeed matter. Since short mode is
14147      # case insensitive, let's make it lowercase to improve readability.
14148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14149      # Now convert it back to Unix-stile (cygpath)
14150      input_path=`$CYGPATH -u "$shortmode_path"`
14151      new_path="$input_path"
14152    fi
14153  fi
14154
14155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14156  if test "x$test_cygdrive_prefix" = x; then
14157    # As a simple fix, exclude /usr/bin since it's not a real path.
14158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14160      # a path prefixed by /cygdrive for fixpath to work.
14161      new_path="$CYGWIN_ROOT_PATH$input_path"
14162    fi
14163  fi
14164
14165
14166  if test "x$path" != "x$new_path"; then
14167    BOOT_JDK="$new_path"
14168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14170  fi
14171
14172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14173
14174  path="$BOOT_JDK"
14175  has_colon=`$ECHO $path | $GREP ^.:`
14176  new_path="$path"
14177  if test "x$has_colon" = x; then
14178    # Not in mixed or Windows style, start by that.
14179    new_path=`cmd //c echo $path`
14180  fi
14181
14182
14183  input_path="$new_path"
14184  # Check if we need to convert this using DOS-style short mode. If the path
14185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14186  # take no chances and rewrite it.
14187  # Note: m4 eats our [], so we need to use [ and ] instead.
14188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14189  if test "x$has_forbidden_chars" != x; then
14190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14192  fi
14193
14194
14195  windows_path="$new_path"
14196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14197    unix_path=`$CYGPATH -u "$windows_path"`
14198    new_path="$unix_path"
14199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14201    new_path="$unix_path"
14202  fi
14203
14204  if test "x$path" != "x$new_path"; then
14205    BOOT_JDK="$new_path"
14206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14208  fi
14209
14210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14212
14213  else
14214    # We're on a posix platform. Hooray! :)
14215    path="$BOOT_JDK"
14216
14217    if test ! -f "$path" && test ! -d "$path"; then
14218      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14219    fi
14220
14221    has_space=`$ECHO "$path" | $GREP " "`
14222    if test "x$has_space" != x; then
14223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14225      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14226    fi
14227  fi
14228
14229              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14230$as_echo_n "checking for Boot JDK... " >&6; }
14231              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14232$as_echo "$BOOT_JDK" >&6; }
14233              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14234$as_echo_n "checking Boot JDK version... " >&6; }
14235              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14236              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14237$as_echo "$BOOT_JDK_VERSION" >&6; }
14238            fi # end check jdk version
14239          fi # end check rt.jar
14240        fi # end check javac
14241      fi # end check java
14242    fi # end check boot jdk found
14243  fi
14244
14245  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14246
14247  if test "x$BOOT_JDK_FOUND" = xno; then
14248    # Now execute the test
14249
14250  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14251  BOOT_JDK_SUFFIX="/Contents/Home"
14252  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14253  if test "x$ALL_JDKS_FOUND" != x; then
14254    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14255
14256  if test "x$BOOT_JDK_FOUND" = xno; then
14257    # Now execute the test
14258
14259        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14260        if test -d "$BOOT_JDK"; then
14261          BOOT_JDK_FOUND=maybe
14262          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14263$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14264        fi
14265
14266
14267    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14268    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14269      # Do we have a bin/java?
14270      if test ! -x "$BOOT_JDK/bin/java"; then
14271        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14273        BOOT_JDK_FOUND=no
14274      else
14275        # Do we have a bin/javac?
14276        if test ! -x "$BOOT_JDK/bin/javac"; then
14277          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14279          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14280$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14281          BOOT_JDK_FOUND=no
14282        else
14283          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14284          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14285            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14287            BOOT_JDK_FOUND=no
14288          else
14289            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14291
14292            # Extra M4 quote needed to protect [] in grep expression.
14293            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14294            if test "x$FOUND_VERSION_78" = x; then
14295              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14297              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14298$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14299              BOOT_JDK_FOUND=no
14300            else
14301              # We're done! :-)
14302              BOOT_JDK_FOUND=yes
14303
14304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14305
14306  # Input might be given as Windows format, start by converting to
14307  # unix format.
14308  path="$BOOT_JDK"
14309  new_path=`$CYGPATH -u "$path"`
14310
14311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14314  # "foo.exe" is OK but "foo" is an error.
14315  #
14316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14317  # It is also a way to make sure we got the proper file name for the real test later on.
14318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14319  if test "x$test_shortpath" = x; then
14320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14323  fi
14324
14325  # Call helper function which possibly converts this using DOS-style short mode.
14326  # If so, the updated path is stored in $new_path.
14327
14328  input_path="$new_path"
14329  # Check if we need to convert this using DOS-style short mode. If the path
14330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14331  # take no chances and rewrite it.
14332  # Note: m4 eats our [], so we need to use [ and ] instead.
14333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14334  if test "x$has_forbidden_chars" != x; then
14335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14339      # Going to short mode and back again did indeed matter. Since short mode is
14340      # case insensitive, let's make it lowercase to improve readability.
14341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14342      # Now convert it back to Unix-stile (cygpath)
14343      input_path=`$CYGPATH -u "$shortmode_path"`
14344      new_path="$input_path"
14345    fi
14346  fi
14347
14348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14349  if test "x$test_cygdrive_prefix" = x; then
14350    # As a simple fix, exclude /usr/bin since it's not a real path.
14351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14353      # a path prefixed by /cygdrive for fixpath to work.
14354      new_path="$CYGWIN_ROOT_PATH$input_path"
14355    fi
14356  fi
14357
14358
14359  if test "x$path" != "x$new_path"; then
14360    BOOT_JDK="$new_path"
14361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14363  fi
14364
14365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14366
14367  path="$BOOT_JDK"
14368  has_colon=`$ECHO $path | $GREP ^.:`
14369  new_path="$path"
14370  if test "x$has_colon" = x; then
14371    # Not in mixed or Windows style, start by that.
14372    new_path=`cmd //c echo $path`
14373  fi
14374
14375
14376  input_path="$new_path"
14377  # Check if we need to convert this using DOS-style short mode. If the path
14378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14379  # take no chances and rewrite it.
14380  # Note: m4 eats our [], so we need to use [ and ] instead.
14381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14382  if test "x$has_forbidden_chars" != x; then
14383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14385  fi
14386
14387
14388  windows_path="$new_path"
14389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14390    unix_path=`$CYGPATH -u "$windows_path"`
14391    new_path="$unix_path"
14392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14394    new_path="$unix_path"
14395  fi
14396
14397  if test "x$path" != "x$new_path"; then
14398    BOOT_JDK="$new_path"
14399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14401  fi
14402
14403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14405
14406  else
14407    # We're on a posix platform. Hooray! :)
14408    path="$BOOT_JDK"
14409
14410    if test ! -f "$path" && test ! -d "$path"; then
14411      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14412    fi
14413
14414    has_space=`$ECHO "$path" | $GREP " "`
14415    if test "x$has_space" != x; then
14416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14418      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14419    fi
14420  fi
14421
14422              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14423$as_echo_n "checking for Boot JDK... " >&6; }
14424              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14425$as_echo "$BOOT_JDK" >&6; }
14426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14427$as_echo_n "checking Boot JDK version... " >&6; }
14428              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14429              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14430$as_echo "$BOOT_JDK_VERSION" >&6; }
14431            fi # end check jdk version
14432          fi # end check rt.jar
14433        fi # end check javac
14434      fi # end check java
14435    fi # end check boot jdk found
14436  fi
14437
14438    done
14439  fi
14440
14441
14442    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14443    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14444      # Do we have a bin/java?
14445      if test ! -x "$BOOT_JDK/bin/java"; then
14446        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14448        BOOT_JDK_FOUND=no
14449      else
14450        # Do we have a bin/javac?
14451        if test ! -x "$BOOT_JDK/bin/javac"; then
14452          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14454          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14455$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14456          BOOT_JDK_FOUND=no
14457        else
14458          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14459          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14460            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14462            BOOT_JDK_FOUND=no
14463          else
14464            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14465            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14466
14467            # Extra M4 quote needed to protect [] in grep expression.
14468            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14469            if test "x$FOUND_VERSION_78" = x; then
14470              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14472              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14473$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14474              BOOT_JDK_FOUND=no
14475            else
14476              # We're done! :-)
14477              BOOT_JDK_FOUND=yes
14478
14479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14480
14481  # Input might be given as Windows format, start by converting to
14482  # unix format.
14483  path="$BOOT_JDK"
14484  new_path=`$CYGPATH -u "$path"`
14485
14486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14489  # "foo.exe" is OK but "foo" is an error.
14490  #
14491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14492  # It is also a way to make sure we got the proper file name for the real test later on.
14493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14494  if test "x$test_shortpath" = x; then
14495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14497    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14498  fi
14499
14500  # Call helper function which possibly converts this using DOS-style short mode.
14501  # If so, the updated path is stored in $new_path.
14502
14503  input_path="$new_path"
14504  # Check if we need to convert this using DOS-style short mode. If the path
14505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14506  # take no chances and rewrite it.
14507  # Note: m4 eats our [], so we need to use [ and ] instead.
14508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14509  if test "x$has_forbidden_chars" != x; then
14510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14514      # Going to short mode and back again did indeed matter. Since short mode is
14515      # case insensitive, let's make it lowercase to improve readability.
14516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14517      # Now convert it back to Unix-stile (cygpath)
14518      input_path=`$CYGPATH -u "$shortmode_path"`
14519      new_path="$input_path"
14520    fi
14521  fi
14522
14523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14524  if test "x$test_cygdrive_prefix" = x; then
14525    # As a simple fix, exclude /usr/bin since it's not a real path.
14526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14528      # a path prefixed by /cygdrive for fixpath to work.
14529      new_path="$CYGWIN_ROOT_PATH$input_path"
14530    fi
14531  fi
14532
14533
14534  if test "x$path" != "x$new_path"; then
14535    BOOT_JDK="$new_path"
14536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14538  fi
14539
14540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14541
14542  path="$BOOT_JDK"
14543  has_colon=`$ECHO $path | $GREP ^.:`
14544  new_path="$path"
14545  if test "x$has_colon" = x; then
14546    # Not in mixed or Windows style, start by that.
14547    new_path=`cmd //c echo $path`
14548  fi
14549
14550
14551  input_path="$new_path"
14552  # Check if we need to convert this using DOS-style short mode. If the path
14553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14554  # take no chances and rewrite it.
14555  # Note: m4 eats our [], so we need to use [ and ] instead.
14556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14557  if test "x$has_forbidden_chars" != x; then
14558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14560  fi
14561
14562
14563  windows_path="$new_path"
14564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14565    unix_path=`$CYGPATH -u "$windows_path"`
14566    new_path="$unix_path"
14567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14569    new_path="$unix_path"
14570  fi
14571
14572  if test "x$path" != "x$new_path"; then
14573    BOOT_JDK="$new_path"
14574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14576  fi
14577
14578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14580
14581  else
14582    # We're on a posix platform. Hooray! :)
14583    path="$BOOT_JDK"
14584
14585    if test ! -f "$path" && test ! -d "$path"; then
14586      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14587    fi
14588
14589    has_space=`$ECHO "$path" | $GREP " "`
14590    if test "x$has_space" != x; then
14591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14593      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14594    fi
14595  fi
14596
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14598$as_echo_n "checking for Boot JDK... " >&6; }
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14600$as_echo "$BOOT_JDK" >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14602$as_echo_n "checking Boot JDK version... " >&6; }
14603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14605$as_echo "$BOOT_JDK_VERSION" >&6; }
14606            fi # end check jdk version
14607          fi # end check rt.jar
14608        fi # end check javac
14609      fi # end check java
14610    fi # end check boot jdk found
14611  fi
14612
14613
14614  if test "x$BOOT_JDK_FOUND" = xno; then
14615    # Now execute the test
14616
14617  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14618  BOOT_JDK_SUFFIX="/Contents/Home"
14619  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14620  if test "x$ALL_JDKS_FOUND" != x; then
14621    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14622
14623  if test "x$BOOT_JDK_FOUND" = xno; then
14624    # Now execute the test
14625
14626        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14627        if test -d "$BOOT_JDK"; then
14628          BOOT_JDK_FOUND=maybe
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14630$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14631        fi
14632
14633
14634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14636      # Do we have a bin/java?
14637      if test ! -x "$BOOT_JDK/bin/java"; then
14638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14640        BOOT_JDK_FOUND=no
14641      else
14642        # Do we have a bin/javac?
14643        if test ! -x "$BOOT_JDK/bin/javac"; then
14644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14648          BOOT_JDK_FOUND=no
14649        else
14650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14654            BOOT_JDK_FOUND=no
14655          else
14656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14658
14659            # Extra M4 quote needed to protect [] in grep expression.
14660            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14661            if test "x$FOUND_VERSION_78" = x; then
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14665$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14666              BOOT_JDK_FOUND=no
14667            else
14668              # We're done! :-)
14669              BOOT_JDK_FOUND=yes
14670
14671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14672
14673  # Input might be given as Windows format, start by converting to
14674  # unix format.
14675  path="$BOOT_JDK"
14676  new_path=`$CYGPATH -u "$path"`
14677
14678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14681  # "foo.exe" is OK but "foo" is an error.
14682  #
14683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14684  # It is also a way to make sure we got the proper file name for the real test later on.
14685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14686  if test "x$test_shortpath" = x; then
14687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14690  fi
14691
14692  # Call helper function which possibly converts this using DOS-style short mode.
14693  # If so, the updated path is stored in $new_path.
14694
14695  input_path="$new_path"
14696  # Check if we need to convert this using DOS-style short mode. If the path
14697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14698  # take no chances and rewrite it.
14699  # Note: m4 eats our [], so we need to use [ and ] instead.
14700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14701  if test "x$has_forbidden_chars" != x; then
14702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14706      # Going to short mode and back again did indeed matter. Since short mode is
14707      # case insensitive, let's make it lowercase to improve readability.
14708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14709      # Now convert it back to Unix-stile (cygpath)
14710      input_path=`$CYGPATH -u "$shortmode_path"`
14711      new_path="$input_path"
14712    fi
14713  fi
14714
14715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14716  if test "x$test_cygdrive_prefix" = x; then
14717    # As a simple fix, exclude /usr/bin since it's not a real path.
14718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14720      # a path prefixed by /cygdrive for fixpath to work.
14721      new_path="$CYGWIN_ROOT_PATH$input_path"
14722    fi
14723  fi
14724
14725
14726  if test "x$path" != "x$new_path"; then
14727    BOOT_JDK="$new_path"
14728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14730  fi
14731
14732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14733
14734  path="$BOOT_JDK"
14735  has_colon=`$ECHO $path | $GREP ^.:`
14736  new_path="$path"
14737  if test "x$has_colon" = x; then
14738    # Not in mixed or Windows style, start by that.
14739    new_path=`cmd //c echo $path`
14740  fi
14741
14742
14743  input_path="$new_path"
14744  # Check if we need to convert this using DOS-style short mode. If the path
14745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14746  # take no chances and rewrite it.
14747  # Note: m4 eats our [], so we need to use [ and ] instead.
14748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14749  if test "x$has_forbidden_chars" != x; then
14750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14752  fi
14753
14754
14755  windows_path="$new_path"
14756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14757    unix_path=`$CYGPATH -u "$windows_path"`
14758    new_path="$unix_path"
14759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14761    new_path="$unix_path"
14762  fi
14763
14764  if test "x$path" != "x$new_path"; then
14765    BOOT_JDK="$new_path"
14766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14768  fi
14769
14770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14772
14773  else
14774    # We're on a posix platform. Hooray! :)
14775    path="$BOOT_JDK"
14776
14777    if test ! -f "$path" && test ! -d "$path"; then
14778      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14779    fi
14780
14781    has_space=`$ECHO "$path" | $GREP " "`
14782    if test "x$has_space" != x; then
14783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14786    fi
14787  fi
14788
14789              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14790$as_echo_n "checking for Boot JDK... " >&6; }
14791              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14792$as_echo "$BOOT_JDK" >&6; }
14793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14794$as_echo_n "checking Boot JDK version... " >&6; }
14795              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14796              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14797$as_echo "$BOOT_JDK_VERSION" >&6; }
14798            fi # end check jdk version
14799          fi # end check rt.jar
14800        fi # end check javac
14801      fi # end check java
14802    fi # end check boot jdk found
14803  fi
14804
14805    done
14806  fi
14807
14808
14809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14811      # Do we have a bin/java?
14812      if test ! -x "$BOOT_JDK/bin/java"; then
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14815        BOOT_JDK_FOUND=no
14816      else
14817        # Do we have a bin/javac?
14818        if test ! -x "$BOOT_JDK/bin/javac"; then
14819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14823          BOOT_JDK_FOUND=no
14824        else
14825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14829            BOOT_JDK_FOUND=no
14830          else
14831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14833
14834            # Extra M4 quote needed to protect [] in grep expression.
14835            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14836            if test "x$FOUND_VERSION_78" = x; then
14837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14840$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14841              BOOT_JDK_FOUND=no
14842            else
14843              # We're done! :-)
14844              BOOT_JDK_FOUND=yes
14845
14846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14847
14848  # Input might be given as Windows format, start by converting to
14849  # unix format.
14850  path="$BOOT_JDK"
14851  new_path=`$CYGPATH -u "$path"`
14852
14853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14856  # "foo.exe" is OK but "foo" is an error.
14857  #
14858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14859  # It is also a way to make sure we got the proper file name for the real test later on.
14860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14861  if test "x$test_shortpath" = x; then
14862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14865  fi
14866
14867  # Call helper function which possibly converts this using DOS-style short mode.
14868  # If so, the updated path is stored in $new_path.
14869
14870  input_path="$new_path"
14871  # Check if we need to convert this using DOS-style short mode. If the path
14872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14873  # take no chances and rewrite it.
14874  # Note: m4 eats our [], so we need to use [ and ] instead.
14875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14876  if test "x$has_forbidden_chars" != x; then
14877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14881      # Going to short mode and back again did indeed matter. Since short mode is
14882      # case insensitive, let's make it lowercase to improve readability.
14883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14884      # Now convert it back to Unix-stile (cygpath)
14885      input_path=`$CYGPATH -u "$shortmode_path"`
14886      new_path="$input_path"
14887    fi
14888  fi
14889
14890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14891  if test "x$test_cygdrive_prefix" = x; then
14892    # As a simple fix, exclude /usr/bin since it's not a real path.
14893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14895      # a path prefixed by /cygdrive for fixpath to work.
14896      new_path="$CYGWIN_ROOT_PATH$input_path"
14897    fi
14898  fi
14899
14900
14901  if test "x$path" != "x$new_path"; then
14902    BOOT_JDK="$new_path"
14903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14905  fi
14906
14907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14908
14909  path="$BOOT_JDK"
14910  has_colon=`$ECHO $path | $GREP ^.:`
14911  new_path="$path"
14912  if test "x$has_colon" = x; then
14913    # Not in mixed or Windows style, start by that.
14914    new_path=`cmd //c echo $path`
14915  fi
14916
14917
14918  input_path="$new_path"
14919  # Check if we need to convert this using DOS-style short mode. If the path
14920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14921  # take no chances and rewrite it.
14922  # Note: m4 eats our [], so we need to use [ and ] instead.
14923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14924  if test "x$has_forbidden_chars" != x; then
14925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14927  fi
14928
14929
14930  windows_path="$new_path"
14931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14932    unix_path=`$CYGPATH -u "$windows_path"`
14933    new_path="$unix_path"
14934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14936    new_path="$unix_path"
14937  fi
14938
14939  if test "x$path" != "x$new_path"; then
14940    BOOT_JDK="$new_path"
14941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14943  fi
14944
14945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14947
14948  else
14949    # We're on a posix platform. Hooray! :)
14950    path="$BOOT_JDK"
14951
14952    if test ! -f "$path" && test ! -d "$path"; then
14953      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14954    fi
14955
14956    has_space=`$ECHO "$path" | $GREP " "`
14957    if test "x$has_space" != x; then
14958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14961    fi
14962  fi
14963
14964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14965$as_echo_n "checking for Boot JDK... " >&6; }
14966              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14967$as_echo "$BOOT_JDK" >&6; }
14968              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14969$as_echo_n "checking Boot JDK version... " >&6; }
14970              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14971              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14972$as_echo "$BOOT_JDK_VERSION" >&6; }
14973            fi # end check jdk version
14974          fi # end check rt.jar
14975        fi # end check javac
14976      fi # end check java
14977    fi # end check boot jdk found
14978  fi
14979
14980  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14981
14982  if test "x$BOOT_JDK_FOUND" = xno; then
14983    # Now execute the test
14984
14985  BOOT_JDK_PREFIX="/usr/lib/jvm"
14986  BOOT_JDK_SUFFIX=""
14987  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14988  if test "x$ALL_JDKS_FOUND" != x; then
14989    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14990
14991  if test "x$BOOT_JDK_FOUND" = xno; then
14992    # Now execute the test
14993
14994        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14995        if test -d "$BOOT_JDK"; then
14996          BOOT_JDK_FOUND=maybe
14997          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14998$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14999        fi
15000
15001
15002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15004      # Do we have a bin/java?
15005      if test ! -x "$BOOT_JDK/bin/java"; then
15006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15008        BOOT_JDK_FOUND=no
15009      else
15010        # Do we have a bin/javac?
15011        if test ! -x "$BOOT_JDK/bin/javac"; then
15012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15016          BOOT_JDK_FOUND=no
15017        else
15018          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15019          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15022            BOOT_JDK_FOUND=no
15023          else
15024            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15026
15027            # Extra M4 quote needed to protect [] in grep expression.
15028            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15029            if test "x$FOUND_VERSION_78" = x; then
15030              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15032              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15033$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15034              BOOT_JDK_FOUND=no
15035            else
15036              # We're done! :-)
15037              BOOT_JDK_FOUND=yes
15038
15039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15040
15041  # Input might be given as Windows format, start by converting to
15042  # unix format.
15043  path="$BOOT_JDK"
15044  new_path=`$CYGPATH -u "$path"`
15045
15046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15049  # "foo.exe" is OK but "foo" is an error.
15050  #
15051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15052  # It is also a way to make sure we got the proper file name for the real test later on.
15053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15054  if test "x$test_shortpath" = x; then
15055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15058  fi
15059
15060  # Call helper function which possibly converts this using DOS-style short mode.
15061  # If so, the updated path is stored in $new_path.
15062
15063  input_path="$new_path"
15064  # Check if we need to convert this using DOS-style short mode. If the path
15065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15066  # take no chances and rewrite it.
15067  # Note: m4 eats our [], so we need to use [ and ] instead.
15068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15069  if test "x$has_forbidden_chars" != x; then
15070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15074      # Going to short mode and back again did indeed matter. Since short mode is
15075      # case insensitive, let's make it lowercase to improve readability.
15076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15077      # Now convert it back to Unix-stile (cygpath)
15078      input_path=`$CYGPATH -u "$shortmode_path"`
15079      new_path="$input_path"
15080    fi
15081  fi
15082
15083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15084  if test "x$test_cygdrive_prefix" = x; then
15085    # As a simple fix, exclude /usr/bin since it's not a real path.
15086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15088      # a path prefixed by /cygdrive for fixpath to work.
15089      new_path="$CYGWIN_ROOT_PATH$input_path"
15090    fi
15091  fi
15092
15093
15094  if test "x$path" != "x$new_path"; then
15095    BOOT_JDK="$new_path"
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15098  fi
15099
15100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15101
15102  path="$BOOT_JDK"
15103  has_colon=`$ECHO $path | $GREP ^.:`
15104  new_path="$path"
15105  if test "x$has_colon" = x; then
15106    # Not in mixed or Windows style, start by that.
15107    new_path=`cmd //c echo $path`
15108  fi
15109
15110
15111  input_path="$new_path"
15112  # Check if we need to convert this using DOS-style short mode. If the path
15113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15114  # take no chances and rewrite it.
15115  # Note: m4 eats our [], so we need to use [ and ] instead.
15116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15117  if test "x$has_forbidden_chars" != x; then
15118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15120  fi
15121
15122
15123  windows_path="$new_path"
15124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15125    unix_path=`$CYGPATH -u "$windows_path"`
15126    new_path="$unix_path"
15127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15129    new_path="$unix_path"
15130  fi
15131
15132  if test "x$path" != "x$new_path"; then
15133    BOOT_JDK="$new_path"
15134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15136  fi
15137
15138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15140
15141  else
15142    # We're on a posix platform. Hooray! :)
15143    path="$BOOT_JDK"
15144
15145    if test ! -f "$path" && test ! -d "$path"; then
15146      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15147    fi
15148
15149    has_space=`$ECHO "$path" | $GREP " "`
15150    if test "x$has_space" != x; then
15151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15154    fi
15155  fi
15156
15157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15158$as_echo_n "checking for Boot JDK... " >&6; }
15159              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15160$as_echo "$BOOT_JDK" >&6; }
15161              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15162$as_echo_n "checking Boot JDK version... " >&6; }
15163              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15165$as_echo "$BOOT_JDK_VERSION" >&6; }
15166            fi # end check jdk version
15167          fi # end check rt.jar
15168        fi # end check javac
15169      fi # end check java
15170    fi # end check boot jdk found
15171  fi
15172
15173    done
15174  fi
15175
15176
15177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15179      # Do we have a bin/java?
15180      if test ! -x "$BOOT_JDK/bin/java"; then
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15183        BOOT_JDK_FOUND=no
15184      else
15185        # Do we have a bin/javac?
15186        if test ! -x "$BOOT_JDK/bin/javac"; then
15187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15191          BOOT_JDK_FOUND=no
15192        else
15193          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15194          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15195            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15197            BOOT_JDK_FOUND=no
15198          else
15199            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15200            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15201
15202            # Extra M4 quote needed to protect [] in grep expression.
15203            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15204            if test "x$FOUND_VERSION_78" = x; then
15205              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15208$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15209              BOOT_JDK_FOUND=no
15210            else
15211              # We're done! :-)
15212              BOOT_JDK_FOUND=yes
15213
15214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15215
15216  # Input might be given as Windows format, start by converting to
15217  # unix format.
15218  path="$BOOT_JDK"
15219  new_path=`$CYGPATH -u "$path"`
15220
15221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15224  # "foo.exe" is OK but "foo" is an error.
15225  #
15226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15227  # It is also a way to make sure we got the proper file name for the real test later on.
15228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15229  if test "x$test_shortpath" = x; then
15230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15233  fi
15234
15235  # Call helper function which possibly converts this using DOS-style short mode.
15236  # If so, the updated path is stored in $new_path.
15237
15238  input_path="$new_path"
15239  # Check if we need to convert this using DOS-style short mode. If the path
15240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15241  # take no chances and rewrite it.
15242  # Note: m4 eats our [], so we need to use [ and ] instead.
15243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15244  if test "x$has_forbidden_chars" != x; then
15245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15249      # Going to short mode and back again did indeed matter. Since short mode is
15250      # case insensitive, let's make it lowercase to improve readability.
15251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15252      # Now convert it back to Unix-stile (cygpath)
15253      input_path=`$CYGPATH -u "$shortmode_path"`
15254      new_path="$input_path"
15255    fi
15256  fi
15257
15258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15259  if test "x$test_cygdrive_prefix" = x; then
15260    # As a simple fix, exclude /usr/bin since it's not a real path.
15261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15263      # a path prefixed by /cygdrive for fixpath to work.
15264      new_path="$CYGWIN_ROOT_PATH$input_path"
15265    fi
15266  fi
15267
15268
15269  if test "x$path" != "x$new_path"; then
15270    BOOT_JDK="$new_path"
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15273  fi
15274
15275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15276
15277  path="$BOOT_JDK"
15278  has_colon=`$ECHO $path | $GREP ^.:`
15279  new_path="$path"
15280  if test "x$has_colon" = x; then
15281    # Not in mixed or Windows style, start by that.
15282    new_path=`cmd //c echo $path`
15283  fi
15284
15285
15286  input_path="$new_path"
15287  # Check if we need to convert this using DOS-style short mode. If the path
15288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15289  # take no chances and rewrite it.
15290  # Note: m4 eats our [], so we need to use [ and ] instead.
15291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15292  if test "x$has_forbidden_chars" != x; then
15293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15295  fi
15296
15297
15298  windows_path="$new_path"
15299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15300    unix_path=`$CYGPATH -u "$windows_path"`
15301    new_path="$unix_path"
15302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15304    new_path="$unix_path"
15305  fi
15306
15307  if test "x$path" != "x$new_path"; then
15308    BOOT_JDK="$new_path"
15309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15311  fi
15312
15313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15315
15316  else
15317    # We're on a posix platform. Hooray! :)
15318    path="$BOOT_JDK"
15319
15320    if test ! -f "$path" && test ! -d "$path"; then
15321      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15322    fi
15323
15324    has_space=`$ECHO "$path" | $GREP " "`
15325    if test "x$has_space" != x; then
15326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15328      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15329    fi
15330  fi
15331
15332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15333$as_echo_n "checking for Boot JDK... " >&6; }
15334              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15335$as_echo "$BOOT_JDK" >&6; }
15336              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15337$as_echo_n "checking Boot JDK version... " >&6; }
15338              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15339              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15340$as_echo "$BOOT_JDK_VERSION" >&6; }
15341            fi # end check jdk version
15342          fi # end check rt.jar
15343        fi # end check javac
15344      fi # end check java
15345    fi # end check boot jdk found
15346  fi
15347
15348  fi
15349
15350
15351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15353      # Do we have a bin/java?
15354      if test ! -x "$BOOT_JDK/bin/java"; then
15355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15357        BOOT_JDK_FOUND=no
15358      else
15359        # Do we have a bin/javac?
15360        if test ! -x "$BOOT_JDK/bin/javac"; then
15361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15365          BOOT_JDK_FOUND=no
15366        else
15367          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15368          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15371            BOOT_JDK_FOUND=no
15372          else
15373            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15375
15376            # Extra M4 quote needed to protect [] in grep expression.
15377            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15378            if test "x$FOUND_VERSION_78" = x; then
15379              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15382$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15383              BOOT_JDK_FOUND=no
15384            else
15385              # We're done! :-)
15386              BOOT_JDK_FOUND=yes
15387
15388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15389
15390  # Input might be given as Windows format, start by converting to
15391  # unix format.
15392  path="$BOOT_JDK"
15393  new_path=`$CYGPATH -u "$path"`
15394
15395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15398  # "foo.exe" is OK but "foo" is an error.
15399  #
15400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15401  # It is also a way to make sure we got the proper file name for the real test later on.
15402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15403  if test "x$test_shortpath" = x; then
15404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15407  fi
15408
15409  # Call helper function which possibly converts this using DOS-style short mode.
15410  # If so, the updated path is stored in $new_path.
15411
15412  input_path="$new_path"
15413  # Check if we need to convert this using DOS-style short mode. If the path
15414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15415  # take no chances and rewrite it.
15416  # Note: m4 eats our [], so we need to use [ and ] instead.
15417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15418  if test "x$has_forbidden_chars" != x; then
15419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15423      # Going to short mode and back again did indeed matter. Since short mode is
15424      # case insensitive, let's make it lowercase to improve readability.
15425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15426      # Now convert it back to Unix-stile (cygpath)
15427      input_path=`$CYGPATH -u "$shortmode_path"`
15428      new_path="$input_path"
15429    fi
15430  fi
15431
15432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15433  if test "x$test_cygdrive_prefix" = x; then
15434    # As a simple fix, exclude /usr/bin since it's not a real path.
15435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15437      # a path prefixed by /cygdrive for fixpath to work.
15438      new_path="$CYGWIN_ROOT_PATH$input_path"
15439    fi
15440  fi
15441
15442
15443  if test "x$path" != "x$new_path"; then
15444    BOOT_JDK="$new_path"
15445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15447  fi
15448
15449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15450
15451  path="$BOOT_JDK"
15452  has_colon=`$ECHO $path | $GREP ^.:`
15453  new_path="$path"
15454  if test "x$has_colon" = x; then
15455    # Not in mixed or Windows style, start by that.
15456    new_path=`cmd //c echo $path`
15457  fi
15458
15459
15460  input_path="$new_path"
15461  # Check if we need to convert this using DOS-style short mode. If the path
15462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15463  # take no chances and rewrite it.
15464  # Note: m4 eats our [], so we need to use [ and ] instead.
15465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15466  if test "x$has_forbidden_chars" != x; then
15467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15469  fi
15470
15471
15472  windows_path="$new_path"
15473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15474    unix_path=`$CYGPATH -u "$windows_path"`
15475    new_path="$unix_path"
15476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15478    new_path="$unix_path"
15479  fi
15480
15481  if test "x$path" != "x$new_path"; then
15482    BOOT_JDK="$new_path"
15483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15485  fi
15486
15487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15489
15490  else
15491    # We're on a posix platform. Hooray! :)
15492    path="$BOOT_JDK"
15493
15494    if test ! -f "$path" && test ! -d "$path"; then
15495      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15496    fi
15497
15498    has_space=`$ECHO "$path" | $GREP " "`
15499    if test "x$has_space" != x; then
15500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15502      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15503    fi
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    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15708    # If so, then append -Xms64M to boot_jdk_jvmargs
15709    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15710    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15711    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15712        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15713    fi
15714
15715    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15716        # Why does macosx need more heap? Its the huge JDK batch.
15717
15718    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15719    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15720    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15721    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15722    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15723        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15724    fi
15725
15726    else
15727
15728    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15729    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15730    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15731    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15732    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15733        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15734    fi
15735
15736    fi
15737    # When is adding -client something that speeds up the JVM?
15738    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15739
15740    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15741    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15742    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15743    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15744    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15745        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15746    fi
15747
15748
15749    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15750    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15751    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15752    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15753    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15754        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15755    fi
15756
15757
15758    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15759    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15760    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15761    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15762    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15763        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15764    fi
15765
15766    # Disable special log output when a debug build is used as Boot JDK...
15767
15768    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15769    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15770    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15771    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15772    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15773        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15774    fi
15775
15776fi
15777
15778BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15779
15780
15781
15782###############################################################################
15783#
15784# Configure the sources to use. We can add or override individual directories.
15785#
15786###############################################################################
15787
15788
15789
15790# Where are the sources. Any of these can be overridden
15791# using --with-override-corba and the likes.
15792LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15793CORBA_TOPDIR="$SRC_ROOT/corba"
15794JAXP_TOPDIR="$SRC_ROOT/jaxp"
15795JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15796HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15797NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15798JDK_TOPDIR="$SRC_ROOT/jdk"
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809###############################################################################
15810#
15811# Pickup additional source for a component from outside of the source root
15812# or override source for a component.
15813#
15814
15815# Check whether --with-add-source-root was given.
15816if test "${with_add_source_root+set}" = set; then :
15817  withval=$with_add_source_root;
15818fi
15819
15820
15821
15822# Check whether --with-override-source-root was given.
15823if test "${with_override_source_root+set}" = set; then :
15824  withval=$with_override_source_root;
15825fi
15826
15827
15828
15829# Check whether --with-adds-and-overrides was given.
15830if test "${with_adds_and_overrides+set}" = set; then :
15831  withval=$with_adds_and_overrides;
15832fi
15833
15834
15835if test "x$with_adds_and_overrides" != x; then
15836    with_add_source_root="$with_adds_and_overrides/adds"
15837    with_override_source_root="$with_adds_and_overrides/overrides"
15838fi
15839
15840if test "x$with_add_source_root" != x; then
15841    if ! test -d $with_add_source_root; then
15842       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15843    fi
15844    CURDIR="$PWD"
15845    cd "$with_add_source_root"
15846    ADD_SRC_ROOT="`pwd`"
15847    cd "$CURDIR"
15848    # Verify that the addon source root does not have any root makefiles.
15849    # If it does, then it is usually an error, prevent this.
15850    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15851       test -f $with_add_source_root/langtools/make/Makefile; then
15852        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
15853    fi
15854    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15855       test -f $with_add_source_root/corba/make/Makefile; then
15856        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
15857    fi
15858    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15859       test -f $with_add_source_root/jaxp/make/Makefile; then
15860        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
15861    fi
15862    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15863       test -f $with_add_source_root/jaxws/make/Makefile; then
15864        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
15865    fi
15866    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15867       test -f $with_add_source_root/hotspot/make/Makefile; then
15868        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
15869    fi
15870    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15871       test -f $with_add_source_root/jdk/make/Makefile; then
15872        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
15873    fi
15874fi
15875
15876
15877if test "x$with_override_source_root" != x; then
15878    if ! test -d $with_override_source_root; then
15879       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15880    fi
15881    CURDIR="$PWD"
15882    cd "$with_override_source_root"
15883    OVERRIDE_SRC_ROOT="`pwd`"
15884    cd "$CURDIR"
15885    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15886       test -f $with_override_source_root/langtools/make/Makefile; then
15887        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
15888    fi
15889    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15890       test -f $with_override_source_root/corba/make/Makefile; then
15891        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
15892    fi
15893    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15894       test -f $with_override_source_root/jaxp/make/Makefile; then
15895        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
15896    fi
15897    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15898       test -f $with_override_source_root/jaxws/make/Makefile; then
15899        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
15900    fi
15901    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15902       test -f $with_override_source_root/hotspot/make/Makefile; then
15903        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
15904    fi
15905    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15906       test -f $with_override_source_root/jdk/make/Makefile; then
15907        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
15908    fi
15909fi
15910
15911
15912###############################################################################
15913#
15914# Override a repo completely, this is used for example when you have 3 small
15915# development sandboxes of the langtools sources and want to avoid having 3 full
15916# OpenJDK sources checked out on disk.
15917#
15918# Assuming that the 3 langtools sandboxes are located here:
15919# /home/fredrik/sandbox1/langtools
15920# /home/fredrik/sandbox2/langtools
15921# /home/fredrik/sandbox3/langtools
15922#
15923# From the source root you create build subdirs manually:
15924#     mkdir -p build1 build2 build3
15925# in each build directory run:
15926#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15927#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15928#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15929#
15930
15931
15932# Check whether --with-override-langtools was given.
15933if test "${with_override_langtools+set}" = set; then :
15934  withval=$with_override_langtools;
15935fi
15936
15937
15938
15939# Check whether --with-override-corba was given.
15940if test "${with_override_corba+set}" = set; then :
15941  withval=$with_override_corba;
15942fi
15943
15944
15945
15946# Check whether --with-override-jaxp was given.
15947if test "${with_override_jaxp+set}" = set; then :
15948  withval=$with_override_jaxp;
15949fi
15950
15951
15952
15953# Check whether --with-override-jaxws was given.
15954if test "${with_override_jaxws+set}" = set; then :
15955  withval=$with_override_jaxws;
15956fi
15957
15958
15959
15960# Check whether --with-override-hotspot was given.
15961if test "${with_override_hotspot+set}" = set; then :
15962  withval=$with_override_hotspot;
15963fi
15964
15965
15966
15967# Check whether --with-override-jdk was given.
15968if test "${with_override_jdk+set}" = set; then :
15969  withval=$with_override_jdk;
15970fi
15971
15972
15973if test "x$with_override_langtools" != x; then
15974    CURDIR="$PWD"
15975    cd "$with_override_langtools"
15976    LANGTOOLS_TOPDIR="`pwd`"
15977    cd "$CURDIR"
15978    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15979        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15980    fi
15981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15982$as_echo_n "checking if langtools should be overridden... " >&6; }
15983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15984$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15985fi
15986if test "x$with_override_corba" != x; then
15987    CURDIR="$PWD"
15988    cd "$with_override_corba"
15989    CORBA_TOPDIR="`pwd`"
15990    cd "$CURDIR"
15991    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15992        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15993    fi
15994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15995$as_echo_n "checking if corba should be overridden... " >&6; }
15996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15997$as_echo "yes with $CORBA_TOPDIR" >&6; }
15998fi
15999if test "x$with_override_jaxp" != x; then
16000    CURDIR="$PWD"
16001    cd "$with_override_jaxp"
16002    JAXP_TOPDIR="`pwd`"
16003    cd "$CURDIR"
16004    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16005        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16006    fi
16007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16008$as_echo_n "checking if jaxp should be overridden... " >&6; }
16009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16010$as_echo "yes with $JAXP_TOPDIR" >&6; }
16011fi
16012if test "x$with_override_jaxws" != x; then
16013    CURDIR="$PWD"
16014    cd "$with_override_jaxws"
16015    JAXWS_TOPDIR="`pwd`"
16016    cd "$CURDIR"
16017    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16018        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16019    fi
16020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16021$as_echo_n "checking if jaxws should be overridden... " >&6; }
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16023$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16024fi
16025if test "x$with_override_hotspot" != x; then
16026    CURDIR="$PWD"
16027    cd "$with_override_hotspot"
16028    HOTSPOT_TOPDIR="`pwd`"
16029    cd "$CURDIR"
16030    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16031       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16032        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16033    fi
16034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16035$as_echo_n "checking if hotspot should be overridden... " >&6; }
16036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16037$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16038fi
16039if test "x$with_override_nashorn" != x; then
16040    CURDIR="$PWD"
16041    cd "$with_override_nashorn"
16042    NASHORN_TOPDIR="`pwd`"
16043    cd "$CURDIR"
16044    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16045        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16046    fi
16047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16048$as_echo_n "checking if nashorn should be overridden... " >&6; }
16049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16050$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16051fi
16052if test "x$with_override_jdk" != x; then
16053    CURDIR="$PWD"
16054    cd "$with_override_jdk"
16055    JDK_TOPDIR="`pwd`"
16056    cd "$CURDIR"
16057    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16058        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16059    fi
16060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16061$as_echo_n "checking if JDK should be overridden... " >&6; }
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16063$as_echo "yes with $JDK_TOPDIR" >&6; }
16064fi
16065
16066
16067
16068BUILD_OUTPUT="$OUTPUT_ROOT"
16069
16070
16071HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16072BUILD_HOTSPOT=true
16073
16074
16075
16076# Check whether --with-import-hotspot was given.
16077if test "${with_import_hotspot+set}" = set; then :
16078  withval=$with_import_hotspot;
16079fi
16080
16081if test "x$with_import_hotspot" != x; then
16082    CURDIR="$PWD"
16083    cd "$with_import_hotspot"
16084    HOTSPOT_DIST="`pwd`"
16085    cd "$CURDIR"
16086    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16087        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16088    fi
16089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16090$as_echo_n "checking if hotspot should be imported... " >&6; }
16091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16092$as_echo "yes from $HOTSPOT_DIST" >&6; }
16093    BUILD_HOTSPOT=false
16094fi
16095
16096JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16097
16098
16099###############################################################################
16100#
16101# Setup the toolchain (compilers etc), i.e. the tools that need to be
16102# cross-compilation aware.
16103#
16104###############################################################################
16105
16106
16107###############################################################################
16108#
16109# Configure the development tool paths and potential sysroot.
16110#
16111ac_ext=cpp
16112ac_cpp='$CXXCPP $CPPFLAGS'
16113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16116
16117
16118# The option used to specify the target .o,.a or .so file.
16119# When compiling, how to specify the to be created object file.
16120CC_OUT_OPTION='-o$(SPACE)'
16121# When linking, how to specify the to be created executable.
16122EXE_OUT_OPTION='-o$(SPACE)'
16123# When linking, how to specify the to be created dynamically linkable library.
16124LD_OUT_OPTION='-o$(SPACE)'
16125# When archiving, how to specify the to be create static archive for object files.
16126AR_OUT_OPTION='rcs$(SPACE)'
16127
16128
16129
16130
16131
16132# Locate the actual tools
16133
16134if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16135
16136  # Store path to cygwin link.exe to help excluding it when searching for
16137  # VS linker. This must be done before changing the PATH when looking for VS.
16138  # Extract the first word of "link", so it can be a program name with args.
16139set dummy link; ac_word=$2
16140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16141$as_echo_n "checking for $ac_word... " >&6; }
16142if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16143  $as_echo_n "(cached) " >&6
16144else
16145  case $CYGWIN_LINK in
16146  [\\/]* | ?:[\\/]*)
16147  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16148  ;;
16149  *)
16150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16151for as_dir in $PATH
16152do
16153  IFS=$as_save_IFS
16154  test -z "$as_dir" && as_dir=.
16155    for ac_exec_ext in '' $ac_executable_extensions; do
16156  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16157    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16159    break 2
16160  fi
16161done
16162  done
16163IFS=$as_save_IFS
16164
16165  ;;
16166esac
16167fi
16168CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16169if test -n "$CYGWIN_LINK"; then
16170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16171$as_echo "$CYGWIN_LINK" >&6; }
16172else
16173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16174$as_echo "no" >&6; }
16175fi
16176
16177
16178  if test "x$CYGWIN_LINK" != x; then
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16180$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16181    "$CYGWIN_LINK" --version > /dev/null
16182    if test $? -eq 0 ; then
16183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16184$as_echo "yes" >&6; }
16185    else
16186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16187$as_echo "no" >&6; }
16188      # This might be the VS linker. Don't exclude it later on.
16189      CYGWIN_LINK=""
16190    fi
16191  fi
16192
16193  # First-hand choice is to locate and run the vsvars bat file.
16194
16195  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16196    VCVARSFILE="vc/bin/vcvars32.bat"
16197  else
16198    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16199  fi
16200
16201  VS_ENV_CMD=""
16202  VS_ENV_ARGS=""
16203  if test "x$with_toolsdir" != x; then
16204
16205  if test "x$VS_ENV_CMD" = x; then
16206    VS100BASE="$with_toolsdir/../.."
16207    METHOD="--with-tools-dir"
16208
16209  windows_path="$VS100BASE"
16210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16211    unix_path=`$CYGPATH -u "$windows_path"`
16212    VS100BASE="$unix_path"
16213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16215    VS100BASE="$unix_path"
16216  fi
16217
16218    if test -d "$VS100BASE"; then
16219      if test -f "$VS100BASE/$VCVARSFILE"; then
16220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16221$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16222        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16223      else
16224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16225$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16226        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16227$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16228      fi
16229    fi
16230  fi
16231
16232  fi
16233
16234  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16235    # Having specified an argument which is incorrect will produce an instant failure;
16236    # we should not go on looking
16237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16238$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16239    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16240$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16241    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16242  fi
16243
16244  if test "x$ProgramW6432" != x; then
16245
16246  if test "x$VS_ENV_CMD" = x; then
16247    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16248    METHOD="well-known name"
16249
16250  windows_path="$WIN_SDK_BASE"
16251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16252    unix_path=`$CYGPATH -u "$windows_path"`
16253    WIN_SDK_BASE="$unix_path"
16254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16256    WIN_SDK_BASE="$unix_path"
16257  fi
16258
16259    if test -d "$WIN_SDK_BASE"; then
16260      # There have been cases of partial or broken SDK installations. A missing
16261      # lib dir is not going to work.
16262      if test ! -d "$WIN_SDK_BASE/../lib"; then
16263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16265        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16266$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16267      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16268        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16269$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16270        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16271        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16272          VS_ENV_ARGS="/x86"
16273        else
16274          VS_ENV_ARGS="/x64"
16275        fi
16276      else
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16280$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16281      fi
16282    fi
16283  fi
16284
16285  fi
16286  if test "x$PROGRAMW6432" != x; then
16287
16288  if test "x$VS_ENV_CMD" = x; then
16289    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16290    METHOD="well-known name"
16291
16292  windows_path="$WIN_SDK_BASE"
16293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16294    unix_path=`$CYGPATH -u "$windows_path"`
16295    WIN_SDK_BASE="$unix_path"
16296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16298    WIN_SDK_BASE="$unix_path"
16299  fi
16300
16301    if test -d "$WIN_SDK_BASE"; then
16302      # There have been cases of partial or broken SDK installations. A missing
16303      # lib dir is not going to work.
16304      if test ! -d "$WIN_SDK_BASE/../lib"; then
16305        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16306$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16307        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16308$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16309      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16310        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16311$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16312        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16313        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16314          VS_ENV_ARGS="/x86"
16315        else
16316          VS_ENV_ARGS="/x64"
16317        fi
16318      else
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16320$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16322$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16323      fi
16324    fi
16325  fi
16326
16327  fi
16328  if test "x$PROGRAMFILES" != x; then
16329
16330  if test "x$VS_ENV_CMD" = x; then
16331    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16332    METHOD="well-known name"
16333
16334  windows_path="$WIN_SDK_BASE"
16335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16336    unix_path=`$CYGPATH -u "$windows_path"`
16337    WIN_SDK_BASE="$unix_path"
16338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16340    WIN_SDK_BASE="$unix_path"
16341  fi
16342
16343    if test -d "$WIN_SDK_BASE"; then
16344      # There have been cases of partial or broken SDK installations. A missing
16345      # lib dir is not going to work.
16346      if test ! -d "$WIN_SDK_BASE/../lib"; then
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16348$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16349        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16350$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16351      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16353$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16354        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16355        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16356          VS_ENV_ARGS="/x86"
16357        else
16358          VS_ENV_ARGS="/x64"
16359        fi
16360      else
16361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16362$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16364$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16365      fi
16366    fi
16367  fi
16368
16369  fi
16370
16371  if test "x$VS_ENV_CMD" = x; then
16372    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16373    METHOD="well-known name"
16374
16375  windows_path="$WIN_SDK_BASE"
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    unix_path=`$CYGPATH -u "$windows_path"`
16378    WIN_SDK_BASE="$unix_path"
16379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16381    WIN_SDK_BASE="$unix_path"
16382  fi
16383
16384    if test -d "$WIN_SDK_BASE"; then
16385      # There have been cases of partial or broken SDK installations. A missing
16386      # lib dir is not going to work.
16387      if test ! -d "$WIN_SDK_BASE/../lib"; then
16388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16389$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16390        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16391$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16392      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16394$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16395        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16396        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16397          VS_ENV_ARGS="/x86"
16398        else
16399          VS_ENV_ARGS="/x64"
16400        fi
16401      else
16402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16403$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16405$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16406      fi
16407    fi
16408  fi
16409
16410
16411  if test "x$VS_ENV_CMD" = x; then
16412    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16413    METHOD="well-known name"
16414
16415  windows_path="$WIN_SDK_BASE"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    WIN_SDK_BASE="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    WIN_SDK_BASE="$unix_path"
16422  fi
16423
16424    if test -d "$WIN_SDK_BASE"; then
16425      # There have been cases of partial or broken SDK installations. A missing
16426      # lib dir is not going to work.
16427      if test ! -d "$WIN_SDK_BASE/../lib"; then
16428        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16429$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16430        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16431$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16432      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16434$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16435        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16436        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16437          VS_ENV_ARGS="/x86"
16438        else
16439          VS_ENV_ARGS="/x64"
16440        fi
16441      else
16442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16443$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16444        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16445$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16446      fi
16447    fi
16448  fi
16449
16450
16451  if test "x$VS100COMNTOOLS" != x; then
16452
16453  if test "x$VS_ENV_CMD" = x; then
16454    VS100BASE="$VS100COMNTOOLS/../.."
16455    METHOD="VS100COMNTOOLS variable"
16456
16457  windows_path="$VS100BASE"
16458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16459    unix_path=`$CYGPATH -u "$windows_path"`
16460    VS100BASE="$unix_path"
16461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16463    VS100BASE="$unix_path"
16464  fi
16465
16466    if test -d "$VS100BASE"; then
16467      if test -f "$VS100BASE/$VCVARSFILE"; then
16468        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16469$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16470        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16471      else
16472        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16473$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16474        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16475$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16476      fi
16477    fi
16478  fi
16479
16480  fi
16481  if test "x$PROGRAMFILES" != x; then
16482
16483  if test "x$VS_ENV_CMD" = x; then
16484    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16485    METHOD="well-known name"
16486
16487  windows_path="$VS100BASE"
16488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16489    unix_path=`$CYGPATH -u "$windows_path"`
16490    VS100BASE="$unix_path"
16491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16493    VS100BASE="$unix_path"
16494  fi
16495
16496    if test -d "$VS100BASE"; then
16497      if test -f "$VS100BASE/$VCVARSFILE"; then
16498        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16499$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16500        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16501      else
16502        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16503$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16504        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16505$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16506      fi
16507    fi
16508  fi
16509
16510  fi
16511
16512  if test "x$VS_ENV_CMD" = x; then
16513    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16514    METHOD="well-known name"
16515
16516  windows_path="$VS100BASE"
16517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16518    unix_path=`$CYGPATH -u "$windows_path"`
16519    VS100BASE="$unix_path"
16520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16522    VS100BASE="$unix_path"
16523  fi
16524
16525    if test -d "$VS100BASE"; then
16526      if test -f "$VS100BASE/$VCVARSFILE"; then
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16528$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16529        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16530      else
16531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16532$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16533        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16534$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16535      fi
16536    fi
16537  fi
16538
16539
16540  if test "x$VS_ENV_CMD" = x; then
16541    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16542    METHOD="well-known name"
16543
16544  windows_path="$VS100BASE"
16545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16546    unix_path=`$CYGPATH -u "$windows_path"`
16547    VS100BASE="$unix_path"
16548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16550    VS100BASE="$unix_path"
16551  fi
16552
16553    if test -d "$VS100BASE"; then
16554      if test -f "$VS100BASE/$VCVARSFILE"; then
16555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16556$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16557        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16558      else
16559        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16560$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16561        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16562$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16563      fi
16564    fi
16565  fi
16566
16567
16568  if test "x$VS_ENV_CMD" != x; then
16569    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16570
16571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572
16573  # First separate the path from the arguments. This will split at the first
16574  # space.
16575  complete="$VS_ENV_CMD"
16576  path="${complete%% *}"
16577  tmp="$complete EOL"
16578  arguments="${tmp#* }"
16579
16580  # Input might be given as Windows format, start by converting to
16581  # unix format.
16582  new_path=`$CYGPATH -u "$path"`
16583
16584  # Now try to locate executable using which
16585  new_path=`$WHICH "$new_path" 2> /dev/null`
16586  # bat and cmd files are not always considered executable in cygwin causing which
16587  # to not find them
16588  if test "x$new_path" = x \
16589           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16590           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16591    new_path=`$CYGPATH -u "$path"`
16592  fi
16593  if test "x$new_path" = x; then
16594    # Oops. Which didn't find the executable.
16595    # The splitting of arguments from the executable at a space might have been incorrect,
16596    # since paths with space are more likely in Windows. Give it another try with the whole
16597    # argument.
16598    path="$complete"
16599    arguments="EOL"
16600    new_path=`$CYGPATH -u "$path"`
16601    new_path=`$WHICH "$new_path" 2> /dev/null`
16602    # bat and cmd files are not always considered executable in cygwin causing which
16603    # to not find them
16604    if test "x$new_path" = x \
16605             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16606             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16607      new_path=`$CYGPATH -u "$path"`
16608    fi
16609    if test "x$new_path" = x; then
16610      # It's still not found. Now this is an unrecoverable error.
16611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16612$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16613      has_space=`$ECHO "$complete" | $GREP " "`
16614      if test "x$has_space" != x; then
16615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16617      fi
16618      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16619    fi
16620  fi
16621
16622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16625  # "foo.exe" is OK but "foo" is an error.
16626  #
16627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16628  # It is also a way to make sure we got the proper file name for the real test later on.
16629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16630  if test "x$test_shortpath" = x; then
16631    # Short path failed, file does not exist as specified.
16632    # Try adding .exe or .cmd
16633    if test -f "${new_path}.exe"; then
16634       input_to_shortpath="${new_path}.exe"
16635    elif test -f "${new_path}.cmd"; then
16636       input_to_shortpath="${new_path}.cmd"
16637    else
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16639$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16642      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16643    fi
16644  else
16645    input_to_shortpath="$new_path"
16646  fi
16647
16648  # Call helper function which possibly converts this using DOS-style short mode.
16649  # If so, the updated path is stored in $new_path.
16650  new_path="$input_to_shortpath"
16651
16652  input_path="$input_to_shortpath"
16653  # Check if we need to convert this using DOS-style short mode. If the path
16654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16655  # take no chances and rewrite it.
16656  # Note: m4 eats our [], so we need to use [ and ] instead.
16657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16658  if test "x$has_forbidden_chars" != x; then
16659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16663      # Going to short mode and back again did indeed matter. Since short mode is
16664      # case insensitive, let's make it lowercase to improve readability.
16665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16666      # Now convert it back to Unix-stile (cygpath)
16667      input_path=`$CYGPATH -u "$shortmode_path"`
16668      new_path="$input_path"
16669    fi
16670  fi
16671
16672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16673  if test "x$test_cygdrive_prefix" = x; then
16674    # As a simple fix, exclude /usr/bin since it's not a real path.
16675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16677      # a path prefixed by /cygdrive for fixpath to work.
16678      new_path="$CYGWIN_ROOT_PATH$input_path"
16679    fi
16680  fi
16681
16682  # remove trailing .exe if any
16683  new_path="${new_path/%.exe/}"
16684
16685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16686
16687  # First separate the path from the arguments. This will split at the first
16688  # space.
16689  complete="$VS_ENV_CMD"
16690  path="${complete%% *}"
16691  tmp="$complete EOL"
16692  arguments="${tmp#* }"
16693
16694  # Input might be given as Windows format, start by converting to
16695  # unix format.
16696  new_path="$path"
16697
16698  windows_path="$new_path"
16699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16700    unix_path=`$CYGPATH -u "$windows_path"`
16701    new_path="$unix_path"
16702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16704    new_path="$unix_path"
16705  fi
16706
16707
16708  # Now try to locate executable using which
16709  new_path=`$WHICH "$new_path" 2> /dev/null`
16710
16711  if test "x$new_path" = x; then
16712    # Oops. Which didn't find the executable.
16713    # The splitting of arguments from the executable at a space might have been incorrect,
16714    # since paths with space are more likely in Windows. Give it another try with the whole
16715    # argument.
16716    path="$complete"
16717    arguments="EOL"
16718    new_path="$path"
16719
16720  windows_path="$new_path"
16721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16722    unix_path=`$CYGPATH -u "$windows_path"`
16723    new_path="$unix_path"
16724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16726    new_path="$unix_path"
16727  fi
16728
16729
16730    new_path=`$WHICH "$new_path" 2> /dev/null`
16731
16732    if test "x$new_path" = x; then
16733      # It's still not found. Now this is an unrecoverable error.
16734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16735$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16736      has_space=`$ECHO "$complete" | $GREP " "`
16737      if test "x$has_space" != x; then
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16740      fi
16741      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16742    fi
16743  fi
16744
16745  # Now new_path has a complete unix path to the binary
16746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16747    # Keep paths in /bin as-is, but remove trailing .exe if any
16748    new_path="${new_path/%.exe/}"
16749    # Do not save /bin paths to all_fixpath_prefixes!
16750  else
16751    # Not in mixed or Windows style, start by that.
16752    new_path=`cmd //c echo $new_path`
16753
16754  input_path="$new_path"
16755  # Check if we need to convert this using DOS-style short mode. If the path
16756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16757  # take no chances and rewrite it.
16758  # Note: m4 eats our [], so we need to use [ and ] instead.
16759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16760  if test "x$has_forbidden_chars" != x; then
16761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16763  fi
16764
16765    # Output is in $new_path
16766
16767  windows_path="$new_path"
16768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16769    unix_path=`$CYGPATH -u "$windows_path"`
16770    new_path="$unix_path"
16771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16773    new_path="$unix_path"
16774  fi
16775
16776    # remove trailing .exe if any
16777    new_path="${new_path/%.exe/}"
16778
16779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16781  fi
16782
16783  else
16784    # We're on a posix platform. Hooray! :)
16785    # First separate the path from the arguments. This will split at the first
16786    # space.
16787    complete="$VS_ENV_CMD"
16788    path="${complete%% *}"
16789    tmp="$complete EOL"
16790    arguments="${tmp#* }"
16791
16792    # Cannot rely on the command "which" here since it doesn't always work.
16793    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16794    if test -z "$is_absolute_path"; then
16795      # Path to executable is not absolute. Find it.
16796      IFS_save="$IFS"
16797      IFS=:
16798      for p in $PATH; do
16799        if test -f "$p/$path" && test -x "$p/$path"; then
16800          new_path="$p/$path"
16801          break
16802        fi
16803      done
16804      IFS="$IFS_save"
16805    else
16806      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16807$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16808      new_path="$path"
16809    fi
16810
16811    if test "x$new_path" = x; then
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16813$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16814        has_space=`$ECHO "$complete" | $GREP " "`
16815        if test "x$has_space" != x; then
16816          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16818        fi
16819        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16820      fi
16821  fi
16822
16823      # Now join together the path and the arguments once again
16824      if test "x$arguments" != xEOL; then
16825        new_complete="$new_path ${arguments% *}"
16826      else
16827        new_complete="$new_path"
16828      fi
16829
16830  if test "x$complete" != "x$new_complete"; then
16831      VS_ENV_CMD="$new_complete"
16832      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16833$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16834    fi
16835
16836
16837    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16839$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16840    cd $OUTPUT_ROOT
16841    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16842    # to autoconf standards.
16843
16844    #----
16845
16846    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16847    # but calculate the difference in Cygwin environment before/after running it and then
16848    # apply the diff.
16849
16850    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16851      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16852      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16853      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16854    else
16855      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16856      _dosbash=`cmd //c echo \`which bash\``
16857    fi
16858
16859    # generate the set of exported vars before/after the vs10 setup
16860    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16861    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16862    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16863    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16864
16865    # Now execute the newly created bat file.
16866    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16867    cmd /c localdevenvtmp.bat | cat
16868
16869    # apply the diff (less some non-vs10 vars named by "!")
16870    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16871    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16872    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16873
16874    # cleanup
16875    $RM localdevenvtmp*
16876    #----
16877    cd $CURDIR
16878    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16880$as_echo "no" >&6; }
16881      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16882$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16883      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16884$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16885      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16886$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16887      as_fn_error $? "Cannot continue" "$LINENO" 5
16888    fi
16889
16890    # Now set all paths and other env variables. This will allow the rest of
16891    # the configure script to find and run the compiler in the proper way.
16892    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16893$as_echo "$as_me: Setting extracted environment variables" >&6;}
16894    . $OUTPUT_ROOT/localdevenv.sh
16895  else
16896    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16897    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16898$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16899  fi
16900
16901  # At this point, we should have corrent variables in the environment, or we can't continue.
16902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16903$as_echo_n "checking for Visual Studio variables... " >&6; }
16904
16905  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16906    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16908$as_echo "present but broken" >&6; }
16909      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16910    else
16911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16912$as_echo "ok" >&6; }
16913      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16914      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16915      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16916      VS_PATH="$PATH"
16917
16918
16919
16920    fi
16921  else
16922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16923$as_echo "not found" >&6; }
16924
16925    if test "x$VS_ENV_CMD" = x; then
16926      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16927$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16928      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16929$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16930    else
16931      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16932$as_echo "$as_me: Running the extraction script failed." >&6;}
16933    fi
16934    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16935$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16936    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16937$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16938    as_fn_error $? "Cannot continue" "$LINENO" 5
16939  fi
16940
16941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16942$as_echo_n "checking for msvcr100.dll... " >&6; }
16943
16944# Check whether --with-msvcr-dll was given.
16945if test "${with_msvcr_dll+set}" = set; then :
16946  withval=$with_msvcr_dll;
16947fi
16948
16949  if test "x$with_msvcr_dll" != x; then
16950    MSVCR_DLL="$with_msvcr_dll"
16951  else
16952    if test "x$VCINSTALLDIR" != x; then
16953      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16954        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16955      else
16956        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16957        if test "x$MSVCR_DLL" = x; then
16958          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16959        fi
16960      fi
16961      if test "x$MSVCR_DLL" != x; then
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16963$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16964      else
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16966$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16967      fi
16968    fi
16969    if test "x$MSVCR_DLL" = x; then
16970      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16972$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16973        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16974      fi
16975    fi
16976  fi
16977  if test "x$MSVCR_DLL" = x; then
16978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16979$as_echo "no" >&6; }
16980    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16981  fi
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16983$as_echo "$MSVCR_DLL" >&6; }
16984
16985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16986
16987  # Input might be given as Windows format, start by converting to
16988  # unix format.
16989  path="$MSVCR_DLL"
16990  new_path=`$CYGPATH -u "$path"`
16991
16992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16995  # "foo.exe" is OK but "foo" is an error.
16996  #
16997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16998  # It is also a way to make sure we got the proper file name for the real test later on.
16999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17000  if test "x$test_shortpath" = x; then
17001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17002$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17003    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17004  fi
17005
17006  # Call helper function which possibly converts this using DOS-style short mode.
17007  # If so, the updated path is stored in $new_path.
17008
17009  input_path="$new_path"
17010  # Check if we need to convert this using DOS-style short mode. If the path
17011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17012  # take no chances and rewrite it.
17013  # Note: m4 eats our [], so we need to use [ and ] instead.
17014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17015  if test "x$has_forbidden_chars" != x; then
17016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17020      # Going to short mode and back again did indeed matter. Since short mode is
17021      # case insensitive, let's make it lowercase to improve readability.
17022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17023      # Now convert it back to Unix-stile (cygpath)
17024      input_path=`$CYGPATH -u "$shortmode_path"`
17025      new_path="$input_path"
17026    fi
17027  fi
17028
17029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17030  if test "x$test_cygdrive_prefix" = x; then
17031    # As a simple fix, exclude /usr/bin since it's not a real path.
17032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17034      # a path prefixed by /cygdrive for fixpath to work.
17035      new_path="$CYGWIN_ROOT_PATH$input_path"
17036    fi
17037  fi
17038
17039
17040  if test "x$path" != "x$new_path"; then
17041    MSVCR_DLL="$new_path"
17042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17043$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17044  fi
17045
17046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17047
17048  path="$MSVCR_DLL"
17049  has_colon=`$ECHO $path | $GREP ^.:`
17050  new_path="$path"
17051  if test "x$has_colon" = x; then
17052    # Not in mixed or Windows style, start by that.
17053    new_path=`cmd //c echo $path`
17054  fi
17055
17056
17057  input_path="$new_path"
17058  # Check if we need to convert this using DOS-style short mode. If the path
17059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17060  # take no chances and rewrite it.
17061  # Note: m4 eats our [], so we need to use [ and ] instead.
17062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17063  if test "x$has_forbidden_chars" != x; then
17064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17066  fi
17067
17068
17069  windows_path="$new_path"
17070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17071    unix_path=`$CYGPATH -u "$windows_path"`
17072    new_path="$unix_path"
17073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17075    new_path="$unix_path"
17076  fi
17077
17078  if test "x$path" != "x$new_path"; then
17079    MSVCR_DLL="$new_path"
17080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17081$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17082  fi
17083
17084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17086
17087  else
17088    # We're on a posix platform. Hooray! :)
17089    path="$MSVCR_DLL"
17090
17091    if test ! -f "$path" && test ! -d "$path"; then
17092      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17093    fi
17094
17095    has_space=`$ECHO "$path" | $GREP " "`
17096    if test "x$has_space" != x; then
17097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17098$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17100    fi
17101  fi
17102
17103
17104
17105
17106# Check whether --with-dxsdk was given.
17107if test "${with_dxsdk+set}" = set; then :
17108  withval=$with_dxsdk;
17109fi
17110
17111
17112# Check whether --with-dxsdk-lib was given.
17113if test "${with_dxsdk_lib+set}" = set; then :
17114  withval=$with_dxsdk_lib;
17115fi
17116
17117
17118# Check whether --with-dxsdk-include was given.
17119if test "${with_dxsdk_include+set}" = set; then :
17120  withval=$with_dxsdk_include;
17121fi
17122
17123
17124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17125$as_echo_n "checking for DirectX SDK... " >&6; }
17126
17127  if test "x$with_dxsdk" != x; then
17128    dxsdk_path="$with_dxsdk"
17129  elif test "x$DXSDK_DIR" != x; then
17130    dxsdk_path="$DXSDK_DIR"
17131  elif test -d "C:/DXSDK"; then
17132    dxsdk_path="C:/DXSDK"
17133  else
17134    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17135  fi
17136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17137$as_echo "$dxsdk_path" >&6; }
17138
17139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17140
17141  # Input might be given as Windows format, start by converting to
17142  # unix format.
17143  path="$dxsdk_path"
17144  new_path=`$CYGPATH -u "$path"`
17145
17146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17149  # "foo.exe" is OK but "foo" is an error.
17150  #
17151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17152  # It is also a way to make sure we got the proper file name for the real test later on.
17153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17154  if test "x$test_shortpath" = x; then
17155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17156$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17157    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17158  fi
17159
17160  # Call helper function which possibly converts this using DOS-style short mode.
17161  # If so, the updated path is stored in $new_path.
17162
17163  input_path="$new_path"
17164  # Check if we need to convert this using DOS-style short mode. If the path
17165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17166  # take no chances and rewrite it.
17167  # Note: m4 eats our [], so we need to use [ and ] instead.
17168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17169  if test "x$has_forbidden_chars" != x; then
17170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17174      # Going to short mode and back again did indeed matter. Since short mode is
17175      # case insensitive, let's make it lowercase to improve readability.
17176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17177      # Now convert it back to Unix-stile (cygpath)
17178      input_path=`$CYGPATH -u "$shortmode_path"`
17179      new_path="$input_path"
17180    fi
17181  fi
17182
17183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17184  if test "x$test_cygdrive_prefix" = x; then
17185    # As a simple fix, exclude /usr/bin since it's not a real path.
17186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17188      # a path prefixed by /cygdrive for fixpath to work.
17189      new_path="$CYGWIN_ROOT_PATH$input_path"
17190    fi
17191  fi
17192
17193
17194  if test "x$path" != "x$new_path"; then
17195    dxsdk_path="$new_path"
17196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17197$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17198  fi
17199
17200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17201
17202  path="$dxsdk_path"
17203  has_colon=`$ECHO $path | $GREP ^.:`
17204  new_path="$path"
17205  if test "x$has_colon" = x; then
17206    # Not in mixed or Windows style, start by that.
17207    new_path=`cmd //c echo $path`
17208  fi
17209
17210
17211  input_path="$new_path"
17212  # Check if we need to convert this using DOS-style short mode. If the path
17213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17214  # take no chances and rewrite it.
17215  # Note: m4 eats our [], so we need to use [ and ] instead.
17216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17217  if test "x$has_forbidden_chars" != x; then
17218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17220  fi
17221
17222
17223  windows_path="$new_path"
17224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17225    unix_path=`$CYGPATH -u "$windows_path"`
17226    new_path="$unix_path"
17227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17229    new_path="$unix_path"
17230  fi
17231
17232  if test "x$path" != "x$new_path"; then
17233    dxsdk_path="$new_path"
17234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17235$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17236  fi
17237
17238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17240
17241  else
17242    # We're on a posix platform. Hooray! :)
17243    path="$dxsdk_path"
17244
17245    if test ! -f "$path" && test ! -d "$path"; then
17246      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17247    fi
17248
17249    has_space=`$ECHO "$path" | $GREP " "`
17250    if test "x$has_space" != x; then
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17252$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17254    fi
17255  fi
17256
17257
17258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17259$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17260  if test "x$with_dxsdk_lib" != x; then
17261    DXSDK_LIB_PATH="$with_dxsdk_lib"
17262  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17263    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17264  else
17265    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17266  fi
17267  # dsound.lib is linked to in jsoundds
17268  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17269    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17270  fi
17271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17272$as_echo "$DXSDK_LIB_PATH" >&6; }
17273
17274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17275
17276  # Input might be given as Windows format, start by converting to
17277  # unix format.
17278  path="$DXSDK_LIB_PATH"
17279  new_path=`$CYGPATH -u "$path"`
17280
17281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17284  # "foo.exe" is OK but "foo" is an error.
17285  #
17286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17287  # It is also a way to make sure we got the proper file name for the real test later on.
17288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17289  if test "x$test_shortpath" = x; then
17290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17291$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17292    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17293  fi
17294
17295  # Call helper function which possibly converts this using DOS-style short mode.
17296  # If so, the updated path is stored in $new_path.
17297
17298  input_path="$new_path"
17299  # Check if we need to convert this using DOS-style short mode. If the path
17300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17301  # take no chances and rewrite it.
17302  # Note: m4 eats our [], so we need to use [ and ] instead.
17303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17304  if test "x$has_forbidden_chars" != x; then
17305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17309      # Going to short mode and back again did indeed matter. Since short mode is
17310      # case insensitive, let's make it lowercase to improve readability.
17311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17312      # Now convert it back to Unix-stile (cygpath)
17313      input_path=`$CYGPATH -u "$shortmode_path"`
17314      new_path="$input_path"
17315    fi
17316  fi
17317
17318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17319  if test "x$test_cygdrive_prefix" = x; then
17320    # As a simple fix, exclude /usr/bin since it's not a real path.
17321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17323      # a path prefixed by /cygdrive for fixpath to work.
17324      new_path="$CYGWIN_ROOT_PATH$input_path"
17325    fi
17326  fi
17327
17328
17329  if test "x$path" != "x$new_path"; then
17330    DXSDK_LIB_PATH="$new_path"
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17332$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17333  fi
17334
17335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17336
17337  path="$DXSDK_LIB_PATH"
17338  has_colon=`$ECHO $path | $GREP ^.:`
17339  new_path="$path"
17340  if test "x$has_colon" = x; then
17341    # Not in mixed or Windows style, start by that.
17342    new_path=`cmd //c echo $path`
17343  fi
17344
17345
17346  input_path="$new_path"
17347  # Check if we need to convert this using DOS-style short mode. If the path
17348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17349  # take no chances and rewrite it.
17350  # Note: m4 eats our [], so we need to use [ and ] instead.
17351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17352  if test "x$has_forbidden_chars" != x; then
17353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17355  fi
17356
17357
17358  windows_path="$new_path"
17359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17360    unix_path=`$CYGPATH -u "$windows_path"`
17361    new_path="$unix_path"
17362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17364    new_path="$unix_path"
17365  fi
17366
17367  if test "x$path" != "x$new_path"; then
17368    DXSDK_LIB_PATH="$new_path"
17369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17370$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17371  fi
17372
17373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17375
17376  else
17377    # We're on a posix platform. Hooray! :)
17378    path="$DXSDK_LIB_PATH"
17379
17380    if test ! -f "$path" && test ! -d "$path"; then
17381      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17382    fi
17383
17384    has_space=`$ECHO "$path" | $GREP " "`
17385    if test "x$has_space" != x; then
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17387$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17388      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17389    fi
17390  fi
17391
17392
17393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17394$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17395  if test "x$with_dxsdk_include" != x; then
17396    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17397  else
17398    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17399  fi
17400  # dsound.h is included in jsoundds
17401  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17402    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17403  fi
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17405$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17406
17407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408
17409  # Input might be given as Windows format, start by converting to
17410  # unix format.
17411  path="$DXSDK_INCLUDE_PATH"
17412  new_path=`$CYGPATH -u "$path"`
17413
17414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17417  # "foo.exe" is OK but "foo" is an error.
17418  #
17419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17420  # It is also a way to make sure we got the proper file name for the real test later on.
17421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17422  if test "x$test_shortpath" = x; then
17423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17424$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17425    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17426  fi
17427
17428  # Call helper function which possibly converts this using DOS-style short mode.
17429  # If so, the updated path is stored in $new_path.
17430
17431  input_path="$new_path"
17432  # Check if we need to convert this using DOS-style short mode. If the path
17433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17434  # take no chances and rewrite it.
17435  # Note: m4 eats our [], so we need to use [ and ] instead.
17436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17437  if test "x$has_forbidden_chars" != x; then
17438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17442      # Going to short mode and back again did indeed matter. Since short mode is
17443      # case insensitive, let's make it lowercase to improve readability.
17444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17445      # Now convert it back to Unix-stile (cygpath)
17446      input_path=`$CYGPATH -u "$shortmode_path"`
17447      new_path="$input_path"
17448    fi
17449  fi
17450
17451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17452  if test "x$test_cygdrive_prefix" = x; then
17453    # As a simple fix, exclude /usr/bin since it's not a real path.
17454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17456      # a path prefixed by /cygdrive for fixpath to work.
17457      new_path="$CYGWIN_ROOT_PATH$input_path"
17458    fi
17459  fi
17460
17461
17462  if test "x$path" != "x$new_path"; then
17463    DXSDK_INCLUDE_PATH="$new_path"
17464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17465$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17466  fi
17467
17468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17469
17470  path="$DXSDK_INCLUDE_PATH"
17471  has_colon=`$ECHO $path | $GREP ^.:`
17472  new_path="$path"
17473  if test "x$has_colon" = x; then
17474    # Not in mixed or Windows style, start by that.
17475    new_path=`cmd //c echo $path`
17476  fi
17477
17478
17479  input_path="$new_path"
17480  # Check if we need to convert this using DOS-style short mode. If the path
17481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17482  # take no chances and rewrite it.
17483  # Note: m4 eats our [], so we need to use [ and ] instead.
17484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17485  if test "x$has_forbidden_chars" != x; then
17486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17488  fi
17489
17490
17491  windows_path="$new_path"
17492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17493    unix_path=`$CYGPATH -u "$windows_path"`
17494    new_path="$unix_path"
17495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17497    new_path="$unix_path"
17498  fi
17499
17500  if test "x$path" != "x$new_path"; then
17501    DXSDK_INCLUDE_PATH="$new_path"
17502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17503$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17504  fi
17505
17506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17508
17509  else
17510    # We're on a posix platform. Hooray! :)
17511    path="$DXSDK_INCLUDE_PATH"
17512
17513    if test ! -f "$path" && test ! -d "$path"; then
17514      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17515    fi
17516
17517    has_space=`$ECHO "$path" | $GREP " "`
17518    if test "x$has_space" != x; then
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17520$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17521      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17522    fi
17523  fi
17524
17525
17526
17527
17528  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17529
17530fi
17531
17532
17533
17534# If --build AND --host is set, then the configure script will find any
17535# cross compilation tools in the PATH. Cross compilation tools
17536# follows the cross compilation standard where they are prefixed with ${host}.
17537# For example the binary i686-sun-solaris2.10-gcc
17538# will cross compile for i686-sun-solaris2.10
17539# If neither of build and host is not set, then build=host and the
17540# default compiler found in the path will be used.
17541# Setting only --host, does not seem to be really supported.
17542# Please set both --build and --host if you want to cross compile.
17543
17544if test "x$COMPILE_TYPE" = "xcross"; then
17545    # Now we to find a C/C++ compiler that can build executables for the build
17546    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17547    # once. Also, we need to do this before adding a tools dir to the path,
17548    # otherwise we might pick up cross-compilers which don't use standard naming.
17549    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17550    # to wait until they are properly discovered.
17551    for ac_prog in cl cc gcc
17552do
17553  # Extract the first word of "$ac_prog", so it can be a program name with args.
17554set dummy $ac_prog; ac_word=$2
17555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17556$as_echo_n "checking for $ac_word... " >&6; }
17557if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17558  $as_echo_n "(cached) " >&6
17559else
17560  case $BUILD_CC in
17561  [\\/]* | ?:[\\/]*)
17562  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17563  ;;
17564  *)
17565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17566for as_dir in $PATH
17567do
17568  IFS=$as_save_IFS
17569  test -z "$as_dir" && as_dir=.
17570    for ac_exec_ext in '' $ac_executable_extensions; do
17571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17572    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17574    break 2
17575  fi
17576done
17577  done
17578IFS=$as_save_IFS
17579
17580  ;;
17581esac
17582fi
17583BUILD_CC=$ac_cv_path_BUILD_CC
17584if test -n "$BUILD_CC"; then
17585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17586$as_echo "$BUILD_CC" >&6; }
17587else
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589$as_echo "no" >&6; }
17590fi
17591
17592
17593  test -n "$BUILD_CC" && break
17594done
17595
17596
17597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17598
17599  # First separate the path from the arguments. This will split at the first
17600  # space.
17601  complete="$BUILD_CC"
17602  path="${complete%% *}"
17603  tmp="$complete EOL"
17604  arguments="${tmp#* }"
17605
17606  # Input might be given as Windows format, start by converting to
17607  # unix format.
17608  new_path=`$CYGPATH -u "$path"`
17609
17610  # Now try to locate executable using which
17611  new_path=`$WHICH "$new_path" 2> /dev/null`
17612  # bat and cmd files are not always considered executable in cygwin causing which
17613  # to not find them
17614  if test "x$new_path" = x \
17615           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17616           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17617    new_path=`$CYGPATH -u "$path"`
17618  fi
17619  if test "x$new_path" = x; then
17620    # Oops. Which didn't find the executable.
17621    # The splitting of arguments from the executable at a space might have been incorrect,
17622    # since paths with space are more likely in Windows. Give it another try with the whole
17623    # argument.
17624    path="$complete"
17625    arguments="EOL"
17626    new_path=`$CYGPATH -u "$path"`
17627    new_path=`$WHICH "$new_path" 2> /dev/null`
17628    # bat and cmd files are not always considered executable in cygwin causing which
17629    # to not find them
17630    if test "x$new_path" = x \
17631             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17632             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17633      new_path=`$CYGPATH -u "$path"`
17634    fi
17635    if test "x$new_path" = x; then
17636      # It's still not found. Now this is an unrecoverable error.
17637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17638$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17639      has_space=`$ECHO "$complete" | $GREP " "`
17640      if test "x$has_space" != x; then
17641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17643      fi
17644      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17645    fi
17646  fi
17647
17648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17651  # "foo.exe" is OK but "foo" is an error.
17652  #
17653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17654  # It is also a way to make sure we got the proper file name for the real test later on.
17655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17656  if test "x$test_shortpath" = x; then
17657    # Short path failed, file does not exist as specified.
17658    # Try adding .exe or .cmd
17659    if test -f "${new_path}.exe"; then
17660       input_to_shortpath="${new_path}.exe"
17661    elif test -f "${new_path}.cmd"; then
17662       input_to_shortpath="${new_path}.cmd"
17663    else
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17665$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17667$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17668      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17669    fi
17670  else
17671    input_to_shortpath="$new_path"
17672  fi
17673
17674  # Call helper function which possibly converts this using DOS-style short mode.
17675  # If so, the updated path is stored in $new_path.
17676  new_path="$input_to_shortpath"
17677
17678  input_path="$input_to_shortpath"
17679  # Check if we need to convert this using DOS-style short mode. If the path
17680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17681  # take no chances and rewrite it.
17682  # Note: m4 eats our [], so we need to use [ and ] instead.
17683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17684  if test "x$has_forbidden_chars" != x; then
17685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17689      # Going to short mode and back again did indeed matter. Since short mode is
17690      # case insensitive, let's make it lowercase to improve readability.
17691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17692      # Now convert it back to Unix-stile (cygpath)
17693      input_path=`$CYGPATH -u "$shortmode_path"`
17694      new_path="$input_path"
17695    fi
17696  fi
17697
17698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17699  if test "x$test_cygdrive_prefix" = x; then
17700    # As a simple fix, exclude /usr/bin since it's not a real path.
17701    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17703      # a path prefixed by /cygdrive for fixpath to work.
17704      new_path="$CYGWIN_ROOT_PATH$input_path"
17705    fi
17706  fi
17707
17708  # remove trailing .exe if any
17709  new_path="${new_path/%.exe/}"
17710
17711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17712
17713  # First separate the path from the arguments. This will split at the first
17714  # space.
17715  complete="$BUILD_CC"
17716  path="${complete%% *}"
17717  tmp="$complete EOL"
17718  arguments="${tmp#* }"
17719
17720  # Input might be given as Windows format, start by converting to
17721  # unix format.
17722  new_path="$path"
17723
17724  windows_path="$new_path"
17725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17726    unix_path=`$CYGPATH -u "$windows_path"`
17727    new_path="$unix_path"
17728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17730    new_path="$unix_path"
17731  fi
17732
17733
17734  # Now try to locate executable using which
17735  new_path=`$WHICH "$new_path" 2> /dev/null`
17736
17737  if test "x$new_path" = x; then
17738    # Oops. Which didn't find the executable.
17739    # The splitting of arguments from the executable at a space might have been incorrect,
17740    # since paths with space are more likely in Windows. Give it another try with the whole
17741    # argument.
17742    path="$complete"
17743    arguments="EOL"
17744    new_path="$path"
17745
17746  windows_path="$new_path"
17747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17748    unix_path=`$CYGPATH -u "$windows_path"`
17749    new_path="$unix_path"
17750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17752    new_path="$unix_path"
17753  fi
17754
17755
17756    new_path=`$WHICH "$new_path" 2> /dev/null`
17757
17758    if test "x$new_path" = x; then
17759      # It's still not found. Now this is an unrecoverable error.
17760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17761$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17762      has_space=`$ECHO "$complete" | $GREP " "`
17763      if test "x$has_space" != x; then
17764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17766      fi
17767      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17768    fi
17769  fi
17770
17771  # Now new_path has a complete unix path to the binary
17772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17773    # Keep paths in /bin as-is, but remove trailing .exe if any
17774    new_path="${new_path/%.exe/}"
17775    # Do not save /bin paths to all_fixpath_prefixes!
17776  else
17777    # Not in mixed or Windows style, start by that.
17778    new_path=`cmd //c echo $new_path`
17779
17780  input_path="$new_path"
17781  # Check if we need to convert this using DOS-style short mode. If the path
17782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17783  # take no chances and rewrite it.
17784  # Note: m4 eats our [], so we need to use [ and ] instead.
17785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17786  if test "x$has_forbidden_chars" != x; then
17787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17789  fi
17790
17791    # Output is in $new_path
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802    # remove trailing .exe if any
17803    new_path="${new_path/%.exe/}"
17804
17805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17807  fi
17808
17809  else
17810    # We're on a posix platform. Hooray! :)
17811    # First separate the path from the arguments. This will split at the first
17812    # space.
17813    complete="$BUILD_CC"
17814    path="${complete%% *}"
17815    tmp="$complete EOL"
17816    arguments="${tmp#* }"
17817
17818    # Cannot rely on the command "which" here since it doesn't always work.
17819    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17820    if test -z "$is_absolute_path"; then
17821      # Path to executable is not absolute. Find it.
17822      IFS_save="$IFS"
17823      IFS=:
17824      for p in $PATH; do
17825        if test -f "$p/$path" && test -x "$p/$path"; then
17826          new_path="$p/$path"
17827          break
17828        fi
17829      done
17830      IFS="$IFS_save"
17831    else
17832      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17833$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17834      new_path="$path"
17835    fi
17836
17837    if test "x$new_path" = x; then
17838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17839$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17840        has_space=`$ECHO "$complete" | $GREP " "`
17841        if test "x$has_space" != x; then
17842          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17844        fi
17845        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17846      fi
17847  fi
17848
17849      # Now join together the path and the arguments once again
17850      if test "x$arguments" != xEOL; then
17851        new_complete="$new_path ${arguments% *}"
17852      else
17853        new_complete="$new_path"
17854      fi
17855
17856  if test "x$complete" != "x$new_complete"; then
17857      BUILD_CC="$new_complete"
17858      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17859$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17860    fi
17861
17862    for ac_prog in cl CC g++
17863do
17864  # Extract the first word of "$ac_prog", so it can be a program name with args.
17865set dummy $ac_prog; ac_word=$2
17866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17867$as_echo_n "checking for $ac_word... " >&6; }
17868if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17869  $as_echo_n "(cached) " >&6
17870else
17871  case $BUILD_CXX in
17872  [\\/]* | ?:[\\/]*)
17873  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17874  ;;
17875  *)
17876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17877for as_dir in $PATH
17878do
17879  IFS=$as_save_IFS
17880  test -z "$as_dir" && as_dir=.
17881    for ac_exec_ext in '' $ac_executable_extensions; do
17882  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17883    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17885    break 2
17886  fi
17887done
17888  done
17889IFS=$as_save_IFS
17890
17891  ;;
17892esac
17893fi
17894BUILD_CXX=$ac_cv_path_BUILD_CXX
17895if test -n "$BUILD_CXX"; then
17896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17897$as_echo "$BUILD_CXX" >&6; }
17898else
17899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17900$as_echo "no" >&6; }
17901fi
17902
17903
17904  test -n "$BUILD_CXX" && break
17905done
17906
17907
17908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17909
17910  # First separate the path from the arguments. This will split at the first
17911  # space.
17912  complete="$BUILD_CXX"
17913  path="${complete%% *}"
17914  tmp="$complete EOL"
17915  arguments="${tmp#* }"
17916
17917  # Input might be given as Windows format, start by converting to
17918  # unix format.
17919  new_path=`$CYGPATH -u "$path"`
17920
17921  # Now try to locate executable using which
17922  new_path=`$WHICH "$new_path" 2> /dev/null`
17923  # bat and cmd files are not always considered executable in cygwin causing which
17924  # to not find them
17925  if test "x$new_path" = x \
17926           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17927           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17928    new_path=`$CYGPATH -u "$path"`
17929  fi
17930  if test "x$new_path" = x; then
17931    # Oops. Which didn't find the executable.
17932    # The splitting of arguments from the executable at a space might have been incorrect,
17933    # since paths with space are more likely in Windows. Give it another try with the whole
17934    # argument.
17935    path="$complete"
17936    arguments="EOL"
17937    new_path=`$CYGPATH -u "$path"`
17938    new_path=`$WHICH "$new_path" 2> /dev/null`
17939    # bat and cmd files are not always considered executable in cygwin causing which
17940    # to not find them
17941    if test "x$new_path" = x \
17942             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17943             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17944      new_path=`$CYGPATH -u "$path"`
17945    fi
17946    if test "x$new_path" = x; then
17947      # It's still not found. Now this is an unrecoverable error.
17948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17949$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17950      has_space=`$ECHO "$complete" | $GREP " "`
17951      if test "x$has_space" != x; then
17952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17954      fi
17955      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17956    fi
17957  fi
17958
17959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17962  # "foo.exe" is OK but "foo" is an error.
17963  #
17964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17965  # It is also a way to make sure we got the proper file name for the real test later on.
17966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17967  if test "x$test_shortpath" = x; then
17968    # Short path failed, file does not exist as specified.
17969    # Try adding .exe or .cmd
17970    if test -f "${new_path}.exe"; then
17971       input_to_shortpath="${new_path}.exe"
17972    elif test -f "${new_path}.cmd"; then
17973       input_to_shortpath="${new_path}.cmd"
17974    else
17975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17976$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17979      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17980    fi
17981  else
17982    input_to_shortpath="$new_path"
17983  fi
17984
17985  # Call helper function which possibly converts this using DOS-style short mode.
17986  # If so, the updated path is stored in $new_path.
17987  new_path="$input_to_shortpath"
17988
17989  input_path="$input_to_shortpath"
17990  # Check if we need to convert this using DOS-style short mode. If the path
17991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17992  # take no chances and rewrite it.
17993  # Note: m4 eats our [], so we need to use [ and ] instead.
17994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17995  if test "x$has_forbidden_chars" != x; then
17996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18000      # Going to short mode and back again did indeed matter. Since short mode is
18001      # case insensitive, let's make it lowercase to improve readability.
18002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18003      # Now convert it back to Unix-stile (cygpath)
18004      input_path=`$CYGPATH -u "$shortmode_path"`
18005      new_path="$input_path"
18006    fi
18007  fi
18008
18009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18010  if test "x$test_cygdrive_prefix" = x; then
18011    # As a simple fix, exclude /usr/bin since it's not a real path.
18012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18014      # a path prefixed by /cygdrive for fixpath to work.
18015      new_path="$CYGWIN_ROOT_PATH$input_path"
18016    fi
18017  fi
18018
18019  # remove trailing .exe if any
18020  new_path="${new_path/%.exe/}"
18021
18022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18023
18024  # First separate the path from the arguments. This will split at the first
18025  # space.
18026  complete="$BUILD_CXX"
18027  path="${complete%% *}"
18028  tmp="$complete EOL"
18029  arguments="${tmp#* }"
18030
18031  # Input might be given as Windows format, start by converting to
18032  # unix format.
18033  new_path="$path"
18034
18035  windows_path="$new_path"
18036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037    unix_path=`$CYGPATH -u "$windows_path"`
18038    new_path="$unix_path"
18039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18041    new_path="$unix_path"
18042  fi
18043
18044
18045  # Now try to locate executable using which
18046  new_path=`$WHICH "$new_path" 2> /dev/null`
18047
18048  if test "x$new_path" = x; then
18049    # Oops. Which didn't find the executable.
18050    # The splitting of arguments from the executable at a space might have been incorrect,
18051    # since paths with space are more likely in Windows. Give it another try with the whole
18052    # argument.
18053    path="$complete"
18054    arguments="EOL"
18055    new_path="$path"
18056
18057  windows_path="$new_path"
18058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18059    unix_path=`$CYGPATH -u "$windows_path"`
18060    new_path="$unix_path"
18061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18063    new_path="$unix_path"
18064  fi
18065
18066
18067    new_path=`$WHICH "$new_path" 2> /dev/null`
18068
18069    if test "x$new_path" = x; then
18070      # It's still not found. Now this is an unrecoverable error.
18071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18072$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18073      has_space=`$ECHO "$complete" | $GREP " "`
18074      if test "x$has_space" != x; then
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18077      fi
18078      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18079    fi
18080  fi
18081
18082  # Now new_path has a complete unix path to the binary
18083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18084    # Keep paths in /bin as-is, but remove trailing .exe if any
18085    new_path="${new_path/%.exe/}"
18086    # Do not save /bin paths to all_fixpath_prefixes!
18087  else
18088    # Not in mixed or Windows style, start by that.
18089    new_path=`cmd //c echo $new_path`
18090
18091  input_path="$new_path"
18092  # Check if we need to convert this using DOS-style short mode. If the path
18093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094  # take no chances and rewrite it.
18095  # Note: m4 eats our [], so we need to use [ and ] instead.
18096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18097  if test "x$has_forbidden_chars" != x; then
18098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18100  fi
18101
18102    # Output is in $new_path
18103
18104  windows_path="$new_path"
18105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18106    unix_path=`$CYGPATH -u "$windows_path"`
18107    new_path="$unix_path"
18108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18110    new_path="$unix_path"
18111  fi
18112
18113    # remove trailing .exe if any
18114    new_path="${new_path/%.exe/}"
18115
18116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18118  fi
18119
18120  else
18121    # We're on a posix platform. Hooray! :)
18122    # First separate the path from the arguments. This will split at the first
18123    # space.
18124    complete="$BUILD_CXX"
18125    path="${complete%% *}"
18126    tmp="$complete EOL"
18127    arguments="${tmp#* }"
18128
18129    # Cannot rely on the command "which" here since it doesn't always work.
18130    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18131    if test -z "$is_absolute_path"; then
18132      # Path to executable is not absolute. Find it.
18133      IFS_save="$IFS"
18134      IFS=:
18135      for p in $PATH; do
18136        if test -f "$p/$path" && test -x "$p/$path"; then
18137          new_path="$p/$path"
18138          break
18139        fi
18140      done
18141      IFS="$IFS_save"
18142    else
18143      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18144$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18145      new_path="$path"
18146    fi
18147
18148    if test "x$new_path" = x; then
18149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18150$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18151        has_space=`$ECHO "$complete" | $GREP " "`
18152        if test "x$has_space" != x; then
18153          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18155        fi
18156        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18157      fi
18158  fi
18159
18160      # Now join together the path and the arguments once again
18161      if test "x$arguments" != xEOL; then
18162        new_complete="$new_path ${arguments% *}"
18163      else
18164        new_complete="$new_path"
18165      fi
18166
18167  if test "x$complete" != "x$new_complete"; then
18168      BUILD_CXX="$new_complete"
18169      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18170$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18171    fi
18172
18173    # Extract the first word of "ld", so it can be a program name with args.
18174set dummy ld; ac_word=$2
18175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18176$as_echo_n "checking for $ac_word... " >&6; }
18177if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18178  $as_echo_n "(cached) " >&6
18179else
18180  case $BUILD_LD in
18181  [\\/]* | ?:[\\/]*)
18182  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18183  ;;
18184  *)
18185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18186for as_dir in $PATH
18187do
18188  IFS=$as_save_IFS
18189  test -z "$as_dir" && as_dir=.
18190    for ac_exec_ext in '' $ac_executable_extensions; do
18191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18192    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18194    break 2
18195  fi
18196done
18197  done
18198IFS=$as_save_IFS
18199
18200  ;;
18201esac
18202fi
18203BUILD_LD=$ac_cv_path_BUILD_LD
18204if test -n "$BUILD_LD"; then
18205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18206$as_echo "$BUILD_LD" >&6; }
18207else
18208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209$as_echo "no" >&6; }
18210fi
18211
18212
18213
18214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18215
18216  # First separate the path from the arguments. This will split at the first
18217  # space.
18218  complete="$BUILD_LD"
18219  path="${complete%% *}"
18220  tmp="$complete EOL"
18221  arguments="${tmp#* }"
18222
18223  # Input might be given as Windows format, start by converting to
18224  # unix format.
18225  new_path=`$CYGPATH -u "$path"`
18226
18227  # Now try to locate executable using which
18228  new_path=`$WHICH "$new_path" 2> /dev/null`
18229  # bat and cmd files are not always considered executable in cygwin causing which
18230  # to not find them
18231  if test "x$new_path" = x \
18232           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18233           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18234    new_path=`$CYGPATH -u "$path"`
18235  fi
18236  if test "x$new_path" = x; then
18237    # Oops. Which didn't find the executable.
18238    # The splitting of arguments from the executable at a space might have been incorrect,
18239    # since paths with space are more likely in Windows. Give it another try with the whole
18240    # argument.
18241    path="$complete"
18242    arguments="EOL"
18243    new_path=`$CYGPATH -u "$path"`
18244    new_path=`$WHICH "$new_path" 2> /dev/null`
18245    # bat and cmd files are not always considered executable in cygwin causing which
18246    # to not find them
18247    if test "x$new_path" = x \
18248             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18249             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18250      new_path=`$CYGPATH -u "$path"`
18251    fi
18252    if test "x$new_path" = x; then
18253      # It's still not found. Now this is an unrecoverable error.
18254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18255$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18256      has_space=`$ECHO "$complete" | $GREP " "`
18257      if test "x$has_space" != x; then
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18260      fi
18261      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18262    fi
18263  fi
18264
18265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18268  # "foo.exe" is OK but "foo" is an error.
18269  #
18270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18271  # It is also a way to make sure we got the proper file name for the real test later on.
18272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18273  if test "x$test_shortpath" = x; then
18274    # Short path failed, file does not exist as specified.
18275    # Try adding .exe or .cmd
18276    if test -f "${new_path}.exe"; then
18277       input_to_shortpath="${new_path}.exe"
18278    elif test -f "${new_path}.cmd"; then
18279       input_to_shortpath="${new_path}.cmd"
18280    else
18281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18282$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18285      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18286    fi
18287  else
18288    input_to_shortpath="$new_path"
18289  fi
18290
18291  # Call helper function which possibly converts this using DOS-style short mode.
18292  # If so, the updated path is stored in $new_path.
18293  new_path="$input_to_shortpath"
18294
18295  input_path="$input_to_shortpath"
18296  # Check if we need to convert this using DOS-style short mode. If the path
18297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18298  # take no chances and rewrite it.
18299  # Note: m4 eats our [], so we need to use [ and ] instead.
18300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18301  if test "x$has_forbidden_chars" != x; then
18302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18306      # Going to short mode and back again did indeed matter. Since short mode is
18307      # case insensitive, let's make it lowercase to improve readability.
18308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18309      # Now convert it back to Unix-stile (cygpath)
18310      input_path=`$CYGPATH -u "$shortmode_path"`
18311      new_path="$input_path"
18312    fi
18313  fi
18314
18315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18316  if test "x$test_cygdrive_prefix" = x; then
18317    # As a simple fix, exclude /usr/bin since it's not a real path.
18318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18320      # a path prefixed by /cygdrive for fixpath to work.
18321      new_path="$CYGWIN_ROOT_PATH$input_path"
18322    fi
18323  fi
18324
18325  # remove trailing .exe if any
18326  new_path="${new_path/%.exe/}"
18327
18328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18329
18330  # First separate the path from the arguments. This will split at the first
18331  # space.
18332  complete="$BUILD_LD"
18333  path="${complete%% *}"
18334  tmp="$complete EOL"
18335  arguments="${tmp#* }"
18336
18337  # Input might be given as Windows format, start by converting to
18338  # unix format.
18339  new_path="$path"
18340
18341  windows_path="$new_path"
18342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18343    unix_path=`$CYGPATH -u "$windows_path"`
18344    new_path="$unix_path"
18345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18347    new_path="$unix_path"
18348  fi
18349
18350
18351  # Now try to locate executable using which
18352  new_path=`$WHICH "$new_path" 2> /dev/null`
18353
18354  if test "x$new_path" = x; then
18355    # Oops. Which didn't find the executable.
18356    # The splitting of arguments from the executable at a space might have been incorrect,
18357    # since paths with space are more likely in Windows. Give it another try with the whole
18358    # argument.
18359    path="$complete"
18360    arguments="EOL"
18361    new_path="$path"
18362
18363  windows_path="$new_path"
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    unix_path=`$CYGPATH -u "$windows_path"`
18366    new_path="$unix_path"
18367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18369    new_path="$unix_path"
18370  fi
18371
18372
18373    new_path=`$WHICH "$new_path" 2> /dev/null`
18374
18375    if test "x$new_path" = x; then
18376      # It's still not found. Now this is an unrecoverable error.
18377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18378$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18379      has_space=`$ECHO "$complete" | $GREP " "`
18380      if test "x$has_space" != x; then
18381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18383      fi
18384      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18385    fi
18386  fi
18387
18388  # Now new_path has a complete unix path to the binary
18389  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18390    # Keep paths in /bin as-is, but remove trailing .exe if any
18391    new_path="${new_path/%.exe/}"
18392    # Do not save /bin paths to all_fixpath_prefixes!
18393  else
18394    # Not in mixed or Windows style, start by that.
18395    new_path=`cmd //c echo $new_path`
18396
18397  input_path="$new_path"
18398  # Check if we need to convert this using DOS-style short mode. If the path
18399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18400  # take no chances and rewrite it.
18401  # Note: m4 eats our [], so we need to use [ and ] instead.
18402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18403  if test "x$has_forbidden_chars" != x; then
18404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18406  fi
18407
18408    # Output is in $new_path
18409
18410  windows_path="$new_path"
18411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18412    unix_path=`$CYGPATH -u "$windows_path"`
18413    new_path="$unix_path"
18414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18416    new_path="$unix_path"
18417  fi
18418
18419    # remove trailing .exe if any
18420    new_path="${new_path/%.exe/}"
18421
18422    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18423    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18424  fi
18425
18426  else
18427    # We're on a posix platform. Hooray! :)
18428    # First separate the path from the arguments. This will split at the first
18429    # space.
18430    complete="$BUILD_LD"
18431    path="${complete%% *}"
18432    tmp="$complete EOL"
18433    arguments="${tmp#* }"
18434
18435    # Cannot rely on the command "which" here since it doesn't always work.
18436    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18437    if test -z "$is_absolute_path"; then
18438      # Path to executable is not absolute. Find it.
18439      IFS_save="$IFS"
18440      IFS=:
18441      for p in $PATH; do
18442        if test -f "$p/$path" && test -x "$p/$path"; then
18443          new_path="$p/$path"
18444          break
18445        fi
18446      done
18447      IFS="$IFS_save"
18448    else
18449      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18450$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18451      new_path="$path"
18452    fi
18453
18454    if test "x$new_path" = x; then
18455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18456$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18457        has_space=`$ECHO "$complete" | $GREP " "`
18458        if test "x$has_space" != x; then
18459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18461        fi
18462        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18463      fi
18464  fi
18465
18466      # Now join together the path and the arguments once again
18467      if test "x$arguments" != xEOL; then
18468        new_complete="$new_path ${arguments% *}"
18469      else
18470        new_complete="$new_path"
18471      fi
18472
18473  if test "x$complete" != "x$new_complete"; then
18474      BUILD_LD="$new_complete"
18475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18476$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18477    fi
18478
18479fi
18480
18481
18482
18483
18484# If a devkit is found on the builddeps server, then prepend its path to the
18485# PATH variable. If there are cross compilers available in the devkit, these
18486# will be found by AC_PROG_CC et al.
18487DEVKIT=
18488
18489
18490    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18491        # Source the builddeps file again, to make sure it uses the latest variables!
18492        . $builddepsfile
18493        # Look for a target and build machine specific resource!
18494        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18495        if test "x$resource" = x; then
18496            # Ok, lets instead look for a target specific resource
18497            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18498        fi
18499        if test "x$resource" = x; then
18500            # Ok, lets instead look for a build specific resource
18501            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18502        fi
18503        if test "x$resource" = x; then
18504            # Ok, lets instead look for a generic resource
18505            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18506            resource=${builddep_devkit}
18507        fi
18508        if test "x$resource" != x; then
18509            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18510$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18511	    # If the resource in the builddeps.conf file is an existing directory,
18512	    # for example /java/linux/cups
18513	    if test -d ${resource}; then
18514	       depdir=${resource}
18515	    else
18516
18517# devkit is for example mymodule
18518# $resource is for example libs/general/libmymod_1_2_3.zip
18519# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18520# $with_builddeps_dir is for example /localhome/builddeps
18521# depdir is the name of the variable into which we store the depdir, eg MYMOD
18522# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18523# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18524    filename=`basename $resource`
18525    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18526    filebase=${filename%%.*}
18527    extension=${filename#*.}
18528    installdir=$with_builddeps_dir/$filebase
18529    if test ! -f $installdir/$filename.unpacked; then
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18531$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18532        if test ! -d $installdir; then
18533            mkdir -p $installdir
18534        fi
18535        if test ! -d $installdir; then
18536            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18537        fi
18538        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18539        touch $tmpfile
18540        if test ! -f $tmpfile; then
18541            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18542        fi
18543
18544    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18545    # $tmpfile is the local file name for the downloaded file.
18546    VALID_TOOL=no
18547    if test "x$BDEPS_FTP" = xwget; then
18548       VALID_TOOL=yes
18549       wget -O $tmpfile $with_builddeps_server/$resource
18550    fi
18551    if test "x$BDEPS_FTP" = xlftp; then
18552       VALID_TOOL=yes
18553       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18554    fi
18555    if test "x$BDEPS_FTP" = xftp; then
18556        VALID_TOOL=yes
18557        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18558        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18559        FTPUSERPWD=${FTPSERVER%%@*}
18560        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18561            FTPUSER=${userpwd%%:*}
18562            FTPPWD=${userpwd#*@}
18563            FTPSERVER=${FTPSERVER#*@}
18564        else
18565            FTPUSER=ftp
18566            FTPPWD=ftp
18567        fi
18568        # the "pass" command does not work on some
18569        # ftp clients (read ftp.exe) but if it works,
18570        # passive mode is better!
18571        (\
18572            echo "user $FTPUSER $FTPPWD"        ;\
18573            echo "pass"                         ;\
18574            echo "bin"                          ;\
18575            echo "get $FTPPATH $tmpfile"              ;\
18576        ) | ftp -in $FTPSERVER
18577    fi
18578    if test "x$VALID_TOOL" != xyes; then
18579       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18580    fi
18581
18582        mv $tmpfile $installdir/$filename
18583        if test ! -s $installdir/$filename; then
18584            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18585        fi
18586        case "$extension" in
18587            zip)  echo "Unzipping $installdir/$filename..."
18588               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18589            ;;
18590            tar.gz) echo "Untaring $installdir/$filename..."
18591               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18592            ;;
18593            tgz) echo "Untaring $installdir/$filename..."
18594               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18595            ;;
18596            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18597            ;;
18598        esac
18599    fi
18600    if test -f $installdir/$filename.unpacked; then
18601        depdir=$installdir
18602    fi
18603
18604	    fi
18605            # Source the builddeps file again, because in the previous command, the depdir
18606            # was updated to point at the current build dependency install directory.
18607            . $builddepsfile
18608            # Now extract variables from the builddeps.conf files.
18609            theroot=${builddep_devkit_ROOT}
18610            thecflags=${builddep_devkit_CFLAGS}
18611            thelibs=${builddep_devkit_LIBS}
18612            if test "x$depdir" = x; then
18613                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18614            fi
18615            DEVKIT=$depdir
18616            if test "x$theroot" != x; then
18617               DEVKIT="$theroot"
18618            fi
18619            if test "x$thecflags" != x; then
18620               DEVKIT_CFLAGS="$thecflags"
18621            fi
18622            if test "x$thelibs" != x; then
18623               DEVKIT_LIBS="$thelibs"
18624            fi
18625            # Found devkit
18626                     PATH="$DEVKIT/bin:$PATH"
18627                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18628                     if test "x$x_includes" = "xNONE"; then
18629                         x_includes="$SYS_ROOT/usr/include/X11"
18630                     fi
18631                     if test "x$x_libraries" = "xNONE"; then
18632                         x_libraries="$SYS_ROOT/usr/lib"
18633                     fi
18634
18635
18636        fi
18637
18638    fi
18639
18640
18641if test "x$SYS_ROOT" != "x/" ; then
18642    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18643    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18644    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18645    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18646    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18647    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18648fi
18649
18650# Store the CFLAGS etal passed to the configure script.
18651ORG_CFLAGS="$CFLAGS"
18652ORG_CXXFLAGS="$CXXFLAGS"
18653ORG_OBJCFLAGS="$OBJCFLAGS"
18654
18655# autoconf magic only relies on PATH, so update it if tools dir is specified
18656OLD_PATH="$PATH"
18657if test "x$TOOLS_DIR" != x; then
18658  PATH=$TOOLS_DIR:$PATH
18659fi
18660
18661
18662### Locate C compiler (CC)
18663
18664# On windows, only cl.exe is supported.
18665# On Solaris, cc is preferred to gcc.
18666# Elsewhere, gcc is preferred to cc.
18667
18668if test "x$CC" != x; then
18669  COMPILER_CHECK_LIST="$CC"
18670elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18671  COMPILER_CHECK_LIST="cl"
18672elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18673  COMPILER_CHECK_LIST="cc gcc"
18674else
18675  COMPILER_CHECK_LIST="gcc cc"
18676fi
18677
18678
18679  COMPILER_NAME=C
18680
18681  CC=
18682  # If TOOLS_DIR is set, check for all compiler names in there first
18683  # before checking the rest of the PATH.
18684  if test -n "$TOOLS_DIR"; then
18685    PATH_save="$PATH"
18686    PATH="$TOOLS_DIR"
18687    for ac_prog in $COMPILER_CHECK_LIST
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692$as_echo_n "checking for $ac_word... " >&6; }
18693if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  case $TOOLS_DIR_CC in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702for as_dir in $PATH
18703do
18704  IFS=$as_save_IFS
18705  test -z "$as_dir" && as_dir=.
18706    for ac_exec_ext in '' $ac_executable_extensions; do
18707  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18708    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710    break 2
18711  fi
18712done
18713  done
18714IFS=$as_save_IFS
18715
18716  ;;
18717esac
18718fi
18719TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18720if test -n "$TOOLS_DIR_CC"; then
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18722$as_echo "$TOOLS_DIR_CC" >&6; }
18723else
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725$as_echo "no" >&6; }
18726fi
18727
18728
18729  test -n "$TOOLS_DIR_CC" && break
18730done
18731
18732    CC=$TOOLS_DIR_CC
18733    PATH="$PATH_save"
18734  fi
18735
18736  # AC_PATH_PROGS can't be run multiple times with the same variable,
18737  # so create a new name for this run.
18738  if test "x$CC" = x; then
18739    for ac_prog in $COMPILER_CHECK_LIST
18740do
18741  # Extract the first word of "$ac_prog", so it can be a program name with args.
18742set dummy $ac_prog; ac_word=$2
18743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18744$as_echo_n "checking for $ac_word... " >&6; }
18745if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18746  $as_echo_n "(cached) " >&6
18747else
18748  case $POTENTIAL_CC in
18749  [\\/]* | ?:[\\/]*)
18750  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18751  ;;
18752  *)
18753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18754for as_dir in $PATH
18755do
18756  IFS=$as_save_IFS
18757  test -z "$as_dir" && as_dir=.
18758    for ac_exec_ext in '' $ac_executable_extensions; do
18759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18760    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18762    break 2
18763  fi
18764done
18765  done
18766IFS=$as_save_IFS
18767
18768  ;;
18769esac
18770fi
18771POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18772if test -n "$POTENTIAL_CC"; then
18773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18774$as_echo "$POTENTIAL_CC" >&6; }
18775else
18776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777$as_echo "no" >&6; }
18778fi
18779
18780
18781  test -n "$POTENTIAL_CC" && break
18782done
18783
18784    CC=$POTENTIAL_CC
18785  fi
18786
18787  if test "x$CC" = x; then
18788
18789    # Print a helpful message on how to acquire the necessary build dependency.
18790    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18791    MISSING_DEPENDENCY=devkit
18792    PKGHANDLER_COMMAND=
18793
18794    case $PKGHANDLER in
18795	apt-get)
18796                apt_help     $MISSING_DEPENDENCY ;;
18797    yum)
18798                yum_help     $MISSING_DEPENDENCY ;;
18799	port)
18800                port_help    $MISSING_DEPENDENCY ;;
18801	pkgutil)
18802                pkgutil_help $MISSING_DEPENDENCY ;;
18803	pkgadd)
18804                pkgadd_help  $MISSING_DEPENDENCY ;;
18805    * )
18806      break ;;
18807    esac
18808
18809    if test "x$PKGHANDLER_COMMAND" != x; then
18810        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18811    fi
18812
18813      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18814  fi
18815
18816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18817
18818  # First separate the path from the arguments. This will split at the first
18819  # space.
18820  complete="$CC"
18821  path="${complete%% *}"
18822  tmp="$complete EOL"
18823  arguments="${tmp#* }"
18824
18825  # Input might be given as Windows format, start by converting to
18826  # unix format.
18827  new_path=`$CYGPATH -u "$path"`
18828
18829  # Now try to locate executable using which
18830  new_path=`$WHICH "$new_path" 2> /dev/null`
18831  # bat and cmd files are not always considered executable in cygwin causing which
18832  # to not find them
18833  if test "x$new_path" = x \
18834           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18835           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18836    new_path=`$CYGPATH -u "$path"`
18837  fi
18838  if test "x$new_path" = x; then
18839    # Oops. Which didn't find the executable.
18840    # The splitting of arguments from the executable at a space might have been incorrect,
18841    # since paths with space are more likely in Windows. Give it another try with the whole
18842    # argument.
18843    path="$complete"
18844    arguments="EOL"
18845    new_path=`$CYGPATH -u "$path"`
18846    new_path=`$WHICH "$new_path" 2> /dev/null`
18847    # bat and cmd files are not always considered executable in cygwin causing which
18848    # to not find them
18849    if test "x$new_path" = x \
18850             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18851             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18852      new_path=`$CYGPATH -u "$path"`
18853    fi
18854    if test "x$new_path" = x; then
18855      # It's still not found. Now this is an unrecoverable error.
18856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18857$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18858      has_space=`$ECHO "$complete" | $GREP " "`
18859      if test "x$has_space" != x; then
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18862      fi
18863      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18864    fi
18865  fi
18866
18867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18870  # "foo.exe" is OK but "foo" is an error.
18871  #
18872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18873  # It is also a way to make sure we got the proper file name for the real test later on.
18874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18875  if test "x$test_shortpath" = x; then
18876    # Short path failed, file does not exist as specified.
18877    # Try adding .exe or .cmd
18878    if test -f "${new_path}.exe"; then
18879       input_to_shortpath="${new_path}.exe"
18880    elif test -f "${new_path}.cmd"; then
18881       input_to_shortpath="${new_path}.cmd"
18882    else
18883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18884$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18887      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18888    fi
18889  else
18890    input_to_shortpath="$new_path"
18891  fi
18892
18893  # Call helper function which possibly converts this using DOS-style short mode.
18894  # If so, the updated path is stored in $new_path.
18895  new_path="$input_to_shortpath"
18896
18897  input_path="$input_to_shortpath"
18898  # Check if we need to convert this using DOS-style short mode. If the path
18899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18900  # take no chances and rewrite it.
18901  # Note: m4 eats our [], so we need to use [ and ] instead.
18902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18903  if test "x$has_forbidden_chars" != x; then
18904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18908      # Going to short mode and back again did indeed matter. Since short mode is
18909      # case insensitive, let's make it lowercase to improve readability.
18910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18911      # Now convert it back to Unix-stile (cygpath)
18912      input_path=`$CYGPATH -u "$shortmode_path"`
18913      new_path="$input_path"
18914    fi
18915  fi
18916
18917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18918  if test "x$test_cygdrive_prefix" = x; then
18919    # As a simple fix, exclude /usr/bin since it's not a real path.
18920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18922      # a path prefixed by /cygdrive for fixpath to work.
18923      new_path="$CYGWIN_ROOT_PATH$input_path"
18924    fi
18925  fi
18926
18927  # remove trailing .exe if any
18928  new_path="${new_path/%.exe/}"
18929
18930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18931
18932  # First separate the path from the arguments. This will split at the first
18933  # space.
18934  complete="$CC"
18935  path="${complete%% *}"
18936  tmp="$complete EOL"
18937  arguments="${tmp#* }"
18938
18939  # Input might be given as Windows format, start by converting to
18940  # unix format.
18941  new_path="$path"
18942
18943  windows_path="$new_path"
18944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18945    unix_path=`$CYGPATH -u "$windows_path"`
18946    new_path="$unix_path"
18947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18949    new_path="$unix_path"
18950  fi
18951
18952
18953  # Now try to locate executable using which
18954  new_path=`$WHICH "$new_path" 2> /dev/null`
18955
18956  if test "x$new_path" = x; then
18957    # Oops. Which didn't find the executable.
18958    # The splitting of arguments from the executable at a space might have been incorrect,
18959    # since paths with space are more likely in Windows. Give it another try with the whole
18960    # argument.
18961    path="$complete"
18962    arguments="EOL"
18963    new_path="$path"
18964
18965  windows_path="$new_path"
18966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18967    unix_path=`$CYGPATH -u "$windows_path"`
18968    new_path="$unix_path"
18969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18971    new_path="$unix_path"
18972  fi
18973
18974
18975    new_path=`$WHICH "$new_path" 2> /dev/null`
18976
18977    if test "x$new_path" = x; then
18978      # It's still not found. Now this is an unrecoverable error.
18979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18980$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18981      has_space=`$ECHO "$complete" | $GREP " "`
18982      if test "x$has_space" != x; then
18983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18985      fi
18986      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18987    fi
18988  fi
18989
18990  # Now new_path has a complete unix path to the binary
18991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18992    # Keep paths in /bin as-is, but remove trailing .exe if any
18993    new_path="${new_path/%.exe/}"
18994    # Do not save /bin paths to all_fixpath_prefixes!
18995  else
18996    # Not in mixed or Windows style, start by that.
18997    new_path=`cmd //c echo $new_path`
18998
18999  input_path="$new_path"
19000  # Check if we need to convert this using DOS-style short mode. If the path
19001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19002  # take no chances and rewrite it.
19003  # Note: m4 eats our [], so we need to use [ and ] instead.
19004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19005  if test "x$has_forbidden_chars" != x; then
19006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19008  fi
19009
19010    # Output is in $new_path
19011
19012  windows_path="$new_path"
19013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19014    unix_path=`$CYGPATH -u "$windows_path"`
19015    new_path="$unix_path"
19016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19018    new_path="$unix_path"
19019  fi
19020
19021    # remove trailing .exe if any
19022    new_path="${new_path/%.exe/}"
19023
19024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19026  fi
19027
19028  else
19029    # We're on a posix platform. Hooray! :)
19030    # First separate the path from the arguments. This will split at the first
19031    # space.
19032    complete="$CC"
19033    path="${complete%% *}"
19034    tmp="$complete EOL"
19035    arguments="${tmp#* }"
19036
19037    # Cannot rely on the command "which" here since it doesn't always work.
19038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19039    if test -z "$is_absolute_path"; then
19040      # Path to executable is not absolute. Find it.
19041      IFS_save="$IFS"
19042      IFS=:
19043      for p in $PATH; do
19044        if test -f "$p/$path" && test -x "$p/$path"; then
19045          new_path="$p/$path"
19046          break
19047        fi
19048      done
19049      IFS="$IFS_save"
19050    else
19051      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19052$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19053      new_path="$path"
19054    fi
19055
19056    if test "x$new_path" = x; then
19057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19058$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19059        has_space=`$ECHO "$complete" | $GREP " "`
19060        if test "x$has_space" != x; then
19061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19063        fi
19064        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19065      fi
19066  fi
19067
19068      # Now join together the path and the arguments once again
19069      if test "x$arguments" != xEOL; then
19070        new_complete="$new_path ${arguments% *}"
19071      else
19072        new_complete="$new_path"
19073      fi
19074
19075  if test "x$complete" != "x$new_complete"; then
19076      CC="$new_complete"
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19078$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19079    fi
19080
19081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19082$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19083  TEST_COMPILER="$CC"
19084
19085    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19086        # Follow a chain of symbolic links. Use readlink
19087        # where it exists, else fall back to horribly
19088        # complicated shell code.
19089        if test "x$READLINK_TESTED" != yes; then
19090            # On MacOSX there is a readlink tool with a different
19091            # purpose than the GNU readlink tool. Check the found readlink.
19092            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19093            if test "x$ISGNU" = x; then
19094                 # A readlink that we do not know how to use.
19095                 # Are there other non-GNU readlinks out there?
19096                 READLINK_TESTED=yes
19097                 READLINK=
19098            fi
19099        fi
19100
19101        if test "x$READLINK" != x; then
19102            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19103        else
19104            # Save the current directory for restoring afterwards
19105            STARTDIR=$PWD
19106            COUNTER=0
19107            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19108            sym_link_file=`$BASENAME $TEST_COMPILER`
19109            # Use the system pwd and not the shell builtin to resolve directory symlinks
19110            cd $sym_link_dir
19111            cd `$THEPWDCMD`
19112            sym_link_dir=`$THEPWDCMD`
19113            # Resolve file symlinks
19114            while test $COUNTER -lt 20; do
19115                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19116                if test "x$ISLINK" == x; then
19117                    # This is not a symbolic link! We are done!
19118                    break
19119                fi
19120                # Again resolve directory symlinks since the target of the just found
19121                # link could be in a different directory
19122                cd `$DIRNAME $ISLINK`
19123                sym_link_dir=`$THEPWDCMD`
19124                sym_link_file=`$BASENAME $ISLINK`
19125                let COUNTER=COUNTER+1
19126            done
19127            cd $STARTDIR
19128            TEST_COMPILER=$sym_link_dir/$sym_link_file
19129        fi
19130    fi
19131
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19133$as_echo "$TEST_COMPILER" >&6; }
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19135$as_echo_n "checking if CC is disguised ccache... " >&6; }
19136
19137  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19138  if test "x$COMPILER_BASENAME" = "xccache"; then
19139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19140$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19141    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19142    # We want to control ccache invocation ourselves, so ignore this cc and try
19143    # searching again.
19144
19145    # Remove the path to the fake ccache cc from the PATH
19146    RETRY_COMPILER_SAVED_PATH="$PATH"
19147    COMPILER_DIRNAME=`$DIRNAME $CC`
19148    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19149
19150    # Try again looking for our compiler
19151    if test -n "$ac_tool_prefix"; then
19152  for ac_prog in $COMPILER_CHECK_LIST
19153  do
19154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19157$as_echo_n "checking for $ac_word... " >&6; }
19158if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19159  $as_echo_n "(cached) " >&6
19160else
19161  if test -n "$PROPER_COMPILER_CC"; then
19162  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19163else
19164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165for as_dir in $PATH
19166do
19167  IFS=$as_save_IFS
19168  test -z "$as_dir" && as_dir=.
19169    for ac_exec_ext in '' $ac_executable_extensions; do
19170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19171    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173    break 2
19174  fi
19175done
19176  done
19177IFS=$as_save_IFS
19178
19179fi
19180fi
19181PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19182if test -n "$PROPER_COMPILER_CC"; then
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19184$as_echo "$PROPER_COMPILER_CC" >&6; }
19185else
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187$as_echo "no" >&6; }
19188fi
19189
19190
19191    test -n "$PROPER_COMPILER_CC" && break
19192  done
19193fi
19194if test -z "$PROPER_COMPILER_CC"; then
19195  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19196  for ac_prog in $COMPILER_CHECK_LIST
19197do
19198  # Extract the first word of "$ac_prog", so it can be a program name with args.
19199set dummy $ac_prog; ac_word=$2
19200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19201$as_echo_n "checking for $ac_word... " >&6; }
19202if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19203  $as_echo_n "(cached) " >&6
19204else
19205  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19206  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19207else
19208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19209for as_dir in $PATH
19210do
19211  IFS=$as_save_IFS
19212  test -z "$as_dir" && as_dir=.
19213    for ac_exec_ext in '' $ac_executable_extensions; do
19214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19215    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19217    break 2
19218  fi
19219done
19220  done
19221IFS=$as_save_IFS
19222
19223fi
19224fi
19225ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19226if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19228$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19229else
19230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19231$as_echo "no" >&6; }
19232fi
19233
19234
19235  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19236done
19237
19238  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19239    PROPER_COMPILER_CC=""
19240  else
19241    case $cross_compiling:$ac_tool_warned in
19242yes:)
19243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19245ac_tool_warned=yes ;;
19246esac
19247    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19248  fi
19249fi
19250
19251
19252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19253
19254  # First separate the path from the arguments. This will split at the first
19255  # space.
19256  complete="$PROPER_COMPILER_CC"
19257  path="${complete%% *}"
19258  tmp="$complete EOL"
19259  arguments="${tmp#* }"
19260
19261  # Input might be given as Windows format, start by converting to
19262  # unix format.
19263  new_path=`$CYGPATH -u "$path"`
19264
19265  # Now try to locate executable using which
19266  new_path=`$WHICH "$new_path" 2> /dev/null`
19267  # bat and cmd files are not always considered executable in cygwin causing which
19268  # to not find them
19269  if test "x$new_path" = x \
19270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19272    new_path=`$CYGPATH -u "$path"`
19273  fi
19274  if test "x$new_path" = x; then
19275    # Oops. Which didn't find the executable.
19276    # The splitting of arguments from the executable at a space might have been incorrect,
19277    # since paths with space are more likely in Windows. Give it another try with the whole
19278    # argument.
19279    path="$complete"
19280    arguments="EOL"
19281    new_path=`$CYGPATH -u "$path"`
19282    new_path=`$WHICH "$new_path" 2> /dev/null`
19283    # bat and cmd files are not always considered executable in cygwin causing which
19284    # to not find them
19285    if test "x$new_path" = x \
19286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19288      new_path=`$CYGPATH -u "$path"`
19289    fi
19290    if test "x$new_path" = x; then
19291      # It's still not found. Now this is an unrecoverable error.
19292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19293$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19294      has_space=`$ECHO "$complete" | $GREP " "`
19295      if test "x$has_space" != x; then
19296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19298      fi
19299      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19300    fi
19301  fi
19302
19303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19306  # "foo.exe" is OK but "foo" is an error.
19307  #
19308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19309  # It is also a way to make sure we got the proper file name for the real test later on.
19310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19311  if test "x$test_shortpath" = x; then
19312    # Short path failed, file does not exist as specified.
19313    # Try adding .exe or .cmd
19314    if test -f "${new_path}.exe"; then
19315       input_to_shortpath="${new_path}.exe"
19316    elif test -f "${new_path}.cmd"; then
19317       input_to_shortpath="${new_path}.cmd"
19318    else
19319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19320$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19323      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19324    fi
19325  else
19326    input_to_shortpath="$new_path"
19327  fi
19328
19329  # Call helper function which possibly converts this using DOS-style short mode.
19330  # If so, the updated path is stored in $new_path.
19331  new_path="$input_to_shortpath"
19332
19333  input_path="$input_to_shortpath"
19334  # Check if we need to convert this using DOS-style short mode. If the path
19335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19336  # take no chances and rewrite it.
19337  # Note: m4 eats our [], so we need to use [ and ] instead.
19338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19339  if test "x$has_forbidden_chars" != x; then
19340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19344      # Going to short mode and back again did indeed matter. Since short mode is
19345      # case insensitive, let's make it lowercase to improve readability.
19346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19347      # Now convert it back to Unix-stile (cygpath)
19348      input_path=`$CYGPATH -u "$shortmode_path"`
19349      new_path="$input_path"
19350    fi
19351  fi
19352
19353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19354  if test "x$test_cygdrive_prefix" = x; then
19355    # As a simple fix, exclude /usr/bin since it's not a real path.
19356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19358      # a path prefixed by /cygdrive for fixpath to work.
19359      new_path="$CYGWIN_ROOT_PATH$input_path"
19360    fi
19361  fi
19362
19363  # remove trailing .exe if any
19364  new_path="${new_path/%.exe/}"
19365
19366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19367
19368  # First separate the path from the arguments. This will split at the first
19369  # space.
19370  complete="$PROPER_COMPILER_CC"
19371  path="${complete%% *}"
19372  tmp="$complete EOL"
19373  arguments="${tmp#* }"
19374
19375  # Input might be given as Windows format, start by converting to
19376  # unix format.
19377  new_path="$path"
19378
19379  windows_path="$new_path"
19380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19381    unix_path=`$CYGPATH -u "$windows_path"`
19382    new_path="$unix_path"
19383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19385    new_path="$unix_path"
19386  fi
19387
19388
19389  # Now try to locate executable using which
19390  new_path=`$WHICH "$new_path" 2> /dev/null`
19391
19392  if test "x$new_path" = x; then
19393    # Oops. Which didn't find the executable.
19394    # The splitting of arguments from the executable at a space might have been incorrect,
19395    # since paths with space are more likely in Windows. Give it another try with the whole
19396    # argument.
19397    path="$complete"
19398    arguments="EOL"
19399    new_path="$path"
19400
19401  windows_path="$new_path"
19402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403    unix_path=`$CYGPATH -u "$windows_path"`
19404    new_path="$unix_path"
19405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407    new_path="$unix_path"
19408  fi
19409
19410
19411    new_path=`$WHICH "$new_path" 2> /dev/null`
19412
19413    if test "x$new_path" = x; then
19414      # It's still not found. Now this is an unrecoverable error.
19415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19416$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19417      has_space=`$ECHO "$complete" | $GREP " "`
19418      if test "x$has_space" != x; then
19419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19421      fi
19422      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19423    fi
19424  fi
19425
19426  # Now new_path has a complete unix path to the binary
19427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19428    # Keep paths in /bin as-is, but remove trailing .exe if any
19429    new_path="${new_path/%.exe/}"
19430    # Do not save /bin paths to all_fixpath_prefixes!
19431  else
19432    # Not in mixed or Windows style, start by that.
19433    new_path=`cmd //c echo $new_path`
19434
19435  input_path="$new_path"
19436  # Check if we need to convert this using DOS-style short mode. If the path
19437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19438  # take no chances and rewrite it.
19439  # Note: m4 eats our [], so we need to use [ and ] instead.
19440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19441  if test "x$has_forbidden_chars" != x; then
19442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19444  fi
19445
19446    # Output is in $new_path
19447
19448  windows_path="$new_path"
19449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19450    unix_path=`$CYGPATH -u "$windows_path"`
19451    new_path="$unix_path"
19452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19454    new_path="$unix_path"
19455  fi
19456
19457    # remove trailing .exe if any
19458    new_path="${new_path/%.exe/}"
19459
19460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19462  fi
19463
19464  else
19465    # We're on a posix platform. Hooray! :)
19466    # First separate the path from the arguments. This will split at the first
19467    # space.
19468    complete="$PROPER_COMPILER_CC"
19469    path="${complete%% *}"
19470    tmp="$complete EOL"
19471    arguments="${tmp#* }"
19472
19473    # Cannot rely on the command "which" here since it doesn't always work.
19474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19475    if test -z "$is_absolute_path"; then
19476      # Path to executable is not absolute. Find it.
19477      IFS_save="$IFS"
19478      IFS=:
19479      for p in $PATH; do
19480        if test -f "$p/$path" && test -x "$p/$path"; then
19481          new_path="$p/$path"
19482          break
19483        fi
19484      done
19485      IFS="$IFS_save"
19486    else
19487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19488$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19489      new_path="$path"
19490    fi
19491
19492    if test "x$new_path" = x; then
19493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19494$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19495        has_space=`$ECHO "$complete" | $GREP " "`
19496        if test "x$has_space" != x; then
19497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19499        fi
19500        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19501      fi
19502  fi
19503
19504      # Now join together the path and the arguments once again
19505      if test "x$arguments" != xEOL; then
19506        new_complete="$new_path ${arguments% *}"
19507      else
19508        new_complete="$new_path"
19509      fi
19510
19511  if test "x$complete" != "x$new_complete"; then
19512      PROPER_COMPILER_CC="$new_complete"
19513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19514$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19515    fi
19516
19517    PATH="$RETRY_COMPILER_SAVED_PATH"
19518
19519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19520$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19521
19522    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19523        # Follow a chain of symbolic links. Use readlink
19524        # where it exists, else fall back to horribly
19525        # complicated shell code.
19526        if test "x$READLINK_TESTED" != yes; then
19527            # On MacOSX there is a readlink tool with a different
19528            # purpose than the GNU readlink tool. Check the found readlink.
19529            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19530            if test "x$ISGNU" = x; then
19531                 # A readlink that we do not know how to use.
19532                 # Are there other non-GNU readlinks out there?
19533                 READLINK_TESTED=yes
19534                 READLINK=
19535            fi
19536        fi
19537
19538        if test "x$READLINK" != x; then
19539            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19540        else
19541            # Save the current directory for restoring afterwards
19542            STARTDIR=$PWD
19543            COUNTER=0
19544            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19545            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19546            # Use the system pwd and not the shell builtin to resolve directory symlinks
19547            cd $sym_link_dir
19548            cd `$THEPWDCMD`
19549            sym_link_dir=`$THEPWDCMD`
19550            # Resolve file symlinks
19551            while test $COUNTER -lt 20; do
19552                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19553                if test "x$ISLINK" == x; then
19554                    # This is not a symbolic link! We are done!
19555                    break
19556                fi
19557                # Again resolve directory symlinks since the target of the just found
19558                # link could be in a different directory
19559                cd `$DIRNAME $ISLINK`
19560                sym_link_dir=`$THEPWDCMD`
19561                sym_link_file=`$BASENAME $ISLINK`
19562                let COUNTER=COUNTER+1
19563            done
19564            cd $STARTDIR
19565            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19566        fi
19567    fi
19568
19569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19570$as_echo "$PROPER_COMPILER_CC" >&6; }
19571    CC="$PROPER_COMPILER_CC"
19572  else
19573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19574$as_echo "no, keeping CC" >&6; }
19575    CC="$TEST_COMPILER"
19576  fi
19577
19578  COMPILER=$CC
19579  COMPILER_NAME=$COMPILER_NAME
19580
19581  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19582    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19583    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19584    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19585    if test $? -ne 0; then
19586      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19587
19588      { $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
19589$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19591$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19592      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19593    else
19594      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19595      COMPILER_VENDOR="Sun Studio"
19596    fi
19597  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19598    # First line typically looks something like:
19599    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19600    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19601    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19602    COMPILER_VENDOR="Microsoft CL.EXE"
19603    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19604    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19605      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19606        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19607      fi
19608    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19609      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19610        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19611      fi
19612    fi
19613  else
19614    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19615    # Check that this is likely to be GCC.
19616    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19617    if test $? -ne 0; then
19618      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19619$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19621$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19622      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19623    fi
19624
19625    # First line typically looks something like:
19626    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19627    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19628    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19629  fi
19630  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19631  CC_VERSION="$COMPILER_VERSION"
19632  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19633  CC_VENDOR="$COMPILER_VENDOR"
19634
19635  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19636$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19637
19638
19639# Now that we have resolved CC ourself, let autoconf have its go at it
19640ac_ext=c
19641ac_cpp='$CPP $CPPFLAGS'
19642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19644ac_compiler_gnu=$ac_cv_c_compiler_gnu
19645if test -n "$ac_tool_prefix"; then
19646  for ac_prog in $CC
19647  do
19648    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19649set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19651$as_echo_n "checking for $ac_word... " >&6; }
19652if test "${ac_cv_prog_CC+set}" = set; then :
19653  $as_echo_n "(cached) " >&6
19654else
19655  if test -n "$CC"; then
19656  ac_cv_prog_CC="$CC" # Let the user override the test.
19657else
19658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19659for as_dir in $PATH
19660do
19661  IFS=$as_save_IFS
19662  test -z "$as_dir" && as_dir=.
19663    for ac_exec_ext in '' $ac_executable_extensions; do
19664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19665    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19667    break 2
19668  fi
19669done
19670  done
19671IFS=$as_save_IFS
19672
19673fi
19674fi
19675CC=$ac_cv_prog_CC
19676if test -n "$CC"; then
19677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19678$as_echo "$CC" >&6; }
19679else
19680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19681$as_echo "no" >&6; }
19682fi
19683
19684
19685    test -n "$CC" && break
19686  done
19687fi
19688if test -z "$CC"; then
19689  ac_ct_CC=$CC
19690  for ac_prog in $CC
19691do
19692  # Extract the first word of "$ac_prog", so it can be a program name with args.
19693set dummy $ac_prog; ac_word=$2
19694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19695$as_echo_n "checking for $ac_word... " >&6; }
19696if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19697  $as_echo_n "(cached) " >&6
19698else
19699  if test -n "$ac_ct_CC"; then
19700  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19701else
19702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19703for as_dir in $PATH
19704do
19705  IFS=$as_save_IFS
19706  test -z "$as_dir" && as_dir=.
19707    for ac_exec_ext in '' $ac_executable_extensions; do
19708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19709    ac_cv_prog_ac_ct_CC="$ac_prog"
19710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19711    break 2
19712  fi
19713done
19714  done
19715IFS=$as_save_IFS
19716
19717fi
19718fi
19719ac_ct_CC=$ac_cv_prog_ac_ct_CC
19720if test -n "$ac_ct_CC"; then
19721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19722$as_echo "$ac_ct_CC" >&6; }
19723else
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19725$as_echo "no" >&6; }
19726fi
19727
19728
19729  test -n "$ac_ct_CC" && break
19730done
19731
19732  if test "x$ac_ct_CC" = x; then
19733    CC=""
19734  else
19735    case $cross_compiling:$ac_tool_warned in
19736yes:)
19737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19739ac_tool_warned=yes ;;
19740esac
19741    CC=$ac_ct_CC
19742  fi
19743fi
19744
19745
19746test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19748as_fn_error $? "no acceptable C compiler found in \$PATH
19749See \`config.log' for more details" "$LINENO" 5 ; }
19750
19751# Provide some information about the compiler.
19752$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19753set X $ac_compile
19754ac_compiler=$2
19755for ac_option in --version -v -V -qversion; do
19756  { { ac_try="$ac_compiler $ac_option >&5"
19757case "(($ac_try" in
19758  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19759  *) ac_try_echo=$ac_try;;
19760esac
19761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19762$as_echo "$ac_try_echo"; } >&5
19763  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19764  ac_status=$?
19765  if test -s conftest.err; then
19766    sed '10a\
19767... rest of stderr output deleted ...
19768         10q' conftest.err >conftest.er1
19769    cat conftest.er1 >&5
19770  fi
19771  rm -f conftest.er1 conftest.err
19772  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19773  test $ac_status = 0; }
19774done
19775
19776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19777/* end confdefs.h.  */
19778
19779int
19780main ()
19781{
19782
19783  ;
19784  return 0;
19785}
19786_ACEOF
19787ac_clean_files_save=$ac_clean_files
19788ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19789# Try to create an executable without -o first, disregard a.out.
19790# It will help us diagnose broken compilers, and finding out an intuition
19791# of exeext.
19792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19793$as_echo_n "checking whether the C compiler works... " >&6; }
19794ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19795
19796# The possible output files:
19797ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19798
19799ac_rmfiles=
19800for ac_file in $ac_files
19801do
19802  case $ac_file in
19803    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19804    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19805  esac
19806done
19807rm -f $ac_rmfiles
19808
19809if { { ac_try="$ac_link_default"
19810case "(($ac_try" in
19811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19812  *) ac_try_echo=$ac_try;;
19813esac
19814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19815$as_echo "$ac_try_echo"; } >&5
19816  (eval "$ac_link_default") 2>&5
19817  ac_status=$?
19818  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19819  test $ac_status = 0; }; then :
19820  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19821# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19822# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19823# so that the user can short-circuit this test for compilers unknown to
19824# Autoconf.
19825for ac_file in $ac_files ''
19826do
19827  test -f "$ac_file" || continue
19828  case $ac_file in
19829    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19830	;;
19831    [ab].out )
19832	# We found the default executable, but exeext='' is most
19833	# certainly right.
19834	break;;
19835    *.* )
19836	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19837	then :; else
19838	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19839	fi
19840	# We set ac_cv_exeext here because the later test for it is not
19841	# safe: cross compilers may not add the suffix if given an `-o'
19842	# argument, so we may need to know it at that point already.
19843	# Even if this section looks crufty: it has the advantage of
19844	# actually working.
19845	break;;
19846    * )
19847	break;;
19848  esac
19849done
19850test "$ac_cv_exeext" = no && ac_cv_exeext=
19851
19852else
19853  ac_file=''
19854fi
19855if test -z "$ac_file"; then :
19856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19857$as_echo "no" >&6; }
19858$as_echo "$as_me: failed program was:" >&5
19859sed 's/^/| /' conftest.$ac_ext >&5
19860
19861{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19863as_fn_error 77 "C compiler cannot create executables
19864See \`config.log' for more details" "$LINENO" 5 ; }
19865else
19866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19867$as_echo "yes" >&6; }
19868fi
19869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19870$as_echo_n "checking for C compiler default output file name... " >&6; }
19871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19872$as_echo "$ac_file" >&6; }
19873ac_exeext=$ac_cv_exeext
19874
19875rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19876ac_clean_files=$ac_clean_files_save
19877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19878$as_echo_n "checking for suffix of executables... " >&6; }
19879if { { ac_try="$ac_link"
19880case "(($ac_try" in
19881  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882  *) ac_try_echo=$ac_try;;
19883esac
19884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19885$as_echo "$ac_try_echo"; } >&5
19886  (eval "$ac_link") 2>&5
19887  ac_status=$?
19888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19889  test $ac_status = 0; }; then :
19890  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19891# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19892# work properly (i.e., refer to `conftest.exe'), while it won't with
19893# `rm'.
19894for ac_file in conftest.exe conftest conftest.*; do
19895  test -f "$ac_file" || continue
19896  case $ac_file in
19897    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19898    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19899	  break;;
19900    * ) break;;
19901  esac
19902done
19903else
19904  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19906as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19907See \`config.log' for more details" "$LINENO" 5 ; }
19908fi
19909rm -f conftest conftest$ac_cv_exeext
19910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19911$as_echo "$ac_cv_exeext" >&6; }
19912
19913rm -f conftest.$ac_ext
19914EXEEXT=$ac_cv_exeext
19915ac_exeext=$EXEEXT
19916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19917/* end confdefs.h.  */
19918#include <stdio.h>
19919int
19920main ()
19921{
19922FILE *f = fopen ("conftest.out", "w");
19923 return ferror (f) || fclose (f) != 0;
19924
19925  ;
19926  return 0;
19927}
19928_ACEOF
19929ac_clean_files="$ac_clean_files conftest.out"
19930# Check that the compiler produces executables we can run.  If not, either
19931# the compiler is broken, or we cross compile.
19932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19933$as_echo_n "checking whether we are cross compiling... " >&6; }
19934if test "$cross_compiling" != yes; then
19935  { { ac_try="$ac_link"
19936case "(($ac_try" in
19937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19938  *) ac_try_echo=$ac_try;;
19939esac
19940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19941$as_echo "$ac_try_echo"; } >&5
19942  (eval "$ac_link") 2>&5
19943  ac_status=$?
19944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19945  test $ac_status = 0; }
19946  if { ac_try='./conftest$ac_cv_exeext'
19947  { { case "(($ac_try" in
19948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19949  *) ac_try_echo=$ac_try;;
19950esac
19951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19952$as_echo "$ac_try_echo"; } >&5
19953  (eval "$ac_try") 2>&5
19954  ac_status=$?
19955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19956  test $ac_status = 0; }; }; then
19957    cross_compiling=no
19958  else
19959    if test "$cross_compiling" = maybe; then
19960	cross_compiling=yes
19961    else
19962	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19964as_fn_error $? "cannot run C compiled programs.
19965If you meant to cross compile, use \`--host'.
19966See \`config.log' for more details" "$LINENO" 5 ; }
19967    fi
19968  fi
19969fi
19970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19971$as_echo "$cross_compiling" >&6; }
19972
19973rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19974ac_clean_files=$ac_clean_files_save
19975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19976$as_echo_n "checking for suffix of object files... " >&6; }
19977if test "${ac_cv_objext+set}" = set; then :
19978  $as_echo_n "(cached) " >&6
19979else
19980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19981/* end confdefs.h.  */
19982
19983int
19984main ()
19985{
19986
19987  ;
19988  return 0;
19989}
19990_ACEOF
19991rm -f conftest.o conftest.obj
19992if { { ac_try="$ac_compile"
19993case "(($ac_try" in
19994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19995  *) ac_try_echo=$ac_try;;
19996esac
19997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19998$as_echo "$ac_try_echo"; } >&5
19999  (eval "$ac_compile") 2>&5
20000  ac_status=$?
20001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20002  test $ac_status = 0; }; then :
20003  for ac_file in conftest.o conftest.obj conftest.*; do
20004  test -f "$ac_file" || continue;
20005  case $ac_file in
20006    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20007    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20008       break;;
20009  esac
20010done
20011else
20012  $as_echo "$as_me: failed program was:" >&5
20013sed 's/^/| /' conftest.$ac_ext >&5
20014
20015{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20017as_fn_error $? "cannot compute suffix of object files: cannot compile
20018See \`config.log' for more details" "$LINENO" 5 ; }
20019fi
20020rm -f conftest.$ac_cv_objext conftest.$ac_ext
20021fi
20022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20023$as_echo "$ac_cv_objext" >&6; }
20024OBJEXT=$ac_cv_objext
20025ac_objext=$OBJEXT
20026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20027$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20028if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20029  $as_echo_n "(cached) " >&6
20030else
20031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20032/* end confdefs.h.  */
20033
20034int
20035main ()
20036{
20037#ifndef __GNUC__
20038       choke me
20039#endif
20040
20041  ;
20042  return 0;
20043}
20044_ACEOF
20045if ac_fn_c_try_compile "$LINENO"; then :
20046  ac_compiler_gnu=yes
20047else
20048  ac_compiler_gnu=no
20049fi
20050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20051ac_cv_c_compiler_gnu=$ac_compiler_gnu
20052
20053fi
20054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20055$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20056if test $ac_compiler_gnu = yes; then
20057  GCC=yes
20058else
20059  GCC=
20060fi
20061ac_test_CFLAGS=${CFLAGS+set}
20062ac_save_CFLAGS=$CFLAGS
20063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20064$as_echo_n "checking whether $CC accepts -g... " >&6; }
20065if test "${ac_cv_prog_cc_g+set}" = set; then :
20066  $as_echo_n "(cached) " >&6
20067else
20068  ac_save_c_werror_flag=$ac_c_werror_flag
20069   ac_c_werror_flag=yes
20070   ac_cv_prog_cc_g=no
20071   CFLAGS="-g"
20072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20073/* end confdefs.h.  */
20074
20075int
20076main ()
20077{
20078
20079  ;
20080  return 0;
20081}
20082_ACEOF
20083if ac_fn_c_try_compile "$LINENO"; then :
20084  ac_cv_prog_cc_g=yes
20085else
20086  CFLAGS=""
20087      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20088/* end confdefs.h.  */
20089
20090int
20091main ()
20092{
20093
20094  ;
20095  return 0;
20096}
20097_ACEOF
20098if ac_fn_c_try_compile "$LINENO"; then :
20099
20100else
20101  ac_c_werror_flag=$ac_save_c_werror_flag
20102	 CFLAGS="-g"
20103	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20104/* end confdefs.h.  */
20105
20106int
20107main ()
20108{
20109
20110  ;
20111  return 0;
20112}
20113_ACEOF
20114if ac_fn_c_try_compile "$LINENO"; then :
20115  ac_cv_prog_cc_g=yes
20116fi
20117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20118fi
20119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20120fi
20121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20122   ac_c_werror_flag=$ac_save_c_werror_flag
20123fi
20124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20125$as_echo "$ac_cv_prog_cc_g" >&6; }
20126if test "$ac_test_CFLAGS" = set; then
20127  CFLAGS=$ac_save_CFLAGS
20128elif test $ac_cv_prog_cc_g = yes; then
20129  if test "$GCC" = yes; then
20130    CFLAGS="-g -O2"
20131  else
20132    CFLAGS="-g"
20133  fi
20134else
20135  if test "$GCC" = yes; then
20136    CFLAGS="-O2"
20137  else
20138    CFLAGS=
20139  fi
20140fi
20141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20142$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20143if test "${ac_cv_prog_cc_c89+set}" = set; then :
20144  $as_echo_n "(cached) " >&6
20145else
20146  ac_cv_prog_cc_c89=no
20147ac_save_CC=$CC
20148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20149/* end confdefs.h.  */
20150#include <stdarg.h>
20151#include <stdio.h>
20152#include <sys/types.h>
20153#include <sys/stat.h>
20154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20155struct buf { int x; };
20156FILE * (*rcsopen) (struct buf *, struct stat *, int);
20157static char *e (p, i)
20158     char **p;
20159     int i;
20160{
20161  return p[i];
20162}
20163static char *f (char * (*g) (char **, int), char **p, ...)
20164{
20165  char *s;
20166  va_list v;
20167  va_start (v,p);
20168  s = g (p, va_arg (v,int));
20169  va_end (v);
20170  return s;
20171}
20172
20173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20174   function prototypes and stuff, but not '\xHH' hex character constants.
20175   These don't provoke an error unfortunately, instead are silently treated
20176   as 'x'.  The following induces an error, until -std is added to get
20177   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20178   array size at least.  It's necessary to write '\x00'==0 to get something
20179   that's true only with -std.  */
20180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20181
20182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20183   inside strings and character constants.  */
20184#define FOO(x) 'x'
20185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20186
20187int test (int i, double x);
20188struct s1 {int (*f) (int a);};
20189struct s2 {int (*f) (double a);};
20190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20191int argc;
20192char **argv;
20193int
20194main ()
20195{
20196return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20197  ;
20198  return 0;
20199}
20200_ACEOF
20201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20202	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20203do
20204  CC="$ac_save_CC $ac_arg"
20205  if ac_fn_c_try_compile "$LINENO"; then :
20206  ac_cv_prog_cc_c89=$ac_arg
20207fi
20208rm -f core conftest.err conftest.$ac_objext
20209  test "x$ac_cv_prog_cc_c89" != "xno" && break
20210done
20211rm -f conftest.$ac_ext
20212CC=$ac_save_CC
20213
20214fi
20215# AC_CACHE_VAL
20216case "x$ac_cv_prog_cc_c89" in
20217  x)
20218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20219$as_echo "none needed" >&6; } ;;
20220  xno)
20221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20222$as_echo "unsupported" >&6; } ;;
20223  *)
20224    CC="$CC $ac_cv_prog_cc_c89"
20225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20226$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20227esac
20228if test "x$ac_cv_prog_cc_c89" != xno; then :
20229
20230fi
20231
20232ac_ext=cpp
20233ac_cpp='$CXXCPP $CPPFLAGS'
20234ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20235ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20236ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20237
20238
20239### Locate C++ compiler (CXX)
20240
20241if test "x$CXX" != x; then
20242  COMPILER_CHECK_LIST="$CXX"
20243elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20244  COMPILER_CHECK_LIST="cl"
20245elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20246  COMPILER_CHECK_LIST="CC g++"
20247else
20248  COMPILER_CHECK_LIST="g++ CC"
20249fi
20250
20251
20252  COMPILER_NAME=C++
20253
20254  CXX=
20255  # If TOOLS_DIR is set, check for all compiler names in there first
20256  # before checking the rest of the PATH.
20257  if test -n "$TOOLS_DIR"; then
20258    PATH_save="$PATH"
20259    PATH="$TOOLS_DIR"
20260    for ac_prog in $COMPILER_CHECK_LIST
20261do
20262  # Extract the first word of "$ac_prog", so it can be a program name with args.
20263set dummy $ac_prog; ac_word=$2
20264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20265$as_echo_n "checking for $ac_word... " >&6; }
20266if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20267  $as_echo_n "(cached) " >&6
20268else
20269  case $TOOLS_DIR_CXX in
20270  [\\/]* | ?:[\\/]*)
20271  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20272  ;;
20273  *)
20274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20275for as_dir in $PATH
20276do
20277  IFS=$as_save_IFS
20278  test -z "$as_dir" && as_dir=.
20279    for ac_exec_ext in '' $ac_executable_extensions; do
20280  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20281    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20283    break 2
20284  fi
20285done
20286  done
20287IFS=$as_save_IFS
20288
20289  ;;
20290esac
20291fi
20292TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20293if test -n "$TOOLS_DIR_CXX"; then
20294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20295$as_echo "$TOOLS_DIR_CXX" >&6; }
20296else
20297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20298$as_echo "no" >&6; }
20299fi
20300
20301
20302  test -n "$TOOLS_DIR_CXX" && break
20303done
20304
20305    CXX=$TOOLS_DIR_CXX
20306    PATH="$PATH_save"
20307  fi
20308
20309  # AC_PATH_PROGS can't be run multiple times with the same variable,
20310  # so create a new name for this run.
20311  if test "x$CXX" = x; then
20312    for ac_prog in $COMPILER_CHECK_LIST
20313do
20314  # Extract the first word of "$ac_prog", so it can be a program name with args.
20315set dummy $ac_prog; ac_word=$2
20316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20317$as_echo_n "checking for $ac_word... " >&6; }
20318if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20319  $as_echo_n "(cached) " >&6
20320else
20321  case $POTENTIAL_CXX in
20322  [\\/]* | ?:[\\/]*)
20323  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20324  ;;
20325  *)
20326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20327for as_dir in $PATH
20328do
20329  IFS=$as_save_IFS
20330  test -z "$as_dir" && as_dir=.
20331    for ac_exec_ext in '' $ac_executable_extensions; do
20332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20333    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20335    break 2
20336  fi
20337done
20338  done
20339IFS=$as_save_IFS
20340
20341  ;;
20342esac
20343fi
20344POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20345if test -n "$POTENTIAL_CXX"; then
20346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20347$as_echo "$POTENTIAL_CXX" >&6; }
20348else
20349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20350$as_echo "no" >&6; }
20351fi
20352
20353
20354  test -n "$POTENTIAL_CXX" && break
20355done
20356
20357    CXX=$POTENTIAL_CXX
20358  fi
20359
20360  if test "x$CXX" = x; then
20361
20362    # Print a helpful message on how to acquire the necessary build dependency.
20363    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20364    MISSING_DEPENDENCY=devkit
20365    PKGHANDLER_COMMAND=
20366
20367    case $PKGHANDLER in
20368	apt-get)
20369                apt_help     $MISSING_DEPENDENCY ;;
20370    yum)
20371                yum_help     $MISSING_DEPENDENCY ;;
20372	port)
20373                port_help    $MISSING_DEPENDENCY ;;
20374	pkgutil)
20375                pkgutil_help $MISSING_DEPENDENCY ;;
20376	pkgadd)
20377                pkgadd_help  $MISSING_DEPENDENCY ;;
20378    * )
20379      break ;;
20380    esac
20381
20382    if test "x$PKGHANDLER_COMMAND" != x; then
20383        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20384    fi
20385
20386      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20387  fi
20388
20389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20390
20391  # First separate the path from the arguments. This will split at the first
20392  # space.
20393  complete="$CXX"
20394  path="${complete%% *}"
20395  tmp="$complete EOL"
20396  arguments="${tmp#* }"
20397
20398  # Input might be given as Windows format, start by converting to
20399  # unix format.
20400  new_path=`$CYGPATH -u "$path"`
20401
20402  # Now try to locate executable using which
20403  new_path=`$WHICH "$new_path" 2> /dev/null`
20404  # bat and cmd files are not always considered executable in cygwin causing which
20405  # to not find them
20406  if test "x$new_path" = x \
20407           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20408           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20409    new_path=`$CYGPATH -u "$path"`
20410  fi
20411  if test "x$new_path" = x; then
20412    # Oops. Which didn't find the executable.
20413    # The splitting of arguments from the executable at a space might have been incorrect,
20414    # since paths with space are more likely in Windows. Give it another try with the whole
20415    # argument.
20416    path="$complete"
20417    arguments="EOL"
20418    new_path=`$CYGPATH -u "$path"`
20419    new_path=`$WHICH "$new_path" 2> /dev/null`
20420    # bat and cmd files are not always considered executable in cygwin causing which
20421    # to not find them
20422    if test "x$new_path" = x \
20423             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20424             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20425      new_path=`$CYGPATH -u "$path"`
20426    fi
20427    if test "x$new_path" = x; then
20428      # It's still not found. Now this is an unrecoverable error.
20429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20430$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20431      has_space=`$ECHO "$complete" | $GREP " "`
20432      if test "x$has_space" != x; then
20433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20435      fi
20436      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20437    fi
20438  fi
20439
20440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20443  # "foo.exe" is OK but "foo" is an error.
20444  #
20445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20446  # It is also a way to make sure we got the proper file name for the real test later on.
20447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20448  if test "x$test_shortpath" = x; then
20449    # Short path failed, file does not exist as specified.
20450    # Try adding .exe or .cmd
20451    if test -f "${new_path}.exe"; then
20452       input_to_shortpath="${new_path}.exe"
20453    elif test -f "${new_path}.cmd"; then
20454       input_to_shortpath="${new_path}.cmd"
20455    else
20456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20457$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20460      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20461    fi
20462  else
20463    input_to_shortpath="$new_path"
20464  fi
20465
20466  # Call helper function which possibly converts this using DOS-style short mode.
20467  # If so, the updated path is stored in $new_path.
20468  new_path="$input_to_shortpath"
20469
20470  input_path="$input_to_shortpath"
20471  # Check if we need to convert this using DOS-style short mode. If the path
20472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20473  # take no chances and rewrite it.
20474  # Note: m4 eats our [], so we need to use [ and ] instead.
20475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20476  if test "x$has_forbidden_chars" != x; then
20477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20481      # Going to short mode and back again did indeed matter. Since short mode is
20482      # case insensitive, let's make it lowercase to improve readability.
20483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20484      # Now convert it back to Unix-stile (cygpath)
20485      input_path=`$CYGPATH -u "$shortmode_path"`
20486      new_path="$input_path"
20487    fi
20488  fi
20489
20490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20491  if test "x$test_cygdrive_prefix" = x; then
20492    # As a simple fix, exclude /usr/bin since it's not a real path.
20493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20495      # a path prefixed by /cygdrive for fixpath to work.
20496      new_path="$CYGWIN_ROOT_PATH$input_path"
20497    fi
20498  fi
20499
20500  # remove trailing .exe if any
20501  new_path="${new_path/%.exe/}"
20502
20503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20504
20505  # First separate the path from the arguments. This will split at the first
20506  # space.
20507  complete="$CXX"
20508  path="${complete%% *}"
20509  tmp="$complete EOL"
20510  arguments="${tmp#* }"
20511
20512  # Input might be given as Windows format, start by converting to
20513  # unix format.
20514  new_path="$path"
20515
20516  windows_path="$new_path"
20517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20518    unix_path=`$CYGPATH -u "$windows_path"`
20519    new_path="$unix_path"
20520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20522    new_path="$unix_path"
20523  fi
20524
20525
20526  # Now try to locate executable using which
20527  new_path=`$WHICH "$new_path" 2> /dev/null`
20528
20529  if test "x$new_path" = x; then
20530    # Oops. Which didn't find the executable.
20531    # The splitting of arguments from the executable at a space might have been incorrect,
20532    # since paths with space are more likely in Windows. Give it another try with the whole
20533    # argument.
20534    path="$complete"
20535    arguments="EOL"
20536    new_path="$path"
20537
20538  windows_path="$new_path"
20539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20540    unix_path=`$CYGPATH -u "$windows_path"`
20541    new_path="$unix_path"
20542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20544    new_path="$unix_path"
20545  fi
20546
20547
20548    new_path=`$WHICH "$new_path" 2> /dev/null`
20549
20550    if test "x$new_path" = x; then
20551      # It's still not found. Now this is an unrecoverable error.
20552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20553$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20554      has_space=`$ECHO "$complete" | $GREP " "`
20555      if test "x$has_space" != x; then
20556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20558      fi
20559      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20560    fi
20561  fi
20562
20563  # Now new_path has a complete unix path to the binary
20564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20565    # Keep paths in /bin as-is, but remove trailing .exe if any
20566    new_path="${new_path/%.exe/}"
20567    # Do not save /bin paths to all_fixpath_prefixes!
20568  else
20569    # Not in mixed or Windows style, start by that.
20570    new_path=`cmd //c echo $new_path`
20571
20572  input_path="$new_path"
20573  # Check if we need to convert this using DOS-style short mode. If the path
20574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20575  # take no chances and rewrite it.
20576  # Note: m4 eats our [], so we need to use [ and ] instead.
20577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20578  if test "x$has_forbidden_chars" != x; then
20579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20581  fi
20582
20583    # Output is in $new_path
20584
20585  windows_path="$new_path"
20586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587    unix_path=`$CYGPATH -u "$windows_path"`
20588    new_path="$unix_path"
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20591    new_path="$unix_path"
20592  fi
20593
20594    # remove trailing .exe if any
20595    new_path="${new_path/%.exe/}"
20596
20597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20599  fi
20600
20601  else
20602    # We're on a posix platform. Hooray! :)
20603    # First separate the path from the arguments. This will split at the first
20604    # space.
20605    complete="$CXX"
20606    path="${complete%% *}"
20607    tmp="$complete EOL"
20608    arguments="${tmp#* }"
20609
20610    # Cannot rely on the command "which" here since it doesn't always work.
20611    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20612    if test -z "$is_absolute_path"; then
20613      # Path to executable is not absolute. Find it.
20614      IFS_save="$IFS"
20615      IFS=:
20616      for p in $PATH; do
20617        if test -f "$p/$path" && test -x "$p/$path"; then
20618          new_path="$p/$path"
20619          break
20620        fi
20621      done
20622      IFS="$IFS_save"
20623    else
20624      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20625$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20626      new_path="$path"
20627    fi
20628
20629    if test "x$new_path" = x; then
20630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20631$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20632        has_space=`$ECHO "$complete" | $GREP " "`
20633        if test "x$has_space" != x; then
20634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20636        fi
20637        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20638      fi
20639  fi
20640
20641      # Now join together the path and the arguments once again
20642      if test "x$arguments" != xEOL; then
20643        new_complete="$new_path ${arguments% *}"
20644      else
20645        new_complete="$new_path"
20646      fi
20647
20648  if test "x$complete" != "x$new_complete"; then
20649      CXX="$new_complete"
20650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20651$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20652    fi
20653
20654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20655$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20656  TEST_COMPILER="$CXX"
20657
20658    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20659        # Follow a chain of symbolic links. Use readlink
20660        # where it exists, else fall back to horribly
20661        # complicated shell code.
20662        if test "x$READLINK_TESTED" != yes; then
20663            # On MacOSX there is a readlink tool with a different
20664            # purpose than the GNU readlink tool. Check the found readlink.
20665            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20666            if test "x$ISGNU" = x; then
20667                 # A readlink that we do not know how to use.
20668                 # Are there other non-GNU readlinks out there?
20669                 READLINK_TESTED=yes
20670                 READLINK=
20671            fi
20672        fi
20673
20674        if test "x$READLINK" != x; then
20675            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20676        else
20677            # Save the current directory for restoring afterwards
20678            STARTDIR=$PWD
20679            COUNTER=0
20680            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20681            sym_link_file=`$BASENAME $TEST_COMPILER`
20682            # Use the system pwd and not the shell builtin to resolve directory symlinks
20683            cd $sym_link_dir
20684            cd `$THEPWDCMD`
20685            sym_link_dir=`$THEPWDCMD`
20686            # Resolve file symlinks
20687            while test $COUNTER -lt 20; do
20688                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20689                if test "x$ISLINK" == x; then
20690                    # This is not a symbolic link! We are done!
20691                    break
20692                fi
20693                # Again resolve directory symlinks since the target of the just found
20694                # link could be in a different directory
20695                cd `$DIRNAME $ISLINK`
20696                sym_link_dir=`$THEPWDCMD`
20697                sym_link_file=`$BASENAME $ISLINK`
20698                let COUNTER=COUNTER+1
20699            done
20700            cd $STARTDIR
20701            TEST_COMPILER=$sym_link_dir/$sym_link_file
20702        fi
20703    fi
20704
20705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20706$as_echo "$TEST_COMPILER" >&6; }
20707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20708$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20709
20710  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20711  if test "x$COMPILER_BASENAME" = "xccache"; then
20712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20713$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20714    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20715    # We want to control ccache invocation ourselves, so ignore this cc and try
20716    # searching again.
20717
20718    # Remove the path to the fake ccache cc from the PATH
20719    RETRY_COMPILER_SAVED_PATH="$PATH"
20720    COMPILER_DIRNAME=`$DIRNAME $CXX`
20721    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20722
20723    # Try again looking for our compiler
20724    if test -n "$ac_tool_prefix"; then
20725  for ac_prog in $COMPILER_CHECK_LIST
20726  do
20727    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20730$as_echo_n "checking for $ac_word... " >&6; }
20731if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20732  $as_echo_n "(cached) " >&6
20733else
20734  if test -n "$PROPER_COMPILER_CXX"; then
20735  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20736else
20737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20738for as_dir in $PATH
20739do
20740  IFS=$as_save_IFS
20741  test -z "$as_dir" && as_dir=.
20742    for ac_exec_ext in '' $ac_executable_extensions; do
20743  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20744    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20746    break 2
20747  fi
20748done
20749  done
20750IFS=$as_save_IFS
20751
20752fi
20753fi
20754PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20755if test -n "$PROPER_COMPILER_CXX"; then
20756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20757$as_echo "$PROPER_COMPILER_CXX" >&6; }
20758else
20759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20760$as_echo "no" >&6; }
20761fi
20762
20763
20764    test -n "$PROPER_COMPILER_CXX" && break
20765  done
20766fi
20767if test -z "$PROPER_COMPILER_CXX"; then
20768  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20769  for ac_prog in $COMPILER_CHECK_LIST
20770do
20771  # Extract the first word of "$ac_prog", so it can be a program name with args.
20772set dummy $ac_prog; ac_word=$2
20773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20774$as_echo_n "checking for $ac_word... " >&6; }
20775if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20776  $as_echo_n "(cached) " >&6
20777else
20778  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20779  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20780else
20781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20782for as_dir in $PATH
20783do
20784  IFS=$as_save_IFS
20785  test -z "$as_dir" && as_dir=.
20786    for ac_exec_ext in '' $ac_executable_extensions; do
20787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20788    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20790    break 2
20791  fi
20792done
20793  done
20794IFS=$as_save_IFS
20795
20796fi
20797fi
20798ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20799if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20801$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20802else
20803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20804$as_echo "no" >&6; }
20805fi
20806
20807
20808  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20809done
20810
20811  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20812    PROPER_COMPILER_CXX=""
20813  else
20814    case $cross_compiling:$ac_tool_warned in
20815yes:)
20816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20818ac_tool_warned=yes ;;
20819esac
20820    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20821  fi
20822fi
20823
20824
20825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826
20827  # First separate the path from the arguments. This will split at the first
20828  # space.
20829  complete="$PROPER_COMPILER_CXX"
20830  path="${complete%% *}"
20831  tmp="$complete EOL"
20832  arguments="${tmp#* }"
20833
20834  # Input might be given as Windows format, start by converting to
20835  # unix format.
20836  new_path=`$CYGPATH -u "$path"`
20837
20838  # Now try to locate executable using which
20839  new_path=`$WHICH "$new_path" 2> /dev/null`
20840  # bat and cmd files are not always considered executable in cygwin causing which
20841  # to not find them
20842  if test "x$new_path" = x \
20843           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20844           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20845    new_path=`$CYGPATH -u "$path"`
20846  fi
20847  if test "x$new_path" = x; then
20848    # Oops. Which didn't find the executable.
20849    # The splitting of arguments from the executable at a space might have been incorrect,
20850    # since paths with space are more likely in Windows. Give it another try with the whole
20851    # argument.
20852    path="$complete"
20853    arguments="EOL"
20854    new_path=`$CYGPATH -u "$path"`
20855    new_path=`$WHICH "$new_path" 2> /dev/null`
20856    # bat and cmd files are not always considered executable in cygwin causing which
20857    # to not find them
20858    if test "x$new_path" = x \
20859             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20860             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20861      new_path=`$CYGPATH -u "$path"`
20862    fi
20863    if test "x$new_path" = x; then
20864      # It's still not found. Now this is an unrecoverable error.
20865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20866$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20867      has_space=`$ECHO "$complete" | $GREP " "`
20868      if test "x$has_space" != x; then
20869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20871      fi
20872      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20873    fi
20874  fi
20875
20876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20879  # "foo.exe" is OK but "foo" is an error.
20880  #
20881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20882  # It is also a way to make sure we got the proper file name for the real test later on.
20883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20884  if test "x$test_shortpath" = x; then
20885    # Short path failed, file does not exist as specified.
20886    # Try adding .exe or .cmd
20887    if test -f "${new_path}.exe"; then
20888       input_to_shortpath="${new_path}.exe"
20889    elif test -f "${new_path}.cmd"; then
20890       input_to_shortpath="${new_path}.cmd"
20891    else
20892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20893$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20896      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20897    fi
20898  else
20899    input_to_shortpath="$new_path"
20900  fi
20901
20902  # Call helper function which possibly converts this using DOS-style short mode.
20903  # If so, the updated path is stored in $new_path.
20904  new_path="$input_to_shortpath"
20905
20906  input_path="$input_to_shortpath"
20907  # Check if we need to convert this using DOS-style short mode. If the path
20908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20909  # take no chances and rewrite it.
20910  # Note: m4 eats our [], so we need to use [ and ] instead.
20911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20912  if test "x$has_forbidden_chars" != x; then
20913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20917      # Going to short mode and back again did indeed matter. Since short mode is
20918      # case insensitive, let's make it lowercase to improve readability.
20919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20920      # Now convert it back to Unix-stile (cygpath)
20921      input_path=`$CYGPATH -u "$shortmode_path"`
20922      new_path="$input_path"
20923    fi
20924  fi
20925
20926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20927  if test "x$test_cygdrive_prefix" = x; then
20928    # As a simple fix, exclude /usr/bin since it's not a real path.
20929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20931      # a path prefixed by /cygdrive for fixpath to work.
20932      new_path="$CYGWIN_ROOT_PATH$input_path"
20933    fi
20934  fi
20935
20936  # remove trailing .exe if any
20937  new_path="${new_path/%.exe/}"
20938
20939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20940
20941  # First separate the path from the arguments. This will split at the first
20942  # space.
20943  complete="$PROPER_COMPILER_CXX"
20944  path="${complete%% *}"
20945  tmp="$complete EOL"
20946  arguments="${tmp#* }"
20947
20948  # Input might be given as Windows format, start by converting to
20949  # unix format.
20950  new_path="$path"
20951
20952  windows_path="$new_path"
20953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20954    unix_path=`$CYGPATH -u "$windows_path"`
20955    new_path="$unix_path"
20956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20958    new_path="$unix_path"
20959  fi
20960
20961
20962  # Now try to locate executable using which
20963  new_path=`$WHICH "$new_path" 2> /dev/null`
20964
20965  if test "x$new_path" = x; then
20966    # Oops. Which didn't find the executable.
20967    # The splitting of arguments from the executable at a space might have been incorrect,
20968    # since paths with space are more likely in Windows. Give it another try with the whole
20969    # argument.
20970    path="$complete"
20971    arguments="EOL"
20972    new_path="$path"
20973
20974  windows_path="$new_path"
20975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20976    unix_path=`$CYGPATH -u "$windows_path"`
20977    new_path="$unix_path"
20978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20980    new_path="$unix_path"
20981  fi
20982
20983
20984    new_path=`$WHICH "$new_path" 2> /dev/null`
20985
20986    if test "x$new_path" = x; then
20987      # It's still not found. Now this is an unrecoverable error.
20988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20989$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20990      has_space=`$ECHO "$complete" | $GREP " "`
20991      if test "x$has_space" != x; then
20992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20994      fi
20995      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20996    fi
20997  fi
20998
20999  # Now new_path has a complete unix path to the binary
21000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21001    # Keep paths in /bin as-is, but remove trailing .exe if any
21002    new_path="${new_path/%.exe/}"
21003    # Do not save /bin paths to all_fixpath_prefixes!
21004  else
21005    # Not in mixed or Windows style, start by that.
21006    new_path=`cmd //c echo $new_path`
21007
21008  input_path="$new_path"
21009  # Check if we need to convert this using DOS-style short mode. If the path
21010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21011  # take no chances and rewrite it.
21012  # Note: m4 eats our [], so we need to use [ and ] instead.
21013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21014  if test "x$has_forbidden_chars" != x; then
21015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21017  fi
21018
21019    # Output is in $new_path
21020
21021  windows_path="$new_path"
21022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21023    unix_path=`$CYGPATH -u "$windows_path"`
21024    new_path="$unix_path"
21025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21027    new_path="$unix_path"
21028  fi
21029
21030    # remove trailing .exe if any
21031    new_path="${new_path/%.exe/}"
21032
21033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21035  fi
21036
21037  else
21038    # We're on a posix platform. Hooray! :)
21039    # First separate the path from the arguments. This will split at the first
21040    # space.
21041    complete="$PROPER_COMPILER_CXX"
21042    path="${complete%% *}"
21043    tmp="$complete EOL"
21044    arguments="${tmp#* }"
21045
21046    # Cannot rely on the command "which" here since it doesn't always work.
21047    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21048    if test -z "$is_absolute_path"; then
21049      # Path to executable is not absolute. Find it.
21050      IFS_save="$IFS"
21051      IFS=:
21052      for p in $PATH; do
21053        if test -f "$p/$path" && test -x "$p/$path"; then
21054          new_path="$p/$path"
21055          break
21056        fi
21057      done
21058      IFS="$IFS_save"
21059    else
21060      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21061$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21062      new_path="$path"
21063    fi
21064
21065    if test "x$new_path" = x; then
21066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21067$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21068        has_space=`$ECHO "$complete" | $GREP " "`
21069        if test "x$has_space" != x; then
21070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21072        fi
21073        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21074      fi
21075  fi
21076
21077      # Now join together the path and the arguments once again
21078      if test "x$arguments" != xEOL; then
21079        new_complete="$new_path ${arguments% *}"
21080      else
21081        new_complete="$new_path"
21082      fi
21083
21084  if test "x$complete" != "x$new_complete"; then
21085      PROPER_COMPILER_CXX="$new_complete"
21086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21087$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21088    fi
21089
21090    PATH="$RETRY_COMPILER_SAVED_PATH"
21091
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21093$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21094
21095    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21096        # Follow a chain of symbolic links. Use readlink
21097        # where it exists, else fall back to horribly
21098        # complicated shell code.
21099        if test "x$READLINK_TESTED" != yes; then
21100            # On MacOSX there is a readlink tool with a different
21101            # purpose than the GNU readlink tool. Check the found readlink.
21102            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21103            if test "x$ISGNU" = x; then
21104                 # A readlink that we do not know how to use.
21105                 # Are there other non-GNU readlinks out there?
21106                 READLINK_TESTED=yes
21107                 READLINK=
21108            fi
21109        fi
21110
21111        if test "x$READLINK" != x; then
21112            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21113        else
21114            # Save the current directory for restoring afterwards
21115            STARTDIR=$PWD
21116            COUNTER=0
21117            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21118            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21119            # Use the system pwd and not the shell builtin to resolve directory symlinks
21120            cd $sym_link_dir
21121            cd `$THEPWDCMD`
21122            sym_link_dir=`$THEPWDCMD`
21123            # Resolve file symlinks
21124            while test $COUNTER -lt 20; do
21125                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21126                if test "x$ISLINK" == x; then
21127                    # This is not a symbolic link! We are done!
21128                    break
21129                fi
21130                # Again resolve directory symlinks since the target of the just found
21131                # link could be in a different directory
21132                cd `$DIRNAME $ISLINK`
21133                sym_link_dir=`$THEPWDCMD`
21134                sym_link_file=`$BASENAME $ISLINK`
21135                let COUNTER=COUNTER+1
21136            done
21137            cd $STARTDIR
21138            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21139        fi
21140    fi
21141
21142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21143$as_echo "$PROPER_COMPILER_CXX" >&6; }
21144    CXX="$PROPER_COMPILER_CXX"
21145  else
21146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21147$as_echo "no, keeping CXX" >&6; }
21148    CXX="$TEST_COMPILER"
21149  fi
21150
21151  COMPILER=$CXX
21152  COMPILER_NAME=$COMPILER_NAME
21153
21154  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21155    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21156    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21157    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21158    if test $? -ne 0; then
21159      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21160
21161      { $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
21162$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21163      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21164$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21165      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21166    else
21167      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21168      COMPILER_VENDOR="Sun Studio"
21169    fi
21170  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21171    # First line typically looks something like:
21172    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21173    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21174    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21175    COMPILER_VENDOR="Microsoft CL.EXE"
21176    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21177    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21178      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21179        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21180      fi
21181    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21182      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21183        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21184      fi
21185    fi
21186  else
21187    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21188    # Check that this is likely to be GCC.
21189    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21190    if test $? -ne 0; then
21191      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21194$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21195      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21196    fi
21197
21198    # First line typically looks something like:
21199    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21200    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21201    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21202  fi
21203  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21204  CXX_VERSION="$COMPILER_VERSION"
21205  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21206  CXX_VENDOR="$COMPILER_VENDOR"
21207
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21209$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21210
21211
21212# Now that we have resolved CXX ourself, let autoconf have its go at it
21213ac_ext=cpp
21214ac_cpp='$CXXCPP $CPPFLAGS'
21215ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21216ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21217ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21218if test -z "$CXX"; then
21219  if test -n "$CCC"; then
21220    CXX=$CCC
21221  else
21222    if test -n "$ac_tool_prefix"; then
21223  for ac_prog in $CXX
21224  do
21225    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21228$as_echo_n "checking for $ac_word... " >&6; }
21229if test "${ac_cv_prog_CXX+set}" = set; then :
21230  $as_echo_n "(cached) " >&6
21231else
21232  if test -n "$CXX"; then
21233  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21234else
21235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21236for as_dir in $PATH
21237do
21238  IFS=$as_save_IFS
21239  test -z "$as_dir" && as_dir=.
21240    for ac_exec_ext in '' $ac_executable_extensions; do
21241  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21242    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21244    break 2
21245  fi
21246done
21247  done
21248IFS=$as_save_IFS
21249
21250fi
21251fi
21252CXX=$ac_cv_prog_CXX
21253if test -n "$CXX"; then
21254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21255$as_echo "$CXX" >&6; }
21256else
21257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21258$as_echo "no" >&6; }
21259fi
21260
21261
21262    test -n "$CXX" && break
21263  done
21264fi
21265if test -z "$CXX"; then
21266  ac_ct_CXX=$CXX
21267  for ac_prog in $CXX
21268do
21269  # Extract the first word of "$ac_prog", so it can be a program name with args.
21270set dummy $ac_prog; ac_word=$2
21271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21272$as_echo_n "checking for $ac_word... " >&6; }
21273if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21274  $as_echo_n "(cached) " >&6
21275else
21276  if test -n "$ac_ct_CXX"; then
21277  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21278else
21279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21280for as_dir in $PATH
21281do
21282  IFS=$as_save_IFS
21283  test -z "$as_dir" && as_dir=.
21284    for ac_exec_ext in '' $ac_executable_extensions; do
21285  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21286    ac_cv_prog_ac_ct_CXX="$ac_prog"
21287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21288    break 2
21289  fi
21290done
21291  done
21292IFS=$as_save_IFS
21293
21294fi
21295fi
21296ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21297if test -n "$ac_ct_CXX"; then
21298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21299$as_echo "$ac_ct_CXX" >&6; }
21300else
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21302$as_echo "no" >&6; }
21303fi
21304
21305
21306  test -n "$ac_ct_CXX" && break
21307done
21308
21309  if test "x$ac_ct_CXX" = x; then
21310    CXX="g++"
21311  else
21312    case $cross_compiling:$ac_tool_warned in
21313yes:)
21314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21316ac_tool_warned=yes ;;
21317esac
21318    CXX=$ac_ct_CXX
21319  fi
21320fi
21321
21322  fi
21323fi
21324# Provide some information about the compiler.
21325$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21326set X $ac_compile
21327ac_compiler=$2
21328for ac_option in --version -v -V -qversion; do
21329  { { ac_try="$ac_compiler $ac_option >&5"
21330case "(($ac_try" in
21331  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21332  *) ac_try_echo=$ac_try;;
21333esac
21334eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21335$as_echo "$ac_try_echo"; } >&5
21336  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21337  ac_status=$?
21338  if test -s conftest.err; then
21339    sed '10a\
21340... rest of stderr output deleted ...
21341         10q' conftest.err >conftest.er1
21342    cat conftest.er1 >&5
21343  fi
21344  rm -f conftest.er1 conftest.err
21345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21346  test $ac_status = 0; }
21347done
21348
21349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21350$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21351if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21352  $as_echo_n "(cached) " >&6
21353else
21354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21355/* end confdefs.h.  */
21356
21357int
21358main ()
21359{
21360#ifndef __GNUC__
21361       choke me
21362#endif
21363
21364  ;
21365  return 0;
21366}
21367_ACEOF
21368if ac_fn_cxx_try_compile "$LINENO"; then :
21369  ac_compiler_gnu=yes
21370else
21371  ac_compiler_gnu=no
21372fi
21373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21374ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21375
21376fi
21377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21378$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21379if test $ac_compiler_gnu = yes; then
21380  GXX=yes
21381else
21382  GXX=
21383fi
21384ac_test_CXXFLAGS=${CXXFLAGS+set}
21385ac_save_CXXFLAGS=$CXXFLAGS
21386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21387$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21388if test "${ac_cv_prog_cxx_g+set}" = set; then :
21389  $as_echo_n "(cached) " >&6
21390else
21391  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21392   ac_cxx_werror_flag=yes
21393   ac_cv_prog_cxx_g=no
21394   CXXFLAGS="-g"
21395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21396/* end confdefs.h.  */
21397
21398int
21399main ()
21400{
21401
21402  ;
21403  return 0;
21404}
21405_ACEOF
21406if ac_fn_cxx_try_compile "$LINENO"; then :
21407  ac_cv_prog_cxx_g=yes
21408else
21409  CXXFLAGS=""
21410      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21411/* end confdefs.h.  */
21412
21413int
21414main ()
21415{
21416
21417  ;
21418  return 0;
21419}
21420_ACEOF
21421if ac_fn_cxx_try_compile "$LINENO"; then :
21422
21423else
21424  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21425	 CXXFLAGS="-g"
21426	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21427/* end confdefs.h.  */
21428
21429int
21430main ()
21431{
21432
21433  ;
21434  return 0;
21435}
21436_ACEOF
21437if ac_fn_cxx_try_compile "$LINENO"; then :
21438  ac_cv_prog_cxx_g=yes
21439fi
21440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21441fi
21442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21443fi
21444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21445   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21446fi
21447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21448$as_echo "$ac_cv_prog_cxx_g" >&6; }
21449if test "$ac_test_CXXFLAGS" = set; then
21450  CXXFLAGS=$ac_save_CXXFLAGS
21451elif test $ac_cv_prog_cxx_g = yes; then
21452  if test "$GXX" = yes; then
21453    CXXFLAGS="-g -O2"
21454  else
21455    CXXFLAGS="-g"
21456  fi
21457else
21458  if test "$GXX" = yes; then
21459    CXXFLAGS="-O2"
21460  else
21461    CXXFLAGS=
21462  fi
21463fi
21464ac_ext=cpp
21465ac_cpp='$CXXCPP $CPPFLAGS'
21466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21469
21470
21471### Locate other tools
21472
21473if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21474    ac_ext=m
21475ac_cpp='$OBJCPP $CPPFLAGS'
21476ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21477ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21478ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21479if test -n "$ac_tool_prefix"; then
21480  for ac_prog in gcc objcc objc cc CC
21481  do
21482    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21483set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21485$as_echo_n "checking for $ac_word... " >&6; }
21486if test "${ac_cv_prog_OBJC+set}" = set; then :
21487  $as_echo_n "(cached) " >&6
21488else
21489  if test -n "$OBJC"; then
21490  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21491else
21492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21493for as_dir in $PATH
21494do
21495  IFS=$as_save_IFS
21496  test -z "$as_dir" && as_dir=.
21497    for ac_exec_ext in '' $ac_executable_extensions; do
21498  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21499    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21501    break 2
21502  fi
21503done
21504  done
21505IFS=$as_save_IFS
21506
21507fi
21508fi
21509OBJC=$ac_cv_prog_OBJC
21510if test -n "$OBJC"; then
21511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21512$as_echo "$OBJC" >&6; }
21513else
21514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21515$as_echo "no" >&6; }
21516fi
21517
21518
21519    test -n "$OBJC" && break
21520  done
21521fi
21522if test -z "$OBJC"; then
21523  ac_ct_OBJC=$OBJC
21524  for ac_prog in gcc objcc objc cc CC
21525do
21526  # Extract the first word of "$ac_prog", so it can be a program name with args.
21527set dummy $ac_prog; ac_word=$2
21528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21529$as_echo_n "checking for $ac_word... " >&6; }
21530if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21531  $as_echo_n "(cached) " >&6
21532else
21533  if test -n "$ac_ct_OBJC"; then
21534  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21535else
21536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21537for as_dir in $PATH
21538do
21539  IFS=$as_save_IFS
21540  test -z "$as_dir" && as_dir=.
21541    for ac_exec_ext in '' $ac_executable_extensions; do
21542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21543    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21545    break 2
21546  fi
21547done
21548  done
21549IFS=$as_save_IFS
21550
21551fi
21552fi
21553ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21554if test -n "$ac_ct_OBJC"; then
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21556$as_echo "$ac_ct_OBJC" >&6; }
21557else
21558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21559$as_echo "no" >&6; }
21560fi
21561
21562
21563  test -n "$ac_ct_OBJC" && break
21564done
21565
21566  if test "x$ac_ct_OBJC" = x; then
21567    OBJC="gcc"
21568  else
21569    case $cross_compiling:$ac_tool_warned in
21570yes:)
21571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21573ac_tool_warned=yes ;;
21574esac
21575    OBJC=$ac_ct_OBJC
21576  fi
21577fi
21578
21579# Provide some information about the compiler.
21580$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21581set X $ac_compile
21582ac_compiler=$2
21583for ac_option in --version -v -V -qversion; do
21584  { { ac_try="$ac_compiler $ac_option >&5"
21585case "(($ac_try" in
21586  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21587  *) ac_try_echo=$ac_try;;
21588esac
21589eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21590$as_echo "$ac_try_echo"; } >&5
21591  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21592  ac_status=$?
21593  if test -s conftest.err; then
21594    sed '10a\
21595... rest of stderr output deleted ...
21596         10q' conftest.err >conftest.er1
21597    cat conftest.er1 >&5
21598  fi
21599  rm -f conftest.er1 conftest.err
21600  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21601  test $ac_status = 0; }
21602done
21603
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21605$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21606if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21610/* end confdefs.h.  */
21611
21612int
21613main ()
21614{
21615#ifndef __GNUC__
21616       choke me
21617#endif
21618
21619  ;
21620  return 0;
21621}
21622_ACEOF
21623if ac_fn_objc_try_compile "$LINENO"; then :
21624  ac_compiler_gnu=yes
21625else
21626  ac_compiler_gnu=no
21627fi
21628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21629ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21630
21631fi
21632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21633$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21634if test $ac_compiler_gnu = yes; then
21635  GOBJC=yes
21636else
21637  GOBJC=
21638fi
21639ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21640ac_save_OBJCFLAGS=$OBJCFLAGS
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21642$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21643if test "${ac_cv_prog_objc_g+set}" = set; then :
21644  $as_echo_n "(cached) " >&6
21645else
21646  ac_save_objc_werror_flag=$ac_objc_werror_flag
21647   ac_objc_werror_flag=yes
21648   ac_cv_prog_objc_g=no
21649   OBJCFLAGS="-g"
21650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651/* end confdefs.h.  */
21652
21653int
21654main ()
21655{
21656
21657  ;
21658  return 0;
21659}
21660_ACEOF
21661if ac_fn_objc_try_compile "$LINENO"; then :
21662  ac_cv_prog_objc_g=yes
21663else
21664  OBJCFLAGS=""
21665      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21666/* end confdefs.h.  */
21667
21668int
21669main ()
21670{
21671
21672  ;
21673  return 0;
21674}
21675_ACEOF
21676if ac_fn_objc_try_compile "$LINENO"; then :
21677
21678else
21679  ac_objc_werror_flag=$ac_save_objc_werror_flag
21680	 OBJCFLAGS="-g"
21681	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21682/* end confdefs.h.  */
21683
21684int
21685main ()
21686{
21687
21688  ;
21689  return 0;
21690}
21691_ACEOF
21692if ac_fn_objc_try_compile "$LINENO"; then :
21693  ac_cv_prog_objc_g=yes
21694fi
21695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21696fi
21697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21698fi
21699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21700   ac_objc_werror_flag=$ac_save_objc_werror_flag
21701fi
21702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21703$as_echo "$ac_cv_prog_objc_g" >&6; }
21704if test "$ac_test_OBJCFLAGS" = set; then
21705  OBJCFLAGS=$ac_save_OBJCFLAGS
21706elif test $ac_cv_prog_objc_g = yes; then
21707  if test "$GOBJC" = yes; then
21708    OBJCFLAGS="-g -O2"
21709  else
21710    OBJCFLAGS="-g"
21711  fi
21712else
21713  if test "$GOBJC" = yes; then
21714    OBJCFLAGS="-O2"
21715  else
21716    OBJCFLAGS=
21717  fi
21718fi
21719ac_ext=cpp
21720ac_cpp='$CXXCPP $CPPFLAGS'
21721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21724
21725
21726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21727
21728  # First separate the path from the arguments. This will split at the first
21729  # space.
21730  complete="$OBJC"
21731  path="${complete%% *}"
21732  tmp="$complete EOL"
21733  arguments="${tmp#* }"
21734
21735  # Input might be given as Windows format, start by converting to
21736  # unix format.
21737  new_path=`$CYGPATH -u "$path"`
21738
21739  # Now try to locate executable using which
21740  new_path=`$WHICH "$new_path" 2> /dev/null`
21741  # bat and cmd files are not always considered executable in cygwin causing which
21742  # to not find them
21743  if test "x$new_path" = x \
21744           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21745           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21746    new_path=`$CYGPATH -u "$path"`
21747  fi
21748  if test "x$new_path" = x; then
21749    # Oops. Which didn't find the executable.
21750    # The splitting of arguments from the executable at a space might have been incorrect,
21751    # since paths with space are more likely in Windows. Give it another try with the whole
21752    # argument.
21753    path="$complete"
21754    arguments="EOL"
21755    new_path=`$CYGPATH -u "$path"`
21756    new_path=`$WHICH "$new_path" 2> /dev/null`
21757    # bat and cmd files are not always considered executable in cygwin causing which
21758    # to not find them
21759    if test "x$new_path" = x \
21760             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21761             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21762      new_path=`$CYGPATH -u "$path"`
21763    fi
21764    if test "x$new_path" = x; then
21765      # It's still not found. Now this is an unrecoverable error.
21766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21767$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21768      has_space=`$ECHO "$complete" | $GREP " "`
21769      if test "x$has_space" != x; then
21770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21772      fi
21773      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21774    fi
21775  fi
21776
21777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21780  # "foo.exe" is OK but "foo" is an error.
21781  #
21782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21783  # It is also a way to make sure we got the proper file name for the real test later on.
21784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21785  if test "x$test_shortpath" = x; then
21786    # Short path failed, file does not exist as specified.
21787    # Try adding .exe or .cmd
21788    if test -f "${new_path}.exe"; then
21789       input_to_shortpath="${new_path}.exe"
21790    elif test -f "${new_path}.cmd"; then
21791       input_to_shortpath="${new_path}.cmd"
21792    else
21793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21794$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21797      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21798    fi
21799  else
21800    input_to_shortpath="$new_path"
21801  fi
21802
21803  # Call helper function which possibly converts this using DOS-style short mode.
21804  # If so, the updated path is stored in $new_path.
21805  new_path="$input_to_shortpath"
21806
21807  input_path="$input_to_shortpath"
21808  # Check if we need to convert this using DOS-style short mode. If the path
21809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21810  # take no chances and rewrite it.
21811  # Note: m4 eats our [], so we need to use [ and ] instead.
21812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21813  if test "x$has_forbidden_chars" != x; then
21814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21818      # Going to short mode and back again did indeed matter. Since short mode is
21819      # case insensitive, let's make it lowercase to improve readability.
21820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21821      # Now convert it back to Unix-stile (cygpath)
21822      input_path=`$CYGPATH -u "$shortmode_path"`
21823      new_path="$input_path"
21824    fi
21825  fi
21826
21827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21828  if test "x$test_cygdrive_prefix" = x; then
21829    # As a simple fix, exclude /usr/bin since it's not a real path.
21830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21832      # a path prefixed by /cygdrive for fixpath to work.
21833      new_path="$CYGWIN_ROOT_PATH$input_path"
21834    fi
21835  fi
21836
21837  # remove trailing .exe if any
21838  new_path="${new_path/%.exe/}"
21839
21840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21841
21842  # First separate the path from the arguments. This will split at the first
21843  # space.
21844  complete="$OBJC"
21845  path="${complete%% *}"
21846  tmp="$complete EOL"
21847  arguments="${tmp#* }"
21848
21849  # Input might be given as Windows format, start by converting to
21850  # unix format.
21851  new_path="$path"
21852
21853  windows_path="$new_path"
21854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21855    unix_path=`$CYGPATH -u "$windows_path"`
21856    new_path="$unix_path"
21857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21859    new_path="$unix_path"
21860  fi
21861
21862
21863  # Now try to locate executable using which
21864  new_path=`$WHICH "$new_path" 2> /dev/null`
21865
21866  if test "x$new_path" = x; then
21867    # Oops. Which didn't find the executable.
21868    # The splitting of arguments from the executable at a space might have been incorrect,
21869    # since paths with space are more likely in Windows. Give it another try with the whole
21870    # argument.
21871    path="$complete"
21872    arguments="EOL"
21873    new_path="$path"
21874
21875  windows_path="$new_path"
21876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21877    unix_path=`$CYGPATH -u "$windows_path"`
21878    new_path="$unix_path"
21879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21881    new_path="$unix_path"
21882  fi
21883
21884
21885    new_path=`$WHICH "$new_path" 2> /dev/null`
21886
21887    if test "x$new_path" = x; then
21888      # It's still not found. Now this is an unrecoverable error.
21889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21890$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21891      has_space=`$ECHO "$complete" | $GREP " "`
21892      if test "x$has_space" != x; then
21893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21895      fi
21896      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21897    fi
21898  fi
21899
21900  # Now new_path has a complete unix path to the binary
21901  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21902    # Keep paths in /bin as-is, but remove trailing .exe if any
21903    new_path="${new_path/%.exe/}"
21904    # Do not save /bin paths to all_fixpath_prefixes!
21905  else
21906    # Not in mixed or Windows style, start by that.
21907    new_path=`cmd //c echo $new_path`
21908
21909  input_path="$new_path"
21910  # Check if we need to convert this using DOS-style short mode. If the path
21911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21912  # take no chances and rewrite it.
21913  # Note: m4 eats our [], so we need to use [ and ] instead.
21914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21915  if test "x$has_forbidden_chars" != x; then
21916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21918  fi
21919
21920    # Output is in $new_path
21921
21922  windows_path="$new_path"
21923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21924    unix_path=`$CYGPATH -u "$windows_path"`
21925    new_path="$unix_path"
21926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21928    new_path="$unix_path"
21929  fi
21930
21931    # remove trailing .exe if any
21932    new_path="${new_path/%.exe/}"
21933
21934    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21935    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21936  fi
21937
21938  else
21939    # We're on a posix platform. Hooray! :)
21940    # First separate the path from the arguments. This will split at the first
21941    # space.
21942    complete="$OBJC"
21943    path="${complete%% *}"
21944    tmp="$complete EOL"
21945    arguments="${tmp#* }"
21946
21947    # Cannot rely on the command "which" here since it doesn't always work.
21948    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21949    if test -z "$is_absolute_path"; then
21950      # Path to executable is not absolute. Find it.
21951      IFS_save="$IFS"
21952      IFS=:
21953      for p in $PATH; do
21954        if test -f "$p/$path" && test -x "$p/$path"; then
21955          new_path="$p/$path"
21956          break
21957        fi
21958      done
21959      IFS="$IFS_save"
21960    else
21961      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21962$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21963      new_path="$path"
21964    fi
21965
21966    if test "x$new_path" = x; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21968$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21969        has_space=`$ECHO "$complete" | $GREP " "`
21970        if test "x$has_space" != x; then
21971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21973        fi
21974        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21975      fi
21976  fi
21977
21978      # Now join together the path and the arguments once again
21979      if test "x$arguments" != xEOL; then
21980        new_complete="$new_path ${arguments% *}"
21981      else
21982        new_complete="$new_path"
21983      fi
21984
21985  if test "x$complete" != "x$new_complete"; then
21986      OBJC="$new_complete"
21987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21988$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21989    fi
21990
21991else
21992    OBJC=
21993fi
21994
21995# Restore the flags to the user specified values.
21996# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21997CFLAGS="$ORG_CFLAGS"
21998CXXFLAGS="$ORG_CXXFLAGS"
21999OBJCFLAGS="$ORG_OBJCFLAGS"
22000
22001LD="$CC"
22002LDEXE="$CC"
22003LDCXX="$CXX"
22004LDEXECXX="$CXX"
22005
22006# LDEXE is the linker to use, when creating executables.
22007
22008# Linking C++ libraries.
22009
22010# Linking C++ executables.
22011
22012
22013if test "x$OPENJDK_TARGET_OS" != xwindows; then
22014    if test -n "$ac_tool_prefix"; then
22015  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22016set dummy ${ac_tool_prefix}ar; ac_word=$2
22017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22018$as_echo_n "checking for $ac_word... " >&6; }
22019if test "${ac_cv_prog_AR+set}" = set; then :
22020  $as_echo_n "(cached) " >&6
22021else
22022  if test -n "$AR"; then
22023  ac_cv_prog_AR="$AR" # Let the user override the test.
22024else
22025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22026for as_dir in $PATH
22027do
22028  IFS=$as_save_IFS
22029  test -z "$as_dir" && as_dir=.
22030    for ac_exec_ext in '' $ac_executable_extensions; do
22031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22032    ac_cv_prog_AR="${ac_tool_prefix}ar"
22033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22034    break 2
22035  fi
22036done
22037  done
22038IFS=$as_save_IFS
22039
22040fi
22041fi
22042AR=$ac_cv_prog_AR
22043if test -n "$AR"; then
22044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22045$as_echo "$AR" >&6; }
22046else
22047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22048$as_echo "no" >&6; }
22049fi
22050
22051
22052fi
22053if test -z "$ac_cv_prog_AR"; then
22054  ac_ct_AR=$AR
22055  # Extract the first word of "ar", so it can be a program name with args.
22056set dummy ar; ac_word=$2
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22058$as_echo_n "checking for $ac_word... " >&6; }
22059if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22060  $as_echo_n "(cached) " >&6
22061else
22062  if test -n "$ac_ct_AR"; then
22063  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22064else
22065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22066for as_dir in $PATH
22067do
22068  IFS=$as_save_IFS
22069  test -z "$as_dir" && as_dir=.
22070    for ac_exec_ext in '' $ac_executable_extensions; do
22071  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22072    ac_cv_prog_ac_ct_AR="ar"
22073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22074    break 2
22075  fi
22076done
22077  done
22078IFS=$as_save_IFS
22079
22080fi
22081fi
22082ac_ct_AR=$ac_cv_prog_ac_ct_AR
22083if test -n "$ac_ct_AR"; then
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22085$as_echo "$ac_ct_AR" >&6; }
22086else
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22088$as_echo "no" >&6; }
22089fi
22090
22091  if test "x$ac_ct_AR" = x; then
22092    AR=""
22093  else
22094    case $cross_compiling:$ac_tool_warned in
22095yes:)
22096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22098ac_tool_warned=yes ;;
22099esac
22100    AR=$ac_ct_AR
22101  fi
22102else
22103  AR="$ac_cv_prog_AR"
22104fi
22105
22106
22107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22108
22109  # First separate the path from the arguments. This will split at the first
22110  # space.
22111  complete="$AR"
22112  path="${complete%% *}"
22113  tmp="$complete EOL"
22114  arguments="${tmp#* }"
22115
22116  # Input might be given as Windows format, start by converting to
22117  # unix format.
22118  new_path=`$CYGPATH -u "$path"`
22119
22120  # Now try to locate executable using which
22121  new_path=`$WHICH "$new_path" 2> /dev/null`
22122  # bat and cmd files are not always considered executable in cygwin causing which
22123  # to not find them
22124  if test "x$new_path" = x \
22125           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22126           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22127    new_path=`$CYGPATH -u "$path"`
22128  fi
22129  if test "x$new_path" = x; then
22130    # Oops. Which didn't find the executable.
22131    # The splitting of arguments from the executable at a space might have been incorrect,
22132    # since paths with space are more likely in Windows. Give it another try with the whole
22133    # argument.
22134    path="$complete"
22135    arguments="EOL"
22136    new_path=`$CYGPATH -u "$path"`
22137    new_path=`$WHICH "$new_path" 2> /dev/null`
22138    # bat and cmd files are not always considered executable in cygwin causing which
22139    # to not find them
22140    if test "x$new_path" = x \
22141             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22142             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22143      new_path=`$CYGPATH -u "$path"`
22144    fi
22145    if test "x$new_path" = x; then
22146      # It's still not found. Now this is an unrecoverable error.
22147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22148$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22149      has_space=`$ECHO "$complete" | $GREP " "`
22150      if test "x$has_space" != x; then
22151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22153      fi
22154      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22155    fi
22156  fi
22157
22158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22161  # "foo.exe" is OK but "foo" is an error.
22162  #
22163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22164  # It is also a way to make sure we got the proper file name for the real test later on.
22165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22166  if test "x$test_shortpath" = x; then
22167    # Short path failed, file does not exist as specified.
22168    # Try adding .exe or .cmd
22169    if test -f "${new_path}.exe"; then
22170       input_to_shortpath="${new_path}.exe"
22171    elif test -f "${new_path}.cmd"; then
22172       input_to_shortpath="${new_path}.cmd"
22173    else
22174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22175$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22176      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22177$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22178      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22179    fi
22180  else
22181    input_to_shortpath="$new_path"
22182  fi
22183
22184  # Call helper function which possibly converts this using DOS-style short mode.
22185  # If so, the updated path is stored in $new_path.
22186  new_path="$input_to_shortpath"
22187
22188  input_path="$input_to_shortpath"
22189  # Check if we need to convert this using DOS-style short mode. If the path
22190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22191  # take no chances and rewrite it.
22192  # Note: m4 eats our [], so we need to use [ and ] instead.
22193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22194  if test "x$has_forbidden_chars" != x; then
22195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22199      # Going to short mode and back again did indeed matter. Since short mode is
22200      # case insensitive, let's make it lowercase to improve readability.
22201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22202      # Now convert it back to Unix-stile (cygpath)
22203      input_path=`$CYGPATH -u "$shortmode_path"`
22204      new_path="$input_path"
22205    fi
22206  fi
22207
22208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22209  if test "x$test_cygdrive_prefix" = x; then
22210    # As a simple fix, exclude /usr/bin since it's not a real path.
22211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22213      # a path prefixed by /cygdrive for fixpath to work.
22214      new_path="$CYGWIN_ROOT_PATH$input_path"
22215    fi
22216  fi
22217
22218  # remove trailing .exe if any
22219  new_path="${new_path/%.exe/}"
22220
22221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22222
22223  # First separate the path from the arguments. This will split at the first
22224  # space.
22225  complete="$AR"
22226  path="${complete%% *}"
22227  tmp="$complete EOL"
22228  arguments="${tmp#* }"
22229
22230  # Input might be given as Windows format, start by converting to
22231  # unix format.
22232  new_path="$path"
22233
22234  windows_path="$new_path"
22235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22236    unix_path=`$CYGPATH -u "$windows_path"`
22237    new_path="$unix_path"
22238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22240    new_path="$unix_path"
22241  fi
22242
22243
22244  # Now try to locate executable using which
22245  new_path=`$WHICH "$new_path" 2> /dev/null`
22246
22247  if test "x$new_path" = x; then
22248    # Oops. Which didn't find the executable.
22249    # The splitting of arguments from the executable at a space might have been incorrect,
22250    # since paths with space are more likely in Windows. Give it another try with the whole
22251    # argument.
22252    path="$complete"
22253    arguments="EOL"
22254    new_path="$path"
22255
22256  windows_path="$new_path"
22257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22258    unix_path=`$CYGPATH -u "$windows_path"`
22259    new_path="$unix_path"
22260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22262    new_path="$unix_path"
22263  fi
22264
22265
22266    new_path=`$WHICH "$new_path" 2> /dev/null`
22267
22268    if test "x$new_path" = x; then
22269      # It's still not found. Now this is an unrecoverable error.
22270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22271$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22272      has_space=`$ECHO "$complete" | $GREP " "`
22273      if test "x$has_space" != x; then
22274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22276      fi
22277      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22278    fi
22279  fi
22280
22281  # Now new_path has a complete unix path to the binary
22282  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22283    # Keep paths in /bin as-is, but remove trailing .exe if any
22284    new_path="${new_path/%.exe/}"
22285    # Do not save /bin paths to all_fixpath_prefixes!
22286  else
22287    # Not in mixed or Windows style, start by that.
22288    new_path=`cmd //c echo $new_path`
22289
22290  input_path="$new_path"
22291  # Check if we need to convert this using DOS-style short mode. If the path
22292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22293  # take no chances and rewrite it.
22294  # Note: m4 eats our [], so we need to use [ and ] instead.
22295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22296  if test "x$has_forbidden_chars" != x; then
22297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22299  fi
22300
22301    # Output is in $new_path
22302
22303  windows_path="$new_path"
22304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22305    unix_path=`$CYGPATH -u "$windows_path"`
22306    new_path="$unix_path"
22307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22309    new_path="$unix_path"
22310  fi
22311
22312    # remove trailing .exe if any
22313    new_path="${new_path/%.exe/}"
22314
22315    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22316    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22317  fi
22318
22319  else
22320    # We're on a posix platform. Hooray! :)
22321    # First separate the path from the arguments. This will split at the first
22322    # space.
22323    complete="$AR"
22324    path="${complete%% *}"
22325    tmp="$complete EOL"
22326    arguments="${tmp#* }"
22327
22328    # Cannot rely on the command "which" here since it doesn't always work.
22329    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22330    if test -z "$is_absolute_path"; then
22331      # Path to executable is not absolute. Find it.
22332      IFS_save="$IFS"
22333      IFS=:
22334      for p in $PATH; do
22335        if test -f "$p/$path" && test -x "$p/$path"; then
22336          new_path="$p/$path"
22337          break
22338        fi
22339      done
22340      IFS="$IFS_save"
22341    else
22342      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22343$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22344      new_path="$path"
22345    fi
22346
22347    if test "x$new_path" = x; then
22348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22349$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22350        has_space=`$ECHO "$complete" | $GREP " "`
22351        if test "x$has_space" != x; then
22352          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22353$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22354        fi
22355        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22356      fi
22357  fi
22358
22359      # Now join together the path and the arguments once again
22360      if test "x$arguments" != xEOL; then
22361        new_complete="$new_path ${arguments% *}"
22362      else
22363        new_complete="$new_path"
22364      fi
22365
22366  if test "x$complete" != "x$new_complete"; then
22367      AR="$new_complete"
22368      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22369$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22370    fi
22371
22372fi
22373if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22374    ARFLAGS="-r"
22375else
22376    ARFLAGS=""
22377fi
22378
22379
22380# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22381HOTSPOT_CXX="$CXX"
22382HOTSPOT_LD="$LD"
22383
22384
22385
22386COMPILER_NAME=gcc
22387COMPILER_TYPE=CC
22388if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22389
22390    # For now, assume that we are always compiling using cl.exe.
22391    CC_OUT_OPTION=-Fo
22392    EXE_OUT_OPTION=-out:
22393    LD_OUT_OPTION=-out:
22394    AR_OUT_OPTION=-out:
22395    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22396    # program for something completely different.
22397    # Extract the first word of "link", so it can be a program name with args.
22398set dummy link; ac_word=$2
22399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22400$as_echo_n "checking for $ac_word... " >&6; }
22401if test "${ac_cv_prog_WINLD+set}" = set; then :
22402  $as_echo_n "(cached) " >&6
22403else
22404  if test -n "$WINLD"; then
22405  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22406else
22407  ac_prog_rejected=no
22408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22409for as_dir in $PATH
22410do
22411  IFS=$as_save_IFS
22412  test -z "$as_dir" && as_dir=.
22413    for ac_exec_ext in '' $ac_executable_extensions; do
22414  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22415    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22416       ac_prog_rejected=yes
22417       continue
22418     fi
22419    ac_cv_prog_WINLD="link"
22420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22421    break 2
22422  fi
22423done
22424  done
22425IFS=$as_save_IFS
22426
22427if test $ac_prog_rejected = yes; then
22428  # We found a bogon in the path, so make sure we never use it.
22429  set dummy $ac_cv_prog_WINLD
22430  shift
22431  if test $# != 0; then
22432    # We chose a different compiler from the bogus one.
22433    # However, it has the same basename, so the bogon will be chosen
22434    # first if we set WINLD to just the basename; use the full file name.
22435    shift
22436    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22437  fi
22438fi
22439fi
22440fi
22441WINLD=$ac_cv_prog_WINLD
22442if test -n "$WINLD"; then
22443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22444$as_echo "$WINLD" >&6; }
22445else
22446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22447$as_echo "no" >&6; }
22448fi
22449
22450
22451    # Since we must ignore the first found link, WINLD will contain
22452    # the full path to the link.exe program.
22453
22454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22455
22456  # First separate the path from the arguments. This will split at the first
22457  # space.
22458  complete="$WINLD"
22459  path="${complete%% *}"
22460  tmp="$complete EOL"
22461  arguments="${tmp#* }"
22462
22463  # Input might be given as Windows format, start by converting to
22464  # unix format.
22465  new_path=`$CYGPATH -u "$path"`
22466
22467  # Now try to locate executable using which
22468  new_path=`$WHICH "$new_path" 2> /dev/null`
22469  # bat and cmd files are not always considered executable in cygwin causing which
22470  # to not find them
22471  if test "x$new_path" = x \
22472           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22473           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22474    new_path=`$CYGPATH -u "$path"`
22475  fi
22476  if test "x$new_path" = x; then
22477    # Oops. Which didn't find the executable.
22478    # The splitting of arguments from the executable at a space might have been incorrect,
22479    # since paths with space are more likely in Windows. Give it another try with the whole
22480    # argument.
22481    path="$complete"
22482    arguments="EOL"
22483    new_path=`$CYGPATH -u "$path"`
22484    new_path=`$WHICH "$new_path" 2> /dev/null`
22485    # bat and cmd files are not always considered executable in cygwin causing which
22486    # to not find them
22487    if test "x$new_path" = x \
22488             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22489             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22490      new_path=`$CYGPATH -u "$path"`
22491    fi
22492    if test "x$new_path" = x; then
22493      # It's still not found. Now this is an unrecoverable error.
22494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22495$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22496      has_space=`$ECHO "$complete" | $GREP " "`
22497      if test "x$has_space" != x; then
22498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22500      fi
22501      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22502    fi
22503  fi
22504
22505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22508  # "foo.exe" is OK but "foo" is an error.
22509  #
22510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22511  # It is also a way to make sure we got the proper file name for the real test later on.
22512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22513  if test "x$test_shortpath" = x; then
22514    # Short path failed, file does not exist as specified.
22515    # Try adding .exe or .cmd
22516    if test -f "${new_path}.exe"; then
22517       input_to_shortpath="${new_path}.exe"
22518    elif test -f "${new_path}.cmd"; then
22519       input_to_shortpath="${new_path}.cmd"
22520    else
22521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22522$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22525      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22526    fi
22527  else
22528    input_to_shortpath="$new_path"
22529  fi
22530
22531  # Call helper function which possibly converts this using DOS-style short mode.
22532  # If so, the updated path is stored in $new_path.
22533  new_path="$input_to_shortpath"
22534
22535  input_path="$input_to_shortpath"
22536  # Check if we need to convert this using DOS-style short mode. If the path
22537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22538  # take no chances and rewrite it.
22539  # Note: m4 eats our [], so we need to use [ and ] instead.
22540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22541  if test "x$has_forbidden_chars" != x; then
22542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22546      # Going to short mode and back again did indeed matter. Since short mode is
22547      # case insensitive, let's make it lowercase to improve readability.
22548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22549      # Now convert it back to Unix-stile (cygpath)
22550      input_path=`$CYGPATH -u "$shortmode_path"`
22551      new_path="$input_path"
22552    fi
22553  fi
22554
22555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22556  if test "x$test_cygdrive_prefix" = x; then
22557    # As a simple fix, exclude /usr/bin since it's not a real path.
22558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22560      # a path prefixed by /cygdrive for fixpath to work.
22561      new_path="$CYGWIN_ROOT_PATH$input_path"
22562    fi
22563  fi
22564
22565  # remove trailing .exe if any
22566  new_path="${new_path/%.exe/}"
22567
22568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22569
22570  # First separate the path from the arguments. This will split at the first
22571  # space.
22572  complete="$WINLD"
22573  path="${complete%% *}"
22574  tmp="$complete EOL"
22575  arguments="${tmp#* }"
22576
22577  # Input might be given as Windows format, start by converting to
22578  # unix format.
22579  new_path="$path"
22580
22581  windows_path="$new_path"
22582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22583    unix_path=`$CYGPATH -u "$windows_path"`
22584    new_path="$unix_path"
22585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22587    new_path="$unix_path"
22588  fi
22589
22590
22591  # Now try to locate executable using which
22592  new_path=`$WHICH "$new_path" 2> /dev/null`
22593
22594  if test "x$new_path" = x; then
22595    # Oops. Which didn't find the executable.
22596    # The splitting of arguments from the executable at a space might have been incorrect,
22597    # since paths with space are more likely in Windows. Give it another try with the whole
22598    # argument.
22599    path="$complete"
22600    arguments="EOL"
22601    new_path="$path"
22602
22603  windows_path="$new_path"
22604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22605    unix_path=`$CYGPATH -u "$windows_path"`
22606    new_path="$unix_path"
22607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22609    new_path="$unix_path"
22610  fi
22611
22612
22613    new_path=`$WHICH "$new_path" 2> /dev/null`
22614
22615    if test "x$new_path" = x; then
22616      # It's still not found. Now this is an unrecoverable error.
22617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22618$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22619      has_space=`$ECHO "$complete" | $GREP " "`
22620      if test "x$has_space" != x; then
22621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22623      fi
22624      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22625    fi
22626  fi
22627
22628  # Now new_path has a complete unix path to the binary
22629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22630    # Keep paths in /bin as-is, but remove trailing .exe if any
22631    new_path="${new_path/%.exe/}"
22632    # Do not save /bin paths to all_fixpath_prefixes!
22633  else
22634    # Not in mixed or Windows style, start by that.
22635    new_path=`cmd //c echo $new_path`
22636
22637  input_path="$new_path"
22638  # Check if we need to convert this using DOS-style short mode. If the path
22639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22640  # take no chances and rewrite it.
22641  # Note: m4 eats our [], so we need to use [ and ] instead.
22642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22643  if test "x$has_forbidden_chars" != x; then
22644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22646  fi
22647
22648    # Output is in $new_path
22649
22650  windows_path="$new_path"
22651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22652    unix_path=`$CYGPATH -u "$windows_path"`
22653    new_path="$unix_path"
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22656    new_path="$unix_path"
22657  fi
22658
22659    # remove trailing .exe if any
22660    new_path="${new_path/%.exe/}"
22661
22662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22664  fi
22665
22666  else
22667    # We're on a posix platform. Hooray! :)
22668    # First separate the path from the arguments. This will split at the first
22669    # space.
22670    complete="$WINLD"
22671    path="${complete%% *}"
22672    tmp="$complete EOL"
22673    arguments="${tmp#* }"
22674
22675    # Cannot rely on the command "which" here since it doesn't always work.
22676    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22677    if test -z "$is_absolute_path"; then
22678      # Path to executable is not absolute. Find it.
22679      IFS_save="$IFS"
22680      IFS=:
22681      for p in $PATH; do
22682        if test -f "$p/$path" && test -x "$p/$path"; then
22683          new_path="$p/$path"
22684          break
22685        fi
22686      done
22687      IFS="$IFS_save"
22688    else
22689      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22690$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22691      new_path="$path"
22692    fi
22693
22694    if test "x$new_path" = x; then
22695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22696$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22697        has_space=`$ECHO "$complete" | $GREP " "`
22698        if test "x$has_space" != x; then
22699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22701        fi
22702        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22703      fi
22704  fi
22705
22706      # Now join together the path and the arguments once again
22707      if test "x$arguments" != xEOL; then
22708        new_complete="$new_path ${arguments% *}"
22709      else
22710        new_complete="$new_path"
22711      fi
22712
22713  if test "x$complete" != "x$new_complete"; then
22714      WINLD="$new_complete"
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22716$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22717    fi
22718
22719    printf "Windows linker was found at $WINLD\n"
22720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22721$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22722    "$WINLD" --version > /dev/null
22723    if test $? -eq 0 ; then
22724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22725$as_echo "no" >&6; }
22726      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22727    else
22728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22729$as_echo "yes" >&6; }
22730    fi
22731    LD="$WINLD"
22732    LDEXE="$WINLD"
22733    LDCXX="$WINLD"
22734    LDEXECXX="$WINLD"
22735
22736    # Extract the first word of "mt", so it can be a program name with args.
22737set dummy mt; ac_word=$2
22738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22739$as_echo_n "checking for $ac_word... " >&6; }
22740if test "${ac_cv_prog_MT+set}" = set; then :
22741  $as_echo_n "(cached) " >&6
22742else
22743  if test -n "$MT"; then
22744  ac_cv_prog_MT="$MT" # Let the user override the test.
22745else
22746  ac_prog_rejected=no
22747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22748for as_dir in $PATH
22749do
22750  IFS=$as_save_IFS
22751  test -z "$as_dir" && as_dir=.
22752    for ac_exec_ext in '' $ac_executable_extensions; do
22753  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22754    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22755       ac_prog_rejected=yes
22756       continue
22757     fi
22758    ac_cv_prog_MT="mt"
22759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22760    break 2
22761  fi
22762done
22763  done
22764IFS=$as_save_IFS
22765
22766if test $ac_prog_rejected = yes; then
22767  # We found a bogon in the path, so make sure we never use it.
22768  set dummy $ac_cv_prog_MT
22769  shift
22770  if test $# != 0; then
22771    # We chose a different compiler from the bogus one.
22772    # However, it has the same basename, so the bogon will be chosen
22773    # first if we set MT to just the basename; use the full file name.
22774    shift
22775    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22776  fi
22777fi
22778fi
22779fi
22780MT=$ac_cv_prog_MT
22781if test -n "$MT"; then
22782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22783$as_echo "$MT" >&6; }
22784else
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786$as_echo "no" >&6; }
22787fi
22788
22789
22790
22791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22792
22793  # First separate the path from the arguments. This will split at the first
22794  # space.
22795  complete="$MT"
22796  path="${complete%% *}"
22797  tmp="$complete EOL"
22798  arguments="${tmp#* }"
22799
22800  # Input might be given as Windows format, start by converting to
22801  # unix format.
22802  new_path=`$CYGPATH -u "$path"`
22803
22804  # Now try to locate executable using which
22805  new_path=`$WHICH "$new_path" 2> /dev/null`
22806  # bat and cmd files are not always considered executable in cygwin causing which
22807  # to not find them
22808  if test "x$new_path" = x \
22809           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22810           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22811    new_path=`$CYGPATH -u "$path"`
22812  fi
22813  if test "x$new_path" = x; then
22814    # Oops. Which didn't find the executable.
22815    # The splitting of arguments from the executable at a space might have been incorrect,
22816    # since paths with space are more likely in Windows. Give it another try with the whole
22817    # argument.
22818    path="$complete"
22819    arguments="EOL"
22820    new_path=`$CYGPATH -u "$path"`
22821    new_path=`$WHICH "$new_path" 2> /dev/null`
22822    # bat and cmd files are not always considered executable in cygwin causing which
22823    # to not find them
22824    if test "x$new_path" = x \
22825             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22826             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22827      new_path=`$CYGPATH -u "$path"`
22828    fi
22829    if test "x$new_path" = x; then
22830      # It's still not found. Now this is an unrecoverable error.
22831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22832$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22833      has_space=`$ECHO "$complete" | $GREP " "`
22834      if test "x$has_space" != x; then
22835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22837      fi
22838      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22839    fi
22840  fi
22841
22842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22845  # "foo.exe" is OK but "foo" is an error.
22846  #
22847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22848  # It is also a way to make sure we got the proper file name for the real test later on.
22849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22850  if test "x$test_shortpath" = x; then
22851    # Short path failed, file does not exist as specified.
22852    # Try adding .exe or .cmd
22853    if test -f "${new_path}.exe"; then
22854       input_to_shortpath="${new_path}.exe"
22855    elif test -f "${new_path}.cmd"; then
22856       input_to_shortpath="${new_path}.cmd"
22857    else
22858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22859$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22862      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22863    fi
22864  else
22865    input_to_shortpath="$new_path"
22866  fi
22867
22868  # Call helper function which possibly converts this using DOS-style short mode.
22869  # If so, the updated path is stored in $new_path.
22870  new_path="$input_to_shortpath"
22871
22872  input_path="$input_to_shortpath"
22873  # Check if we need to convert this using DOS-style short mode. If the path
22874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22875  # take no chances and rewrite it.
22876  # Note: m4 eats our [], so we need to use [ and ] instead.
22877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22878  if test "x$has_forbidden_chars" != x; then
22879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22883      # Going to short mode and back again did indeed matter. Since short mode is
22884      # case insensitive, let's make it lowercase to improve readability.
22885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22886      # Now convert it back to Unix-stile (cygpath)
22887      input_path=`$CYGPATH -u "$shortmode_path"`
22888      new_path="$input_path"
22889    fi
22890  fi
22891
22892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22893  if test "x$test_cygdrive_prefix" = x; then
22894    # As a simple fix, exclude /usr/bin since it's not a real path.
22895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22897      # a path prefixed by /cygdrive for fixpath to work.
22898      new_path="$CYGWIN_ROOT_PATH$input_path"
22899    fi
22900  fi
22901
22902  # remove trailing .exe if any
22903  new_path="${new_path/%.exe/}"
22904
22905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22906
22907  # First separate the path from the arguments. This will split at the first
22908  # space.
22909  complete="$MT"
22910  path="${complete%% *}"
22911  tmp="$complete EOL"
22912  arguments="${tmp#* }"
22913
22914  # Input might be given as Windows format, start by converting to
22915  # unix format.
22916  new_path="$path"
22917
22918  windows_path="$new_path"
22919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22920    unix_path=`$CYGPATH -u "$windows_path"`
22921    new_path="$unix_path"
22922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22924    new_path="$unix_path"
22925  fi
22926
22927
22928  # Now try to locate executable using which
22929  new_path=`$WHICH "$new_path" 2> /dev/null`
22930
22931  if test "x$new_path" = x; then
22932    # Oops. Which didn't find the executable.
22933    # The splitting of arguments from the executable at a space might have been incorrect,
22934    # since paths with space are more likely in Windows. Give it another try with the whole
22935    # argument.
22936    path="$complete"
22937    arguments="EOL"
22938    new_path="$path"
22939
22940  windows_path="$new_path"
22941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22942    unix_path=`$CYGPATH -u "$windows_path"`
22943    new_path="$unix_path"
22944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22946    new_path="$unix_path"
22947  fi
22948
22949
22950    new_path=`$WHICH "$new_path" 2> /dev/null`
22951
22952    if test "x$new_path" = x; then
22953      # It's still not found. Now this is an unrecoverable error.
22954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22955$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22956      has_space=`$ECHO "$complete" | $GREP " "`
22957      if test "x$has_space" != x; then
22958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22960      fi
22961      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22962    fi
22963  fi
22964
22965  # Now new_path has a complete unix path to the binary
22966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22967    # Keep paths in /bin as-is, but remove trailing .exe if any
22968    new_path="${new_path/%.exe/}"
22969    # Do not save /bin paths to all_fixpath_prefixes!
22970  else
22971    # Not in mixed or Windows style, start by that.
22972    new_path=`cmd //c echo $new_path`
22973
22974  input_path="$new_path"
22975  # Check if we need to convert this using DOS-style short mode. If the path
22976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22977  # take no chances and rewrite it.
22978  # Note: m4 eats our [], so we need to use [ and ] instead.
22979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22980  if test "x$has_forbidden_chars" != x; then
22981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22983  fi
22984
22985    # Output is in $new_path
22986
22987  windows_path="$new_path"
22988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989    unix_path=`$CYGPATH -u "$windows_path"`
22990    new_path="$unix_path"
22991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22993    new_path="$unix_path"
22994  fi
22995
22996    # remove trailing .exe if any
22997    new_path="${new_path/%.exe/}"
22998
22999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23001  fi
23002
23003  else
23004    # We're on a posix platform. Hooray! :)
23005    # First separate the path from the arguments. This will split at the first
23006    # space.
23007    complete="$MT"
23008    path="${complete%% *}"
23009    tmp="$complete EOL"
23010    arguments="${tmp#* }"
23011
23012    # Cannot rely on the command "which" here since it doesn't always work.
23013    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23014    if test -z "$is_absolute_path"; then
23015      # Path to executable is not absolute. Find it.
23016      IFS_save="$IFS"
23017      IFS=:
23018      for p in $PATH; do
23019        if test -f "$p/$path" && test -x "$p/$path"; then
23020          new_path="$p/$path"
23021          break
23022        fi
23023      done
23024      IFS="$IFS_save"
23025    else
23026      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23027$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23028      new_path="$path"
23029    fi
23030
23031    if test "x$new_path" = x; then
23032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23033$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23034        has_space=`$ECHO "$complete" | $GREP " "`
23035        if test "x$has_space" != x; then
23036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23038        fi
23039        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23040      fi
23041  fi
23042
23043      # Now join together the path and the arguments once again
23044      if test "x$arguments" != xEOL; then
23045        new_complete="$new_path ${arguments% *}"
23046      else
23047        new_complete="$new_path"
23048      fi
23049
23050  if test "x$complete" != "x$new_complete"; then
23051      MT="$new_complete"
23052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23053$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23054    fi
23055
23056    # The resource compiler
23057    # Extract the first word of "rc", so it can be a program name with args.
23058set dummy rc; ac_word=$2
23059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23060$as_echo_n "checking for $ac_word... " >&6; }
23061if test "${ac_cv_prog_RC+set}" = set; then :
23062  $as_echo_n "(cached) " >&6
23063else
23064  if test -n "$RC"; then
23065  ac_cv_prog_RC="$RC" # Let the user override the test.
23066else
23067  ac_prog_rejected=no
23068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23069for as_dir in $PATH
23070do
23071  IFS=$as_save_IFS
23072  test -z "$as_dir" && as_dir=.
23073    for ac_exec_ext in '' $ac_executable_extensions; do
23074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23075    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23076       ac_prog_rejected=yes
23077       continue
23078     fi
23079    ac_cv_prog_RC="rc"
23080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23081    break 2
23082  fi
23083done
23084  done
23085IFS=$as_save_IFS
23086
23087if test $ac_prog_rejected = yes; then
23088  # We found a bogon in the path, so make sure we never use it.
23089  set dummy $ac_cv_prog_RC
23090  shift
23091  if test $# != 0; then
23092    # We chose a different compiler from the bogus one.
23093    # However, it has the same basename, so the bogon will be chosen
23094    # first if we set RC to just the basename; use the full file name.
23095    shift
23096    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23097  fi
23098fi
23099fi
23100fi
23101RC=$ac_cv_prog_RC
23102if test -n "$RC"; then
23103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23104$as_echo "$RC" >&6; }
23105else
23106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23107$as_echo "no" >&6; }
23108fi
23109
23110
23111
23112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23113
23114  # First separate the path from the arguments. This will split at the first
23115  # space.
23116  complete="$RC"
23117  path="${complete%% *}"
23118  tmp="$complete EOL"
23119  arguments="${tmp#* }"
23120
23121  # Input might be given as Windows format, start by converting to
23122  # unix format.
23123  new_path=`$CYGPATH -u "$path"`
23124
23125  # Now try to locate executable using which
23126  new_path=`$WHICH "$new_path" 2> /dev/null`
23127  # bat and cmd files are not always considered executable in cygwin causing which
23128  # to not find them
23129  if test "x$new_path" = x \
23130           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23131           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23132    new_path=`$CYGPATH -u "$path"`
23133  fi
23134  if test "x$new_path" = x; then
23135    # Oops. Which didn't find the executable.
23136    # The splitting of arguments from the executable at a space might have been incorrect,
23137    # since paths with space are more likely in Windows. Give it another try with the whole
23138    # argument.
23139    path="$complete"
23140    arguments="EOL"
23141    new_path=`$CYGPATH -u "$path"`
23142    new_path=`$WHICH "$new_path" 2> /dev/null`
23143    # bat and cmd files are not always considered executable in cygwin causing which
23144    # to not find them
23145    if test "x$new_path" = x \
23146             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23147             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23148      new_path=`$CYGPATH -u "$path"`
23149    fi
23150    if test "x$new_path" = x; then
23151      # It's still not found. Now this is an unrecoverable error.
23152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23153$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23154      has_space=`$ECHO "$complete" | $GREP " "`
23155      if test "x$has_space" != x; then
23156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23158      fi
23159      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23160    fi
23161  fi
23162
23163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23166  # "foo.exe" is OK but "foo" is an error.
23167  #
23168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23169  # It is also a way to make sure we got the proper file name for the real test later on.
23170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23171  if test "x$test_shortpath" = x; then
23172    # Short path failed, file does not exist as specified.
23173    # Try adding .exe or .cmd
23174    if test -f "${new_path}.exe"; then
23175       input_to_shortpath="${new_path}.exe"
23176    elif test -f "${new_path}.cmd"; then
23177       input_to_shortpath="${new_path}.cmd"
23178    else
23179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23180$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23183      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23184    fi
23185  else
23186    input_to_shortpath="$new_path"
23187  fi
23188
23189  # Call helper function which possibly converts this using DOS-style short mode.
23190  # If so, the updated path is stored in $new_path.
23191  new_path="$input_to_shortpath"
23192
23193  input_path="$input_to_shortpath"
23194  # Check if we need to convert this using DOS-style short mode. If the path
23195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23196  # take no chances and rewrite it.
23197  # Note: m4 eats our [], so we need to use [ and ] instead.
23198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23199  if test "x$has_forbidden_chars" != x; then
23200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23204      # Going to short mode and back again did indeed matter. Since short mode is
23205      # case insensitive, let's make it lowercase to improve readability.
23206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23207      # Now convert it back to Unix-stile (cygpath)
23208      input_path=`$CYGPATH -u "$shortmode_path"`
23209      new_path="$input_path"
23210    fi
23211  fi
23212
23213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23214  if test "x$test_cygdrive_prefix" = x; then
23215    # As a simple fix, exclude /usr/bin since it's not a real path.
23216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23218      # a path prefixed by /cygdrive for fixpath to work.
23219      new_path="$CYGWIN_ROOT_PATH$input_path"
23220    fi
23221  fi
23222
23223  # remove trailing .exe if any
23224  new_path="${new_path/%.exe/}"
23225
23226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23227
23228  # First separate the path from the arguments. This will split at the first
23229  # space.
23230  complete="$RC"
23231  path="${complete%% *}"
23232  tmp="$complete EOL"
23233  arguments="${tmp#* }"
23234
23235  # Input might be given as Windows format, start by converting to
23236  # unix format.
23237  new_path="$path"
23238
23239  windows_path="$new_path"
23240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23241    unix_path=`$CYGPATH -u "$windows_path"`
23242    new_path="$unix_path"
23243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23245    new_path="$unix_path"
23246  fi
23247
23248
23249  # Now try to locate executable using which
23250  new_path=`$WHICH "$new_path" 2> /dev/null`
23251
23252  if test "x$new_path" = x; then
23253    # Oops. Which didn't find the executable.
23254    # The splitting of arguments from the executable at a space might have been incorrect,
23255    # since paths with space are more likely in Windows. Give it another try with the whole
23256    # argument.
23257    path="$complete"
23258    arguments="EOL"
23259    new_path="$path"
23260
23261  windows_path="$new_path"
23262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23263    unix_path=`$CYGPATH -u "$windows_path"`
23264    new_path="$unix_path"
23265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23267    new_path="$unix_path"
23268  fi
23269
23270
23271    new_path=`$WHICH "$new_path" 2> /dev/null`
23272
23273    if test "x$new_path" = x; then
23274      # It's still not found. Now this is an unrecoverable error.
23275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23276$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23277      has_space=`$ECHO "$complete" | $GREP " "`
23278      if test "x$has_space" != x; then
23279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23281      fi
23282      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23283    fi
23284  fi
23285
23286  # Now new_path has a complete unix path to the binary
23287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23288    # Keep paths in /bin as-is, but remove trailing .exe if any
23289    new_path="${new_path/%.exe/}"
23290    # Do not save /bin paths to all_fixpath_prefixes!
23291  else
23292    # Not in mixed or Windows style, start by that.
23293    new_path=`cmd //c echo $new_path`
23294
23295  input_path="$new_path"
23296  # Check if we need to convert this using DOS-style short mode. If the path
23297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23298  # take no chances and rewrite it.
23299  # Note: m4 eats our [], so we need to use [ and ] instead.
23300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23301  if test "x$has_forbidden_chars" != x; then
23302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23304  fi
23305
23306    # Output is in $new_path
23307
23308  windows_path="$new_path"
23309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23310    unix_path=`$CYGPATH -u "$windows_path"`
23311    new_path="$unix_path"
23312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23314    new_path="$unix_path"
23315  fi
23316
23317    # remove trailing .exe if any
23318    new_path="${new_path/%.exe/}"
23319
23320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23322  fi
23323
23324  else
23325    # We're on a posix platform. Hooray! :)
23326    # First separate the path from the arguments. This will split at the first
23327    # space.
23328    complete="$RC"
23329    path="${complete%% *}"
23330    tmp="$complete EOL"
23331    arguments="${tmp#* }"
23332
23333    # Cannot rely on the command "which" here since it doesn't always work.
23334    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23335    if test -z "$is_absolute_path"; then
23336      # Path to executable is not absolute. Find it.
23337      IFS_save="$IFS"
23338      IFS=:
23339      for p in $PATH; do
23340        if test -f "$p/$path" && test -x "$p/$path"; then
23341          new_path="$p/$path"
23342          break
23343        fi
23344      done
23345      IFS="$IFS_save"
23346    else
23347      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23348$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23349      new_path="$path"
23350    fi
23351
23352    if test "x$new_path" = x; then
23353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23354$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23355        has_space=`$ECHO "$complete" | $GREP " "`
23356        if test "x$has_space" != x; then
23357          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23358$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23359        fi
23360        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23361      fi
23362  fi
23363
23364      # Now join together the path and the arguments once again
23365      if test "x$arguments" != xEOL; then
23366        new_complete="$new_path ${arguments% *}"
23367      else
23368        new_complete="$new_path"
23369      fi
23370
23371  if test "x$complete" != "x$new_complete"; then
23372      RC="$new_complete"
23373      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23374$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23375    fi
23376
23377
23378    # For hotspot, we need these in Windows mixed path,
23379    # so rewrite them all. Need added .exe suffix.
23380    HOTSPOT_CXX="$CXX.exe"
23381    HOTSPOT_LD="$LD.exe"
23382    HOTSPOT_MT="$MT.exe"
23383    HOTSPOT_RC="$RC.exe"
23384
23385  unix_path="$HOTSPOT_CXX"
23386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23387    windows_path=`$CYGPATH -m "$unix_path"`
23388    HOTSPOT_CXX="$windows_path"
23389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23390    windows_path=`cmd //c echo $unix_path`
23391    HOTSPOT_CXX="$windows_path"
23392  fi
23393
23394
23395  unix_path="$HOTSPOT_LD"
23396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23397    windows_path=`$CYGPATH -m "$unix_path"`
23398    HOTSPOT_LD="$windows_path"
23399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23400    windows_path=`cmd //c echo $unix_path`
23401    HOTSPOT_LD="$windows_path"
23402  fi
23403
23404
23405  unix_path="$HOTSPOT_MT"
23406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23407    windows_path=`$CYGPATH -m "$unix_path"`
23408    HOTSPOT_MT="$windows_path"
23409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410    windows_path=`cmd //c echo $unix_path`
23411    HOTSPOT_MT="$windows_path"
23412  fi
23413
23414
23415  unix_path="$HOTSPOT_RC"
23416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23417    windows_path=`$CYGPATH -m "$unix_path"`
23418    HOTSPOT_RC="$windows_path"
23419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23420    windows_path=`cmd //c echo $unix_path`
23421    HOTSPOT_RC="$windows_path"
23422  fi
23423
23424
23425
23426
23427    RC_FLAGS="-nologo -l 0x409 -r"
23428    if test "x$VARIANT" = xOPT; then :
23429
23430        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23431
23432fi
23433    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23434    if test "x$JDK_UPDATE_VERSION" = x; then :
23435
23436        JDK_UPDATE_VERSION_NOTNULL=0
23437
23438fi
23439    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23440    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23441    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23442    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23443    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23444    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23445    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23446
23447    # lib.exe is used to create static libraries.
23448    # Extract the first word of "lib", so it can be a program name with args.
23449set dummy lib; ac_word=$2
23450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23451$as_echo_n "checking for $ac_word... " >&6; }
23452if test "${ac_cv_prog_WINAR+set}" = set; then :
23453  $as_echo_n "(cached) " >&6
23454else
23455  if test -n "$WINAR"; then
23456  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23457else
23458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23459for as_dir in $PATH
23460do
23461  IFS=$as_save_IFS
23462  test -z "$as_dir" && as_dir=.
23463    for ac_exec_ext in '' $ac_executable_extensions; do
23464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23465    ac_cv_prog_WINAR="lib"
23466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23467    break 2
23468  fi
23469done
23470  done
23471IFS=$as_save_IFS
23472
23473fi
23474fi
23475WINAR=$ac_cv_prog_WINAR
23476if test -n "$WINAR"; then
23477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23478$as_echo "$WINAR" >&6; }
23479else
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23481$as_echo "no" >&6; }
23482fi
23483
23484
23485
23486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23487
23488  # First separate the path from the arguments. This will split at the first
23489  # space.
23490  complete="$WINAR"
23491  path="${complete%% *}"
23492  tmp="$complete EOL"
23493  arguments="${tmp#* }"
23494
23495  # Input might be given as Windows format, start by converting to
23496  # unix format.
23497  new_path=`$CYGPATH -u "$path"`
23498
23499  # Now try to locate executable using which
23500  new_path=`$WHICH "$new_path" 2> /dev/null`
23501  # bat and cmd files are not always considered executable in cygwin causing which
23502  # to not find them
23503  if test "x$new_path" = x \
23504           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23505           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23506    new_path=`$CYGPATH -u "$path"`
23507  fi
23508  if test "x$new_path" = x; then
23509    # Oops. Which didn't find the executable.
23510    # The splitting of arguments from the executable at a space might have been incorrect,
23511    # since paths with space are more likely in Windows. Give it another try with the whole
23512    # argument.
23513    path="$complete"
23514    arguments="EOL"
23515    new_path=`$CYGPATH -u "$path"`
23516    new_path=`$WHICH "$new_path" 2> /dev/null`
23517    # bat and cmd files are not always considered executable in cygwin causing which
23518    # to not find them
23519    if test "x$new_path" = x \
23520             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23521             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23522      new_path=`$CYGPATH -u "$path"`
23523    fi
23524    if test "x$new_path" = x; then
23525      # It's still not found. Now this is an unrecoverable error.
23526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23527$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23528      has_space=`$ECHO "$complete" | $GREP " "`
23529      if test "x$has_space" != x; then
23530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23532      fi
23533      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23534    fi
23535  fi
23536
23537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23540  # "foo.exe" is OK but "foo" is an error.
23541  #
23542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23543  # It is also a way to make sure we got the proper file name for the real test later on.
23544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23545  if test "x$test_shortpath" = x; then
23546    # Short path failed, file does not exist as specified.
23547    # Try adding .exe or .cmd
23548    if test -f "${new_path}.exe"; then
23549       input_to_shortpath="${new_path}.exe"
23550    elif test -f "${new_path}.cmd"; then
23551       input_to_shortpath="${new_path}.cmd"
23552    else
23553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23554$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23557      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23558    fi
23559  else
23560    input_to_shortpath="$new_path"
23561  fi
23562
23563  # Call helper function which possibly converts this using DOS-style short mode.
23564  # If so, the updated path is stored in $new_path.
23565  new_path="$input_to_shortpath"
23566
23567  input_path="$input_to_shortpath"
23568  # Check if we need to convert this using DOS-style short mode. If the path
23569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23570  # take no chances and rewrite it.
23571  # Note: m4 eats our [], so we need to use [ and ] instead.
23572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23573  if test "x$has_forbidden_chars" != x; then
23574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23578      # Going to short mode and back again did indeed matter. Since short mode is
23579      # case insensitive, let's make it lowercase to improve readability.
23580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23581      # Now convert it back to Unix-stile (cygpath)
23582      input_path=`$CYGPATH -u "$shortmode_path"`
23583      new_path="$input_path"
23584    fi
23585  fi
23586
23587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23588  if test "x$test_cygdrive_prefix" = x; then
23589    # As a simple fix, exclude /usr/bin since it's not a real path.
23590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23592      # a path prefixed by /cygdrive for fixpath to work.
23593      new_path="$CYGWIN_ROOT_PATH$input_path"
23594    fi
23595  fi
23596
23597  # remove trailing .exe if any
23598  new_path="${new_path/%.exe/}"
23599
23600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23601
23602  # First separate the path from the arguments. This will split at the first
23603  # space.
23604  complete="$WINAR"
23605  path="${complete%% *}"
23606  tmp="$complete EOL"
23607  arguments="${tmp#* }"
23608
23609  # Input might be given as Windows format, start by converting to
23610  # unix format.
23611  new_path="$path"
23612
23613  windows_path="$new_path"
23614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23615    unix_path=`$CYGPATH -u "$windows_path"`
23616    new_path="$unix_path"
23617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23619    new_path="$unix_path"
23620  fi
23621
23622
23623  # Now try to locate executable using which
23624  new_path=`$WHICH "$new_path" 2> /dev/null`
23625
23626  if test "x$new_path" = x; then
23627    # Oops. Which didn't find the executable.
23628    # The splitting of arguments from the executable at a space might have been incorrect,
23629    # since paths with space are more likely in Windows. Give it another try with the whole
23630    # argument.
23631    path="$complete"
23632    arguments="EOL"
23633    new_path="$path"
23634
23635  windows_path="$new_path"
23636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23637    unix_path=`$CYGPATH -u "$windows_path"`
23638    new_path="$unix_path"
23639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23641    new_path="$unix_path"
23642  fi
23643
23644
23645    new_path=`$WHICH "$new_path" 2> /dev/null`
23646
23647    if test "x$new_path" = x; then
23648      # It's still not found. Now this is an unrecoverable error.
23649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23650$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23651      has_space=`$ECHO "$complete" | $GREP " "`
23652      if test "x$has_space" != x; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23655      fi
23656      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23657    fi
23658  fi
23659
23660  # Now new_path has a complete unix path to the binary
23661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23662    # Keep paths in /bin as-is, but remove trailing .exe if any
23663    new_path="${new_path/%.exe/}"
23664    # Do not save /bin paths to all_fixpath_prefixes!
23665  else
23666    # Not in mixed or Windows style, start by that.
23667    new_path=`cmd //c echo $new_path`
23668
23669  input_path="$new_path"
23670  # Check if we need to convert this using DOS-style short mode. If the path
23671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23672  # take no chances and rewrite it.
23673  # Note: m4 eats our [], so we need to use [ and ] instead.
23674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23675  if test "x$has_forbidden_chars" != x; then
23676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23678  fi
23679
23680    # Output is in $new_path
23681
23682  windows_path="$new_path"
23683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23684    unix_path=`$CYGPATH -u "$windows_path"`
23685    new_path="$unix_path"
23686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23688    new_path="$unix_path"
23689  fi
23690
23691    # remove trailing .exe if any
23692    new_path="${new_path/%.exe/}"
23693
23694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23696  fi
23697
23698  else
23699    # We're on a posix platform. Hooray! :)
23700    # First separate the path from the arguments. This will split at the first
23701    # space.
23702    complete="$WINAR"
23703    path="${complete%% *}"
23704    tmp="$complete EOL"
23705    arguments="${tmp#* }"
23706
23707    # Cannot rely on the command "which" here since it doesn't always work.
23708    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23709    if test -z "$is_absolute_path"; then
23710      # Path to executable is not absolute. Find it.
23711      IFS_save="$IFS"
23712      IFS=:
23713      for p in $PATH; do
23714        if test -f "$p/$path" && test -x "$p/$path"; then
23715          new_path="$p/$path"
23716          break
23717        fi
23718      done
23719      IFS="$IFS_save"
23720    else
23721      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23722$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23723      new_path="$path"
23724    fi
23725
23726    if test "x$new_path" = x; then
23727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23728$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23729        has_space=`$ECHO "$complete" | $GREP " "`
23730        if test "x$has_space" != x; then
23731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23733        fi
23734        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23735      fi
23736  fi
23737
23738      # Now join together the path and the arguments once again
23739      if test "x$arguments" != xEOL; then
23740        new_complete="$new_path ${arguments% *}"
23741      else
23742        new_complete="$new_path"
23743      fi
23744
23745  if test "x$complete" != "x$new_complete"; then
23746      WINAR="$new_complete"
23747      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23748$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23749    fi
23750
23751    AR="$WINAR"
23752    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23753
23754    # Extract the first word of "dumpbin", so it can be a program name with args.
23755set dummy dumpbin; ac_word=$2
23756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23757$as_echo_n "checking for $ac_word... " >&6; }
23758if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23759  $as_echo_n "(cached) " >&6
23760else
23761  if test -n "$DUMPBIN"; then
23762  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23763else
23764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23765for as_dir in $PATH
23766do
23767  IFS=$as_save_IFS
23768  test -z "$as_dir" && as_dir=.
23769    for ac_exec_ext in '' $ac_executable_extensions; do
23770  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23771    ac_cv_prog_DUMPBIN="dumpbin"
23772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23773    break 2
23774  fi
23775done
23776  done
23777IFS=$as_save_IFS
23778
23779fi
23780fi
23781DUMPBIN=$ac_cv_prog_DUMPBIN
23782if test -n "$DUMPBIN"; then
23783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23784$as_echo "$DUMPBIN" >&6; }
23785else
23786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23787$as_echo "no" >&6; }
23788fi
23789
23790
23791
23792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23793
23794  # First separate the path from the arguments. This will split at the first
23795  # space.
23796  complete="$DUMPBIN"
23797  path="${complete%% *}"
23798  tmp="$complete EOL"
23799  arguments="${tmp#* }"
23800
23801  # Input might be given as Windows format, start by converting to
23802  # unix format.
23803  new_path=`$CYGPATH -u "$path"`
23804
23805  # Now try to locate executable using which
23806  new_path=`$WHICH "$new_path" 2> /dev/null`
23807  # bat and cmd files are not always considered executable in cygwin causing which
23808  # to not find them
23809  if test "x$new_path" = x \
23810           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23811           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23812    new_path=`$CYGPATH -u "$path"`
23813  fi
23814  if test "x$new_path" = x; then
23815    # Oops. Which didn't find the executable.
23816    # The splitting of arguments from the executable at a space might have been incorrect,
23817    # since paths with space are more likely in Windows. Give it another try with the whole
23818    # argument.
23819    path="$complete"
23820    arguments="EOL"
23821    new_path=`$CYGPATH -u "$path"`
23822    new_path=`$WHICH "$new_path" 2> /dev/null`
23823    # bat and cmd files are not always considered executable in cygwin causing which
23824    # to not find them
23825    if test "x$new_path" = x \
23826             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23827             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23828      new_path=`$CYGPATH -u "$path"`
23829    fi
23830    if test "x$new_path" = x; then
23831      # It's still not found. Now this is an unrecoverable error.
23832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23833$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23834      has_space=`$ECHO "$complete" | $GREP " "`
23835      if test "x$has_space" != x; then
23836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23838      fi
23839      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23840    fi
23841  fi
23842
23843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23846  # "foo.exe" is OK but "foo" is an error.
23847  #
23848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23849  # It is also a way to make sure we got the proper file name for the real test later on.
23850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23851  if test "x$test_shortpath" = x; then
23852    # Short path failed, file does not exist as specified.
23853    # Try adding .exe or .cmd
23854    if test -f "${new_path}.exe"; then
23855       input_to_shortpath="${new_path}.exe"
23856    elif test -f "${new_path}.cmd"; then
23857       input_to_shortpath="${new_path}.cmd"
23858    else
23859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23860$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23863      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23864    fi
23865  else
23866    input_to_shortpath="$new_path"
23867  fi
23868
23869  # Call helper function which possibly converts this using DOS-style short mode.
23870  # If so, the updated path is stored in $new_path.
23871  new_path="$input_to_shortpath"
23872
23873  input_path="$input_to_shortpath"
23874  # Check if we need to convert this using DOS-style short mode. If the path
23875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23876  # take no chances and rewrite it.
23877  # Note: m4 eats our [], so we need to use [ and ] instead.
23878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23879  if test "x$has_forbidden_chars" != x; then
23880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23884      # Going to short mode and back again did indeed matter. Since short mode is
23885      # case insensitive, let's make it lowercase to improve readability.
23886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23887      # Now convert it back to Unix-stile (cygpath)
23888      input_path=`$CYGPATH -u "$shortmode_path"`
23889      new_path="$input_path"
23890    fi
23891  fi
23892
23893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23894  if test "x$test_cygdrive_prefix" = x; then
23895    # As a simple fix, exclude /usr/bin since it's not a real path.
23896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23898      # a path prefixed by /cygdrive for fixpath to work.
23899      new_path="$CYGWIN_ROOT_PATH$input_path"
23900    fi
23901  fi
23902
23903  # remove trailing .exe if any
23904  new_path="${new_path/%.exe/}"
23905
23906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23907
23908  # First separate the path from the arguments. This will split at the first
23909  # space.
23910  complete="$DUMPBIN"
23911  path="${complete%% *}"
23912  tmp="$complete EOL"
23913  arguments="${tmp#* }"
23914
23915  # Input might be given as Windows format, start by converting to
23916  # unix format.
23917  new_path="$path"
23918
23919  windows_path="$new_path"
23920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23921    unix_path=`$CYGPATH -u "$windows_path"`
23922    new_path="$unix_path"
23923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23925    new_path="$unix_path"
23926  fi
23927
23928
23929  # Now try to locate executable using which
23930  new_path=`$WHICH "$new_path" 2> /dev/null`
23931
23932  if test "x$new_path" = x; then
23933    # Oops. Which didn't find the executable.
23934    # The splitting of arguments from the executable at a space might have been incorrect,
23935    # since paths with space are more likely in Windows. Give it another try with the whole
23936    # argument.
23937    path="$complete"
23938    arguments="EOL"
23939    new_path="$path"
23940
23941  windows_path="$new_path"
23942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23943    unix_path=`$CYGPATH -u "$windows_path"`
23944    new_path="$unix_path"
23945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23947    new_path="$unix_path"
23948  fi
23949
23950
23951    new_path=`$WHICH "$new_path" 2> /dev/null`
23952
23953    if test "x$new_path" = x; then
23954      # It's still not found. Now this is an unrecoverable error.
23955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23956$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23957      has_space=`$ECHO "$complete" | $GREP " "`
23958      if test "x$has_space" != x; then
23959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23961      fi
23962      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23963    fi
23964  fi
23965
23966  # Now new_path has a complete unix path to the binary
23967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23968    # Keep paths in /bin as-is, but remove trailing .exe if any
23969    new_path="${new_path/%.exe/}"
23970    # Do not save /bin paths to all_fixpath_prefixes!
23971  else
23972    # Not in mixed or Windows style, start by that.
23973    new_path=`cmd //c echo $new_path`
23974
23975  input_path="$new_path"
23976  # Check if we need to convert this using DOS-style short mode. If the path
23977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23978  # take no chances and rewrite it.
23979  # Note: m4 eats our [], so we need to use [ and ] instead.
23980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23981  if test "x$has_forbidden_chars" != x; then
23982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23984  fi
23985
23986    # Output is in $new_path
23987
23988  windows_path="$new_path"
23989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23990    unix_path=`$CYGPATH -u "$windows_path"`
23991    new_path="$unix_path"
23992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23994    new_path="$unix_path"
23995  fi
23996
23997    # remove trailing .exe if any
23998    new_path="${new_path/%.exe/}"
23999
24000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24002  fi
24003
24004  else
24005    # We're on a posix platform. Hooray! :)
24006    # First separate the path from the arguments. This will split at the first
24007    # space.
24008    complete="$DUMPBIN"
24009    path="${complete%% *}"
24010    tmp="$complete EOL"
24011    arguments="${tmp#* }"
24012
24013    # Cannot rely on the command "which" here since it doesn't always work.
24014    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24015    if test -z "$is_absolute_path"; then
24016      # Path to executable is not absolute. Find it.
24017      IFS_save="$IFS"
24018      IFS=:
24019      for p in $PATH; do
24020        if test -f "$p/$path" && test -x "$p/$path"; then
24021          new_path="$p/$path"
24022          break
24023        fi
24024      done
24025      IFS="$IFS_save"
24026    else
24027      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24028$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24029      new_path="$path"
24030    fi
24031
24032    if test "x$new_path" = x; then
24033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24034$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24035        has_space=`$ECHO "$complete" | $GREP " "`
24036        if test "x$has_space" != x; then
24037          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24038$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24039        fi
24040        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24041      fi
24042  fi
24043
24044      # Now join together the path and the arguments once again
24045      if test "x$arguments" != xEOL; then
24046        new_complete="$new_path ${arguments% *}"
24047      else
24048        new_complete="$new_path"
24049      fi
24050
24051  if test "x$complete" != "x$new_complete"; then
24052      DUMPBIN="$new_complete"
24053      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24054$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24055    fi
24056
24057
24058    COMPILER_TYPE=CL
24059    CCXXFLAGS="$CCXXFLAGS -nologo"
24060
24061fi
24062
24063
24064
24065ac_ext=c
24066ac_cpp='$CPP $CPPFLAGS'
24067ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24068ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24069ac_compiler_gnu=$ac_cv_c_compiler_gnu
24070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24071$as_echo_n "checking how to run the C preprocessor... " >&6; }
24072# On Suns, sometimes $CPP names a directory.
24073if test -n "$CPP" && test -d "$CPP"; then
24074  CPP=
24075fi
24076if test -z "$CPP"; then
24077  if test "${ac_cv_prog_CPP+set}" = set; then :
24078  $as_echo_n "(cached) " >&6
24079else
24080      # Double quotes because CPP needs to be expanded
24081    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24082    do
24083      ac_preproc_ok=false
24084for ac_c_preproc_warn_flag in '' yes
24085do
24086  # Use a header file that comes with gcc, so configuring glibc
24087  # with a fresh cross-compiler works.
24088  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24089  # <limits.h> exists even on freestanding compilers.
24090  # On the NeXT, cc -E runs the code through the compiler's parser,
24091  # not just through cpp. "Syntax error" is here to catch this case.
24092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24093/* end confdefs.h.  */
24094#ifdef __STDC__
24095# include <limits.h>
24096#else
24097# include <assert.h>
24098#endif
24099		     Syntax error
24100_ACEOF
24101if ac_fn_c_try_cpp "$LINENO"; then :
24102
24103else
24104  # Broken: fails on valid input.
24105continue
24106fi
24107rm -f conftest.err conftest.i conftest.$ac_ext
24108
24109  # OK, works on sane cases.  Now check whether nonexistent headers
24110  # can be detected and how.
24111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24112/* end confdefs.h.  */
24113#include <ac_nonexistent.h>
24114_ACEOF
24115if ac_fn_c_try_cpp "$LINENO"; then :
24116  # Broken: success on invalid input.
24117continue
24118else
24119  # Passes both tests.
24120ac_preproc_ok=:
24121break
24122fi
24123rm -f conftest.err conftest.i conftest.$ac_ext
24124
24125done
24126# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24127rm -f conftest.i conftest.err conftest.$ac_ext
24128if $ac_preproc_ok; then :
24129  break
24130fi
24131
24132    done
24133    ac_cv_prog_CPP=$CPP
24134
24135fi
24136  CPP=$ac_cv_prog_CPP
24137else
24138  ac_cv_prog_CPP=$CPP
24139fi
24140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24141$as_echo "$CPP" >&6; }
24142ac_preproc_ok=false
24143for ac_c_preproc_warn_flag in '' yes
24144do
24145  # Use a header file that comes with gcc, so configuring glibc
24146  # with a fresh cross-compiler works.
24147  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24148  # <limits.h> exists even on freestanding compilers.
24149  # On the NeXT, cc -E runs the code through the compiler's parser,
24150  # not just through cpp. "Syntax error" is here to catch this case.
24151  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24152/* end confdefs.h.  */
24153#ifdef __STDC__
24154# include <limits.h>
24155#else
24156# include <assert.h>
24157#endif
24158		     Syntax error
24159_ACEOF
24160if ac_fn_c_try_cpp "$LINENO"; then :
24161
24162else
24163  # Broken: fails on valid input.
24164continue
24165fi
24166rm -f conftest.err conftest.i conftest.$ac_ext
24167
24168  # OK, works on sane cases.  Now check whether nonexistent headers
24169  # can be detected and how.
24170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24171/* end confdefs.h.  */
24172#include <ac_nonexistent.h>
24173_ACEOF
24174if ac_fn_c_try_cpp "$LINENO"; then :
24175  # Broken: success on invalid input.
24176continue
24177else
24178  # Passes both tests.
24179ac_preproc_ok=:
24180break
24181fi
24182rm -f conftest.err conftest.i conftest.$ac_ext
24183
24184done
24185# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24186rm -f conftest.i conftest.err conftest.$ac_ext
24187if $ac_preproc_ok; then :
24188
24189else
24190  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24192as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24193See \`config.log' for more details" "$LINENO" 5 ; }
24194fi
24195
24196ac_ext=cpp
24197ac_cpp='$CXXCPP $CPPFLAGS'
24198ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24199ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24200ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24201
24202
24203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24204
24205  # First separate the path from the arguments. This will split at the first
24206  # space.
24207  complete="$CPP"
24208  path="${complete%% *}"
24209  tmp="$complete EOL"
24210  arguments="${tmp#* }"
24211
24212  # Input might be given as Windows format, start by converting to
24213  # unix format.
24214  new_path=`$CYGPATH -u "$path"`
24215
24216  # Now try to locate executable using which
24217  new_path=`$WHICH "$new_path" 2> /dev/null`
24218  # bat and cmd files are not always considered executable in cygwin causing which
24219  # to not find them
24220  if test "x$new_path" = x \
24221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24223    new_path=`$CYGPATH -u "$path"`
24224  fi
24225  if test "x$new_path" = x; then
24226    # Oops. Which didn't find the executable.
24227    # The splitting of arguments from the executable at a space might have been incorrect,
24228    # since paths with space are more likely in Windows. Give it another try with the whole
24229    # argument.
24230    path="$complete"
24231    arguments="EOL"
24232    new_path=`$CYGPATH -u "$path"`
24233    new_path=`$WHICH "$new_path" 2> /dev/null`
24234    # bat and cmd files are not always considered executable in cygwin causing which
24235    # to not find them
24236    if test "x$new_path" = x \
24237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24239      new_path=`$CYGPATH -u "$path"`
24240    fi
24241    if test "x$new_path" = x; then
24242      # It's still not found. Now this is an unrecoverable error.
24243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24244$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24245      has_space=`$ECHO "$complete" | $GREP " "`
24246      if test "x$has_space" != x; then
24247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24249      fi
24250      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24251    fi
24252  fi
24253
24254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24257  # "foo.exe" is OK but "foo" is an error.
24258  #
24259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24260  # It is also a way to make sure we got the proper file name for the real test later on.
24261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24262  if test "x$test_shortpath" = x; then
24263    # Short path failed, file does not exist as specified.
24264    # Try adding .exe or .cmd
24265    if test -f "${new_path}.exe"; then
24266       input_to_shortpath="${new_path}.exe"
24267    elif test -f "${new_path}.cmd"; then
24268       input_to_shortpath="${new_path}.cmd"
24269    else
24270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24271$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24274      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24275    fi
24276  else
24277    input_to_shortpath="$new_path"
24278  fi
24279
24280  # Call helper function which possibly converts this using DOS-style short mode.
24281  # If so, the updated path is stored in $new_path.
24282  new_path="$input_to_shortpath"
24283
24284  input_path="$input_to_shortpath"
24285  # Check if we need to convert this using DOS-style short mode. If the path
24286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24287  # take no chances and rewrite it.
24288  # Note: m4 eats our [], so we need to use [ and ] instead.
24289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24290  if test "x$has_forbidden_chars" != x; then
24291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24295      # Going to short mode and back again did indeed matter. Since short mode is
24296      # case insensitive, let's make it lowercase to improve readability.
24297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24298      # Now convert it back to Unix-stile (cygpath)
24299      input_path=`$CYGPATH -u "$shortmode_path"`
24300      new_path="$input_path"
24301    fi
24302  fi
24303
24304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24305  if test "x$test_cygdrive_prefix" = x; then
24306    # As a simple fix, exclude /usr/bin since it's not a real path.
24307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24309      # a path prefixed by /cygdrive for fixpath to work.
24310      new_path="$CYGWIN_ROOT_PATH$input_path"
24311    fi
24312  fi
24313
24314  # remove trailing .exe if any
24315  new_path="${new_path/%.exe/}"
24316
24317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24318
24319  # First separate the path from the arguments. This will split at the first
24320  # space.
24321  complete="$CPP"
24322  path="${complete%% *}"
24323  tmp="$complete EOL"
24324  arguments="${tmp#* }"
24325
24326  # Input might be given as Windows format, start by converting to
24327  # unix format.
24328  new_path="$path"
24329
24330  windows_path="$new_path"
24331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24332    unix_path=`$CYGPATH -u "$windows_path"`
24333    new_path="$unix_path"
24334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24336    new_path="$unix_path"
24337  fi
24338
24339
24340  # Now try to locate executable using which
24341  new_path=`$WHICH "$new_path" 2> /dev/null`
24342
24343  if test "x$new_path" = x; then
24344    # Oops. Which didn't find the executable.
24345    # The splitting of arguments from the executable at a space might have been incorrect,
24346    # since paths with space are more likely in Windows. Give it another try with the whole
24347    # argument.
24348    path="$complete"
24349    arguments="EOL"
24350    new_path="$path"
24351
24352  windows_path="$new_path"
24353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24354    unix_path=`$CYGPATH -u "$windows_path"`
24355    new_path="$unix_path"
24356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24358    new_path="$unix_path"
24359  fi
24360
24361
24362    new_path=`$WHICH "$new_path" 2> /dev/null`
24363
24364    if test "x$new_path" = x; then
24365      # It's still not found. Now this is an unrecoverable error.
24366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24367$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24368      has_space=`$ECHO "$complete" | $GREP " "`
24369      if test "x$has_space" != x; then
24370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24372      fi
24373      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24374    fi
24375  fi
24376
24377  # Now new_path has a complete unix path to the binary
24378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24379    # Keep paths in /bin as-is, but remove trailing .exe if any
24380    new_path="${new_path/%.exe/}"
24381    # Do not save /bin paths to all_fixpath_prefixes!
24382  else
24383    # Not in mixed or Windows style, start by that.
24384    new_path=`cmd //c echo $new_path`
24385
24386  input_path="$new_path"
24387  # Check if we need to convert this using DOS-style short mode. If the path
24388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24389  # take no chances and rewrite it.
24390  # Note: m4 eats our [], so we need to use [ and ] instead.
24391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24392  if test "x$has_forbidden_chars" != x; then
24393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24395  fi
24396
24397    # Output is in $new_path
24398
24399  windows_path="$new_path"
24400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24401    unix_path=`$CYGPATH -u "$windows_path"`
24402    new_path="$unix_path"
24403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24405    new_path="$unix_path"
24406  fi
24407
24408    # remove trailing .exe if any
24409    new_path="${new_path/%.exe/}"
24410
24411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24413  fi
24414
24415  else
24416    # We're on a posix platform. Hooray! :)
24417    # First separate the path from the arguments. This will split at the first
24418    # space.
24419    complete="$CPP"
24420    path="${complete%% *}"
24421    tmp="$complete EOL"
24422    arguments="${tmp#* }"
24423
24424    # Cannot rely on the command "which" here since it doesn't always work.
24425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24426    if test -z "$is_absolute_path"; then
24427      # Path to executable is not absolute. Find it.
24428      IFS_save="$IFS"
24429      IFS=:
24430      for p in $PATH; do
24431        if test -f "$p/$path" && test -x "$p/$path"; then
24432          new_path="$p/$path"
24433          break
24434        fi
24435      done
24436      IFS="$IFS_save"
24437    else
24438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24439$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24440      new_path="$path"
24441    fi
24442
24443    if test "x$new_path" = x; then
24444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24445$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24446        has_space=`$ECHO "$complete" | $GREP " "`
24447        if test "x$has_space" != x; then
24448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24450        fi
24451        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24452      fi
24453  fi
24454
24455      # Now join together the path and the arguments once again
24456      if test "x$arguments" != xEOL; then
24457        new_complete="$new_path ${arguments% *}"
24458      else
24459        new_complete="$new_path"
24460      fi
24461
24462  if test "x$complete" != "x$new_complete"; then
24463      CPP="$new_complete"
24464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24465$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24466    fi
24467
24468
24469ac_ext=cpp
24470ac_cpp='$CXXCPP $CPPFLAGS'
24471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24475$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24476if test -z "$CXXCPP"; then
24477  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24478  $as_echo_n "(cached) " >&6
24479else
24480      # Double quotes because CXXCPP needs to be expanded
24481    for CXXCPP in "$CXX -E" "/lib/cpp"
24482    do
24483      ac_preproc_ok=false
24484for ac_cxx_preproc_warn_flag in '' yes
24485do
24486  # Use a header file that comes with gcc, so configuring glibc
24487  # with a fresh cross-compiler works.
24488  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24489  # <limits.h> exists even on freestanding compilers.
24490  # On the NeXT, cc -E runs the code through the compiler's parser,
24491  # not just through cpp. "Syntax error" is here to catch this case.
24492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24493/* end confdefs.h.  */
24494#ifdef __STDC__
24495# include <limits.h>
24496#else
24497# include <assert.h>
24498#endif
24499		     Syntax error
24500_ACEOF
24501if ac_fn_cxx_try_cpp "$LINENO"; then :
24502
24503else
24504  # Broken: fails on valid input.
24505continue
24506fi
24507rm -f conftest.err conftest.i conftest.$ac_ext
24508
24509  # OK, works on sane cases.  Now check whether nonexistent headers
24510  # can be detected and how.
24511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24512/* end confdefs.h.  */
24513#include <ac_nonexistent.h>
24514_ACEOF
24515if ac_fn_cxx_try_cpp "$LINENO"; then :
24516  # Broken: success on invalid input.
24517continue
24518else
24519  # Passes both tests.
24520ac_preproc_ok=:
24521break
24522fi
24523rm -f conftest.err conftest.i conftest.$ac_ext
24524
24525done
24526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24527rm -f conftest.i conftest.err conftest.$ac_ext
24528if $ac_preproc_ok; then :
24529  break
24530fi
24531
24532    done
24533    ac_cv_prog_CXXCPP=$CXXCPP
24534
24535fi
24536  CXXCPP=$ac_cv_prog_CXXCPP
24537else
24538  ac_cv_prog_CXXCPP=$CXXCPP
24539fi
24540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24541$as_echo "$CXXCPP" >&6; }
24542ac_preproc_ok=false
24543for ac_cxx_preproc_warn_flag in '' yes
24544do
24545  # Use a header file that comes with gcc, so configuring glibc
24546  # with a fresh cross-compiler works.
24547  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24548  # <limits.h> exists even on freestanding compilers.
24549  # On the NeXT, cc -E runs the code through the compiler's parser,
24550  # not just through cpp. "Syntax error" is here to catch this case.
24551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24552/* end confdefs.h.  */
24553#ifdef __STDC__
24554# include <limits.h>
24555#else
24556# include <assert.h>
24557#endif
24558		     Syntax error
24559_ACEOF
24560if ac_fn_cxx_try_cpp "$LINENO"; then :
24561
24562else
24563  # Broken: fails on valid input.
24564continue
24565fi
24566rm -f conftest.err conftest.i conftest.$ac_ext
24567
24568  # OK, works on sane cases.  Now check whether nonexistent headers
24569  # can be detected and how.
24570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24571/* end confdefs.h.  */
24572#include <ac_nonexistent.h>
24573_ACEOF
24574if ac_fn_cxx_try_cpp "$LINENO"; then :
24575  # Broken: success on invalid input.
24576continue
24577else
24578  # Passes both tests.
24579ac_preproc_ok=:
24580break
24581fi
24582rm -f conftest.err conftest.i conftest.$ac_ext
24583
24584done
24585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24586rm -f conftest.i conftest.err conftest.$ac_ext
24587if $ac_preproc_ok; then :
24588
24589else
24590  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24592as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24593See \`config.log' for more details" "$LINENO" 5 ; }
24594fi
24595
24596ac_ext=cpp
24597ac_cpp='$CXXCPP $CPPFLAGS'
24598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24601
24602
24603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24604
24605  # First separate the path from the arguments. This will split at the first
24606  # space.
24607  complete="$CXXCPP"
24608  path="${complete%% *}"
24609  tmp="$complete EOL"
24610  arguments="${tmp#* }"
24611
24612  # Input might be given as Windows format, start by converting to
24613  # unix format.
24614  new_path=`$CYGPATH -u "$path"`
24615
24616  # Now try to locate executable using which
24617  new_path=`$WHICH "$new_path" 2> /dev/null`
24618  # bat and cmd files are not always considered executable in cygwin causing which
24619  # to not find them
24620  if test "x$new_path" = x \
24621           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24622           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24623    new_path=`$CYGPATH -u "$path"`
24624  fi
24625  if test "x$new_path" = x; then
24626    # Oops. Which didn't find the executable.
24627    # The splitting of arguments from the executable at a space might have been incorrect,
24628    # since paths with space are more likely in Windows. Give it another try with the whole
24629    # argument.
24630    path="$complete"
24631    arguments="EOL"
24632    new_path=`$CYGPATH -u "$path"`
24633    new_path=`$WHICH "$new_path" 2> /dev/null`
24634    # bat and cmd files are not always considered executable in cygwin causing which
24635    # to not find them
24636    if test "x$new_path" = x \
24637             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24638             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24639      new_path=`$CYGPATH -u "$path"`
24640    fi
24641    if test "x$new_path" = x; then
24642      # It's still not found. Now this is an unrecoverable error.
24643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24644$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24645      has_space=`$ECHO "$complete" | $GREP " "`
24646      if test "x$has_space" != x; then
24647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24649      fi
24650      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24651    fi
24652  fi
24653
24654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24657  # "foo.exe" is OK but "foo" is an error.
24658  #
24659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24660  # It is also a way to make sure we got the proper file name for the real test later on.
24661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24662  if test "x$test_shortpath" = x; then
24663    # Short path failed, file does not exist as specified.
24664    # Try adding .exe or .cmd
24665    if test -f "${new_path}.exe"; then
24666       input_to_shortpath="${new_path}.exe"
24667    elif test -f "${new_path}.cmd"; then
24668       input_to_shortpath="${new_path}.cmd"
24669    else
24670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24671$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24674      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24675    fi
24676  else
24677    input_to_shortpath="$new_path"
24678  fi
24679
24680  # Call helper function which possibly converts this using DOS-style short mode.
24681  # If so, the updated path is stored in $new_path.
24682  new_path="$input_to_shortpath"
24683
24684  input_path="$input_to_shortpath"
24685  # Check if we need to convert this using DOS-style short mode. If the path
24686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24687  # take no chances and rewrite it.
24688  # Note: m4 eats our [], so we need to use [ and ] instead.
24689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24690  if test "x$has_forbidden_chars" != x; then
24691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24695      # Going to short mode and back again did indeed matter. Since short mode is
24696      # case insensitive, let's make it lowercase to improve readability.
24697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24698      # Now convert it back to Unix-stile (cygpath)
24699      input_path=`$CYGPATH -u "$shortmode_path"`
24700      new_path="$input_path"
24701    fi
24702  fi
24703
24704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24705  if test "x$test_cygdrive_prefix" = x; then
24706    # As a simple fix, exclude /usr/bin since it's not a real path.
24707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24709      # a path prefixed by /cygdrive for fixpath to work.
24710      new_path="$CYGWIN_ROOT_PATH$input_path"
24711    fi
24712  fi
24713
24714  # remove trailing .exe if any
24715  new_path="${new_path/%.exe/}"
24716
24717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718
24719  # First separate the path from the arguments. This will split at the first
24720  # space.
24721  complete="$CXXCPP"
24722  path="${complete%% *}"
24723  tmp="$complete EOL"
24724  arguments="${tmp#* }"
24725
24726  # Input might be given as Windows format, start by converting to
24727  # unix format.
24728  new_path="$path"
24729
24730  windows_path="$new_path"
24731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24732    unix_path=`$CYGPATH -u "$windows_path"`
24733    new_path="$unix_path"
24734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24736    new_path="$unix_path"
24737  fi
24738
24739
24740  # Now try to locate executable using which
24741  new_path=`$WHICH "$new_path" 2> /dev/null`
24742
24743  if test "x$new_path" = x; then
24744    # Oops. Which didn't find the executable.
24745    # The splitting of arguments from the executable at a space might have been incorrect,
24746    # since paths with space are more likely in Windows. Give it another try with the whole
24747    # argument.
24748    path="$complete"
24749    arguments="EOL"
24750    new_path="$path"
24751
24752  windows_path="$new_path"
24753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24754    unix_path=`$CYGPATH -u "$windows_path"`
24755    new_path="$unix_path"
24756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24758    new_path="$unix_path"
24759  fi
24760
24761
24762    new_path=`$WHICH "$new_path" 2> /dev/null`
24763
24764    if test "x$new_path" = x; then
24765      # It's still not found. Now this is an unrecoverable error.
24766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24767$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24768      has_space=`$ECHO "$complete" | $GREP " "`
24769      if test "x$has_space" != x; then
24770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24772      fi
24773      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24774    fi
24775  fi
24776
24777  # Now new_path has a complete unix path to the binary
24778  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24779    # Keep paths in /bin as-is, but remove trailing .exe if any
24780    new_path="${new_path/%.exe/}"
24781    # Do not save /bin paths to all_fixpath_prefixes!
24782  else
24783    # Not in mixed or Windows style, start by that.
24784    new_path=`cmd //c echo $new_path`
24785
24786  input_path="$new_path"
24787  # Check if we need to convert this using DOS-style short mode. If the path
24788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24789  # take no chances and rewrite it.
24790  # Note: m4 eats our [], so we need to use [ and ] instead.
24791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24792  if test "x$has_forbidden_chars" != x; then
24793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24795  fi
24796
24797    # Output is in $new_path
24798
24799  windows_path="$new_path"
24800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24801    unix_path=`$CYGPATH -u "$windows_path"`
24802    new_path="$unix_path"
24803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24805    new_path="$unix_path"
24806  fi
24807
24808    # remove trailing .exe if any
24809    new_path="${new_path/%.exe/}"
24810
24811    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24812    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24813  fi
24814
24815  else
24816    # We're on a posix platform. Hooray! :)
24817    # First separate the path from the arguments. This will split at the first
24818    # space.
24819    complete="$CXXCPP"
24820    path="${complete%% *}"
24821    tmp="$complete EOL"
24822    arguments="${tmp#* }"
24823
24824    # Cannot rely on the command "which" here since it doesn't always work.
24825    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24826    if test -z "$is_absolute_path"; then
24827      # Path to executable is not absolute. Find it.
24828      IFS_save="$IFS"
24829      IFS=:
24830      for p in $PATH; do
24831        if test -f "$p/$path" && test -x "$p/$path"; then
24832          new_path="$p/$path"
24833          break
24834        fi
24835      done
24836      IFS="$IFS_save"
24837    else
24838      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24839$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24840      new_path="$path"
24841    fi
24842
24843    if test "x$new_path" = x; then
24844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24845$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24846        has_space=`$ECHO "$complete" | $GREP " "`
24847        if test "x$has_space" != x; then
24848          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24850        fi
24851        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24852      fi
24853  fi
24854
24855      # Now join together the path and the arguments once again
24856      if test "x$arguments" != xEOL; then
24857        new_complete="$new_path ${arguments% *}"
24858      else
24859        new_complete="$new_path"
24860      fi
24861
24862  if test "x$complete" != "x$new_complete"; then
24863      CXXCPP="$new_complete"
24864      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24865$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24866    fi
24867
24868
24869if test "x$COMPILE_TYPE" != "xcross"; then
24870    # If we are not cross compiling, use the same compilers for
24871    # building the build platform executables. The cross-compilation
24872    # case needed to be done earlier, but this can only be done after
24873    # the native tools have been localized.
24874    BUILD_CC="$CC"
24875    BUILD_CXX="$CXX"
24876    BUILD_LD="$LD"
24877fi
24878
24879# for solaris we really need solaris tools, and not gnu equivalent
24880#   these seems to normally reside in /usr/ccs/bin so add that to path before
24881#   starting to probe
24882#
24883#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24884#         so that it can be overriden --with-tools-dir
24885if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24886    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24887fi
24888
24889# Find the right assembler.
24890if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24891    # Extract the first word of "as", so it can be a program name with args.
24892set dummy as; ac_word=$2
24893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24894$as_echo_n "checking for $ac_word... " >&6; }
24895if test "${ac_cv_path_AS+set}" = set; then :
24896  $as_echo_n "(cached) " >&6
24897else
24898  case $AS in
24899  [\\/]* | ?:[\\/]*)
24900  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24901  ;;
24902  *)
24903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24904for as_dir in $PATH
24905do
24906  IFS=$as_save_IFS
24907  test -z "$as_dir" && as_dir=.
24908    for ac_exec_ext in '' $ac_executable_extensions; do
24909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24910    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24912    break 2
24913  fi
24914done
24915  done
24916IFS=$as_save_IFS
24917
24918  ;;
24919esac
24920fi
24921AS=$ac_cv_path_AS
24922if test -n "$AS"; then
24923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24924$as_echo "$AS" >&6; }
24925else
24926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24927$as_echo "no" >&6; }
24928fi
24929
24930
24931
24932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24933
24934  # First separate the path from the arguments. This will split at the first
24935  # space.
24936  complete="$AS"
24937  path="${complete%% *}"
24938  tmp="$complete EOL"
24939  arguments="${tmp#* }"
24940
24941  # Input might be given as Windows format, start by converting to
24942  # unix format.
24943  new_path=`$CYGPATH -u "$path"`
24944
24945  # Now try to locate executable using which
24946  new_path=`$WHICH "$new_path" 2> /dev/null`
24947  # bat and cmd files are not always considered executable in cygwin causing which
24948  # to not find them
24949  if test "x$new_path" = x \
24950           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24951           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24952    new_path=`$CYGPATH -u "$path"`
24953  fi
24954  if test "x$new_path" = x; then
24955    # Oops. Which didn't find the executable.
24956    # The splitting of arguments from the executable at a space might have been incorrect,
24957    # since paths with space are more likely in Windows. Give it another try with the whole
24958    # argument.
24959    path="$complete"
24960    arguments="EOL"
24961    new_path=`$CYGPATH -u "$path"`
24962    new_path=`$WHICH "$new_path" 2> /dev/null`
24963    # bat and cmd files are not always considered executable in cygwin causing which
24964    # to not find them
24965    if test "x$new_path" = x \
24966             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24967             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24968      new_path=`$CYGPATH -u "$path"`
24969    fi
24970    if test "x$new_path" = x; then
24971      # It's still not found. Now this is an unrecoverable error.
24972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24973$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24974      has_space=`$ECHO "$complete" | $GREP " "`
24975      if test "x$has_space" != x; then
24976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24978      fi
24979      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24980    fi
24981  fi
24982
24983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24986  # "foo.exe" is OK but "foo" is an error.
24987  #
24988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24989  # It is also a way to make sure we got the proper file name for the real test later on.
24990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24991  if test "x$test_shortpath" = x; then
24992    # Short path failed, file does not exist as specified.
24993    # Try adding .exe or .cmd
24994    if test -f "${new_path}.exe"; then
24995       input_to_shortpath="${new_path}.exe"
24996    elif test -f "${new_path}.cmd"; then
24997       input_to_shortpath="${new_path}.cmd"
24998    else
24999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25000$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25003      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25004    fi
25005  else
25006    input_to_shortpath="$new_path"
25007  fi
25008
25009  # Call helper function which possibly converts this using DOS-style short mode.
25010  # If so, the updated path is stored in $new_path.
25011  new_path="$input_to_shortpath"
25012
25013  input_path="$input_to_shortpath"
25014  # Check if we need to convert this using DOS-style short mode. If the path
25015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25016  # take no chances and rewrite it.
25017  # Note: m4 eats our [], so we need to use [ and ] instead.
25018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25019  if test "x$has_forbidden_chars" != x; then
25020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25024      # Going to short mode and back again did indeed matter. Since short mode is
25025      # case insensitive, let's make it lowercase to improve readability.
25026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25027      # Now convert it back to Unix-stile (cygpath)
25028      input_path=`$CYGPATH -u "$shortmode_path"`
25029      new_path="$input_path"
25030    fi
25031  fi
25032
25033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25034  if test "x$test_cygdrive_prefix" = x; then
25035    # As a simple fix, exclude /usr/bin since it's not a real path.
25036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25038      # a path prefixed by /cygdrive for fixpath to work.
25039      new_path="$CYGWIN_ROOT_PATH$input_path"
25040    fi
25041  fi
25042
25043  # remove trailing .exe if any
25044  new_path="${new_path/%.exe/}"
25045
25046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25047
25048  # First separate the path from the arguments. This will split at the first
25049  # space.
25050  complete="$AS"
25051  path="${complete%% *}"
25052  tmp="$complete EOL"
25053  arguments="${tmp#* }"
25054
25055  # Input might be given as Windows format, start by converting to
25056  # unix format.
25057  new_path="$path"
25058
25059  windows_path="$new_path"
25060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25061    unix_path=`$CYGPATH -u "$windows_path"`
25062    new_path="$unix_path"
25063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25065    new_path="$unix_path"
25066  fi
25067
25068
25069  # Now try to locate executable using which
25070  new_path=`$WHICH "$new_path" 2> /dev/null`
25071
25072  if test "x$new_path" = x; then
25073    # Oops. Which didn't find the executable.
25074    # The splitting of arguments from the executable at a space might have been incorrect,
25075    # since paths with space are more likely in Windows. Give it another try with the whole
25076    # argument.
25077    path="$complete"
25078    arguments="EOL"
25079    new_path="$path"
25080
25081  windows_path="$new_path"
25082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25083    unix_path=`$CYGPATH -u "$windows_path"`
25084    new_path="$unix_path"
25085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25087    new_path="$unix_path"
25088  fi
25089
25090
25091    new_path=`$WHICH "$new_path" 2> /dev/null`
25092
25093    if test "x$new_path" = x; then
25094      # It's still not found. Now this is an unrecoverable error.
25095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25096$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25097      has_space=`$ECHO "$complete" | $GREP " "`
25098      if test "x$has_space" != x; then
25099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25101      fi
25102      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25103    fi
25104  fi
25105
25106  # Now new_path has a complete unix path to the binary
25107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25108    # Keep paths in /bin as-is, but remove trailing .exe if any
25109    new_path="${new_path/%.exe/}"
25110    # Do not save /bin paths to all_fixpath_prefixes!
25111  else
25112    # Not in mixed or Windows style, start by that.
25113    new_path=`cmd //c echo $new_path`
25114
25115  input_path="$new_path"
25116  # Check if we need to convert this using DOS-style short mode. If the path
25117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25118  # take no chances and rewrite it.
25119  # Note: m4 eats our [], so we need to use [ and ] instead.
25120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25121  if test "x$has_forbidden_chars" != x; then
25122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25124  fi
25125
25126    # Output is in $new_path
25127
25128  windows_path="$new_path"
25129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25130    unix_path=`$CYGPATH -u "$windows_path"`
25131    new_path="$unix_path"
25132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25134    new_path="$unix_path"
25135  fi
25136
25137    # remove trailing .exe if any
25138    new_path="${new_path/%.exe/}"
25139
25140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25142  fi
25143
25144  else
25145    # We're on a posix platform. Hooray! :)
25146    # First separate the path from the arguments. This will split at the first
25147    # space.
25148    complete="$AS"
25149    path="${complete%% *}"
25150    tmp="$complete EOL"
25151    arguments="${tmp#* }"
25152
25153    # Cannot rely on the command "which" here since it doesn't always work.
25154    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25155    if test -z "$is_absolute_path"; then
25156      # Path to executable is not absolute. Find it.
25157      IFS_save="$IFS"
25158      IFS=:
25159      for p in $PATH; do
25160        if test -f "$p/$path" && test -x "$p/$path"; then
25161          new_path="$p/$path"
25162          break
25163        fi
25164      done
25165      IFS="$IFS_save"
25166    else
25167      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25168$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25169      new_path="$path"
25170    fi
25171
25172    if test "x$new_path" = x; then
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25174$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25175        has_space=`$ECHO "$complete" | $GREP " "`
25176        if test "x$has_space" != x; then
25177          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25179        fi
25180        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25181      fi
25182  fi
25183
25184      # Now join together the path and the arguments once again
25185      if test "x$arguments" != xEOL; then
25186        new_complete="$new_path ${arguments% *}"
25187      else
25188        new_complete="$new_path"
25189      fi
25190
25191  if test "x$complete" != "x$new_complete"; then
25192      AS="$new_complete"
25193      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25194$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25195    fi
25196
25197else
25198    AS="$CC -c"
25199fi
25200
25201
25202if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25203    # Extract the first word of "nm", so it can be a program name with args.
25204set dummy nm; ac_word=$2
25205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25206$as_echo_n "checking for $ac_word... " >&6; }
25207if test "${ac_cv_path_NM+set}" = set; then :
25208  $as_echo_n "(cached) " >&6
25209else
25210  case $NM in
25211  [\\/]* | ?:[\\/]*)
25212  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25213  ;;
25214  *)
25215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25216for as_dir in $PATH
25217do
25218  IFS=$as_save_IFS
25219  test -z "$as_dir" && as_dir=.
25220    for ac_exec_ext in '' $ac_executable_extensions; do
25221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25222    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25224    break 2
25225  fi
25226done
25227  done
25228IFS=$as_save_IFS
25229
25230  ;;
25231esac
25232fi
25233NM=$ac_cv_path_NM
25234if test -n "$NM"; then
25235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25236$as_echo "$NM" >&6; }
25237else
25238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25239$as_echo "no" >&6; }
25240fi
25241
25242
25243
25244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25245
25246  # First separate the path from the arguments. This will split at the first
25247  # space.
25248  complete="$NM"
25249  path="${complete%% *}"
25250  tmp="$complete EOL"
25251  arguments="${tmp#* }"
25252
25253  # Input might be given as Windows format, start by converting to
25254  # unix format.
25255  new_path=`$CYGPATH -u "$path"`
25256
25257  # Now try to locate executable using which
25258  new_path=`$WHICH "$new_path" 2> /dev/null`
25259  # bat and cmd files are not always considered executable in cygwin causing which
25260  # to not find them
25261  if test "x$new_path" = x \
25262           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25263           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25264    new_path=`$CYGPATH -u "$path"`
25265  fi
25266  if test "x$new_path" = x; then
25267    # Oops. Which didn't find the executable.
25268    # The splitting of arguments from the executable at a space might have been incorrect,
25269    # since paths with space are more likely in Windows. Give it another try with the whole
25270    # argument.
25271    path="$complete"
25272    arguments="EOL"
25273    new_path=`$CYGPATH -u "$path"`
25274    new_path=`$WHICH "$new_path" 2> /dev/null`
25275    # bat and cmd files are not always considered executable in cygwin causing which
25276    # to not find them
25277    if test "x$new_path" = x \
25278             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25279             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25280      new_path=`$CYGPATH -u "$path"`
25281    fi
25282    if test "x$new_path" = x; then
25283      # It's still not found. Now this is an unrecoverable error.
25284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25285$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25286      has_space=`$ECHO "$complete" | $GREP " "`
25287      if test "x$has_space" != x; then
25288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25290      fi
25291      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25292    fi
25293  fi
25294
25295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25298  # "foo.exe" is OK but "foo" is an error.
25299  #
25300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25301  # It is also a way to make sure we got the proper file name for the real test later on.
25302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25303  if test "x$test_shortpath" = x; then
25304    # Short path failed, file does not exist as specified.
25305    # Try adding .exe or .cmd
25306    if test -f "${new_path}.exe"; then
25307       input_to_shortpath="${new_path}.exe"
25308    elif test -f "${new_path}.cmd"; then
25309       input_to_shortpath="${new_path}.cmd"
25310    else
25311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25312$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25315      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25316    fi
25317  else
25318    input_to_shortpath="$new_path"
25319  fi
25320
25321  # Call helper function which possibly converts this using DOS-style short mode.
25322  # If so, the updated path is stored in $new_path.
25323  new_path="$input_to_shortpath"
25324
25325  input_path="$input_to_shortpath"
25326  # Check if we need to convert this using DOS-style short mode. If the path
25327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25328  # take no chances and rewrite it.
25329  # Note: m4 eats our [], so we need to use [ and ] instead.
25330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25331  if test "x$has_forbidden_chars" != x; then
25332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25336      # Going to short mode and back again did indeed matter. Since short mode is
25337      # case insensitive, let's make it lowercase to improve readability.
25338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25339      # Now convert it back to Unix-stile (cygpath)
25340      input_path=`$CYGPATH -u "$shortmode_path"`
25341      new_path="$input_path"
25342    fi
25343  fi
25344
25345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25346  if test "x$test_cygdrive_prefix" = x; then
25347    # As a simple fix, exclude /usr/bin since it's not a real path.
25348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25350      # a path prefixed by /cygdrive for fixpath to work.
25351      new_path="$CYGWIN_ROOT_PATH$input_path"
25352    fi
25353  fi
25354
25355  # remove trailing .exe if any
25356  new_path="${new_path/%.exe/}"
25357
25358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25359
25360  # First separate the path from the arguments. This will split at the first
25361  # space.
25362  complete="$NM"
25363  path="${complete%% *}"
25364  tmp="$complete EOL"
25365  arguments="${tmp#* }"
25366
25367  # Input might be given as Windows format, start by converting to
25368  # unix format.
25369  new_path="$path"
25370
25371  windows_path="$new_path"
25372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25373    unix_path=`$CYGPATH -u "$windows_path"`
25374    new_path="$unix_path"
25375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25377    new_path="$unix_path"
25378  fi
25379
25380
25381  # Now try to locate executable using which
25382  new_path=`$WHICH "$new_path" 2> /dev/null`
25383
25384  if test "x$new_path" = x; then
25385    # Oops. Which didn't find the executable.
25386    # The splitting of arguments from the executable at a space might have been incorrect,
25387    # since paths with space are more likely in Windows. Give it another try with the whole
25388    # argument.
25389    path="$complete"
25390    arguments="EOL"
25391    new_path="$path"
25392
25393  windows_path="$new_path"
25394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25395    unix_path=`$CYGPATH -u "$windows_path"`
25396    new_path="$unix_path"
25397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25399    new_path="$unix_path"
25400  fi
25401
25402
25403    new_path=`$WHICH "$new_path" 2> /dev/null`
25404
25405    if test "x$new_path" = x; then
25406      # It's still not found. Now this is an unrecoverable error.
25407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25408$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25409      has_space=`$ECHO "$complete" | $GREP " "`
25410      if test "x$has_space" != x; then
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25413      fi
25414      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25415    fi
25416  fi
25417
25418  # Now new_path has a complete unix path to the binary
25419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25420    # Keep paths in /bin as-is, but remove trailing .exe if any
25421    new_path="${new_path/%.exe/}"
25422    # Do not save /bin paths to all_fixpath_prefixes!
25423  else
25424    # Not in mixed or Windows style, start by that.
25425    new_path=`cmd //c echo $new_path`
25426
25427  input_path="$new_path"
25428  # Check if we need to convert this using DOS-style short mode. If the path
25429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25430  # take no chances and rewrite it.
25431  # Note: m4 eats our [], so we need to use [ and ] instead.
25432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25433  if test "x$has_forbidden_chars" != x; then
25434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436  fi
25437
25438    # Output is in $new_path
25439
25440  windows_path="$new_path"
25441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25442    unix_path=`$CYGPATH -u "$windows_path"`
25443    new_path="$unix_path"
25444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25446    new_path="$unix_path"
25447  fi
25448
25449    # remove trailing .exe if any
25450    new_path="${new_path/%.exe/}"
25451
25452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25454  fi
25455
25456  else
25457    # We're on a posix platform. Hooray! :)
25458    # First separate the path from the arguments. This will split at the first
25459    # space.
25460    complete="$NM"
25461    path="${complete%% *}"
25462    tmp="$complete EOL"
25463    arguments="${tmp#* }"
25464
25465    # Cannot rely on the command "which" here since it doesn't always work.
25466    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25467    if test -z "$is_absolute_path"; then
25468      # Path to executable is not absolute. Find it.
25469      IFS_save="$IFS"
25470      IFS=:
25471      for p in $PATH; do
25472        if test -f "$p/$path" && test -x "$p/$path"; then
25473          new_path="$p/$path"
25474          break
25475        fi
25476      done
25477      IFS="$IFS_save"
25478    else
25479      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25480$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25481      new_path="$path"
25482    fi
25483
25484    if test "x$new_path" = x; then
25485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25486$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25487        has_space=`$ECHO "$complete" | $GREP " "`
25488        if test "x$has_space" != x; then
25489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25491        fi
25492        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25493      fi
25494  fi
25495
25496      # Now join together the path and the arguments once again
25497      if test "x$arguments" != xEOL; then
25498        new_complete="$new_path ${arguments% *}"
25499      else
25500        new_complete="$new_path"
25501      fi
25502
25503  if test "x$complete" != "x$new_complete"; then
25504      NM="$new_complete"
25505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25506$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25507    fi
25508
25509    # Extract the first word of "gnm", so it can be a program name with args.
25510set dummy gnm; ac_word=$2
25511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25512$as_echo_n "checking for $ac_word... " >&6; }
25513if test "${ac_cv_path_GNM+set}" = set; then :
25514  $as_echo_n "(cached) " >&6
25515else
25516  case $GNM in
25517  [\\/]* | ?:[\\/]*)
25518  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25519  ;;
25520  *)
25521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25522for as_dir in $PATH
25523do
25524  IFS=$as_save_IFS
25525  test -z "$as_dir" && as_dir=.
25526    for ac_exec_ext in '' $ac_executable_extensions; do
25527  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25528    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25530    break 2
25531  fi
25532done
25533  done
25534IFS=$as_save_IFS
25535
25536  ;;
25537esac
25538fi
25539GNM=$ac_cv_path_GNM
25540if test -n "$GNM"; then
25541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25542$as_echo "$GNM" >&6; }
25543else
25544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25545$as_echo "no" >&6; }
25546fi
25547
25548
25549
25550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25551
25552  # First separate the path from the arguments. This will split at the first
25553  # space.
25554  complete="$GNM"
25555  path="${complete%% *}"
25556  tmp="$complete EOL"
25557  arguments="${tmp#* }"
25558
25559  # Input might be given as Windows format, start by converting to
25560  # unix format.
25561  new_path=`$CYGPATH -u "$path"`
25562
25563  # Now try to locate executable using which
25564  new_path=`$WHICH "$new_path" 2> /dev/null`
25565  # bat and cmd files are not always considered executable in cygwin causing which
25566  # to not find them
25567  if test "x$new_path" = x \
25568           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25569           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25570    new_path=`$CYGPATH -u "$path"`
25571  fi
25572  if test "x$new_path" = x; then
25573    # Oops. Which didn't find the executable.
25574    # The splitting of arguments from the executable at a space might have been incorrect,
25575    # since paths with space are more likely in Windows. Give it another try with the whole
25576    # argument.
25577    path="$complete"
25578    arguments="EOL"
25579    new_path=`$CYGPATH -u "$path"`
25580    new_path=`$WHICH "$new_path" 2> /dev/null`
25581    # bat and cmd files are not always considered executable in cygwin causing which
25582    # to not find them
25583    if test "x$new_path" = x \
25584             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25585             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25586      new_path=`$CYGPATH -u "$path"`
25587    fi
25588    if test "x$new_path" = x; then
25589      # It's still not found. Now this is an unrecoverable error.
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25591$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25592      has_space=`$ECHO "$complete" | $GREP " "`
25593      if test "x$has_space" != x; then
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25596      fi
25597      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25598    fi
25599  fi
25600
25601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25604  # "foo.exe" is OK but "foo" is an error.
25605  #
25606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25607  # It is also a way to make sure we got the proper file name for the real test later on.
25608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25609  if test "x$test_shortpath" = x; then
25610    # Short path failed, file does not exist as specified.
25611    # Try adding .exe or .cmd
25612    if test -f "${new_path}.exe"; then
25613       input_to_shortpath="${new_path}.exe"
25614    elif test -f "${new_path}.cmd"; then
25615       input_to_shortpath="${new_path}.cmd"
25616    else
25617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25618$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25619      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25620$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25621      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25622    fi
25623  else
25624    input_to_shortpath="$new_path"
25625  fi
25626
25627  # Call helper function which possibly converts this using DOS-style short mode.
25628  # If so, the updated path is stored in $new_path.
25629  new_path="$input_to_shortpath"
25630
25631  input_path="$input_to_shortpath"
25632  # Check if we need to convert this using DOS-style short mode. If the path
25633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25634  # take no chances and rewrite it.
25635  # Note: m4 eats our [], so we need to use [ and ] instead.
25636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25637  if test "x$has_forbidden_chars" != x; then
25638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25642      # Going to short mode and back again did indeed matter. Since short mode is
25643      # case insensitive, let's make it lowercase to improve readability.
25644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25645      # Now convert it back to Unix-stile (cygpath)
25646      input_path=`$CYGPATH -u "$shortmode_path"`
25647      new_path="$input_path"
25648    fi
25649  fi
25650
25651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25652  if test "x$test_cygdrive_prefix" = x; then
25653    # As a simple fix, exclude /usr/bin since it's not a real path.
25654    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25656      # a path prefixed by /cygdrive for fixpath to work.
25657      new_path="$CYGWIN_ROOT_PATH$input_path"
25658    fi
25659  fi
25660
25661  # remove trailing .exe if any
25662  new_path="${new_path/%.exe/}"
25663
25664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25665
25666  # First separate the path from the arguments. This will split at the first
25667  # space.
25668  complete="$GNM"
25669  path="${complete%% *}"
25670  tmp="$complete EOL"
25671  arguments="${tmp#* }"
25672
25673  # Input might be given as Windows format, start by converting to
25674  # unix format.
25675  new_path="$path"
25676
25677  windows_path="$new_path"
25678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25679    unix_path=`$CYGPATH -u "$windows_path"`
25680    new_path="$unix_path"
25681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25683    new_path="$unix_path"
25684  fi
25685
25686
25687  # Now try to locate executable using which
25688  new_path=`$WHICH "$new_path" 2> /dev/null`
25689
25690  if test "x$new_path" = x; then
25691    # Oops. Which didn't find the executable.
25692    # The splitting of arguments from the executable at a space might have been incorrect,
25693    # since paths with space are more likely in Windows. Give it another try with the whole
25694    # argument.
25695    path="$complete"
25696    arguments="EOL"
25697    new_path="$path"
25698
25699  windows_path="$new_path"
25700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25701    unix_path=`$CYGPATH -u "$windows_path"`
25702    new_path="$unix_path"
25703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25705    new_path="$unix_path"
25706  fi
25707
25708
25709    new_path=`$WHICH "$new_path" 2> /dev/null`
25710
25711    if test "x$new_path" = x; then
25712      # It's still not found. Now this is an unrecoverable error.
25713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25714$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25715      has_space=`$ECHO "$complete" | $GREP " "`
25716      if test "x$has_space" != x; then
25717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25719      fi
25720      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25721    fi
25722  fi
25723
25724  # Now new_path has a complete unix path to the binary
25725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25726    # Keep paths in /bin as-is, but remove trailing .exe if any
25727    new_path="${new_path/%.exe/}"
25728    # Do not save /bin paths to all_fixpath_prefixes!
25729  else
25730    # Not in mixed or Windows style, start by that.
25731    new_path=`cmd //c echo $new_path`
25732
25733  input_path="$new_path"
25734  # Check if we need to convert this using DOS-style short mode. If the path
25735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25736  # take no chances and rewrite it.
25737  # Note: m4 eats our [], so we need to use [ and ] instead.
25738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25739  if test "x$has_forbidden_chars" != x; then
25740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25742  fi
25743
25744    # Output is in $new_path
25745
25746  windows_path="$new_path"
25747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25748    unix_path=`$CYGPATH -u "$windows_path"`
25749    new_path="$unix_path"
25750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25752    new_path="$unix_path"
25753  fi
25754
25755    # remove trailing .exe if any
25756    new_path="${new_path/%.exe/}"
25757
25758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25760  fi
25761
25762  else
25763    # We're on a posix platform. Hooray! :)
25764    # First separate the path from the arguments. This will split at the first
25765    # space.
25766    complete="$GNM"
25767    path="${complete%% *}"
25768    tmp="$complete EOL"
25769    arguments="${tmp#* }"
25770
25771    # Cannot rely on the command "which" here since it doesn't always work.
25772    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25773    if test -z "$is_absolute_path"; then
25774      # Path to executable is not absolute. Find it.
25775      IFS_save="$IFS"
25776      IFS=:
25777      for p in $PATH; do
25778        if test -f "$p/$path" && test -x "$p/$path"; then
25779          new_path="$p/$path"
25780          break
25781        fi
25782      done
25783      IFS="$IFS_save"
25784    else
25785      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25786$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25787      new_path="$path"
25788    fi
25789
25790    if test "x$new_path" = x; then
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25792$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25793        has_space=`$ECHO "$complete" | $GREP " "`
25794        if test "x$has_space" != x; then
25795          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25797        fi
25798        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25799      fi
25800  fi
25801
25802      # Now join together the path and the arguments once again
25803      if test "x$arguments" != xEOL; then
25804        new_complete="$new_path ${arguments% *}"
25805      else
25806        new_complete="$new_path"
25807      fi
25808
25809  if test "x$complete" != "x$new_complete"; then
25810      GNM="$new_complete"
25811      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25812$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25813    fi
25814
25815    # Extract the first word of "strip", so it can be a program name with args.
25816set dummy strip; ac_word=$2
25817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25818$as_echo_n "checking for $ac_word... " >&6; }
25819if test "${ac_cv_path_STRIP+set}" = set; then :
25820  $as_echo_n "(cached) " >&6
25821else
25822  case $STRIP in
25823  [\\/]* | ?:[\\/]*)
25824  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25825  ;;
25826  *)
25827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25828for as_dir in $PATH
25829do
25830  IFS=$as_save_IFS
25831  test -z "$as_dir" && as_dir=.
25832    for ac_exec_ext in '' $ac_executable_extensions; do
25833  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25834    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25836    break 2
25837  fi
25838done
25839  done
25840IFS=$as_save_IFS
25841
25842  ;;
25843esac
25844fi
25845STRIP=$ac_cv_path_STRIP
25846if test -n "$STRIP"; then
25847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25848$as_echo "$STRIP" >&6; }
25849else
25850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25851$as_echo "no" >&6; }
25852fi
25853
25854
25855
25856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25857
25858  # First separate the path from the arguments. This will split at the first
25859  # space.
25860  complete="$STRIP"
25861  path="${complete%% *}"
25862  tmp="$complete EOL"
25863  arguments="${tmp#* }"
25864
25865  # Input might be given as Windows format, start by converting to
25866  # unix format.
25867  new_path=`$CYGPATH -u "$path"`
25868
25869  # Now try to locate executable using which
25870  new_path=`$WHICH "$new_path" 2> /dev/null`
25871  # bat and cmd files are not always considered executable in cygwin causing which
25872  # to not find them
25873  if test "x$new_path" = x \
25874           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25875           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25876    new_path=`$CYGPATH -u "$path"`
25877  fi
25878  if test "x$new_path" = x; then
25879    # Oops. Which didn't find the executable.
25880    # The splitting of arguments from the executable at a space might have been incorrect,
25881    # since paths with space are more likely in Windows. Give it another try with the whole
25882    # argument.
25883    path="$complete"
25884    arguments="EOL"
25885    new_path=`$CYGPATH -u "$path"`
25886    new_path=`$WHICH "$new_path" 2> /dev/null`
25887    # bat and cmd files are not always considered executable in cygwin causing which
25888    # to not find them
25889    if test "x$new_path" = x \
25890             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25891             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25892      new_path=`$CYGPATH -u "$path"`
25893    fi
25894    if test "x$new_path" = x; then
25895      # It's still not found. Now this is an unrecoverable error.
25896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25897$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25898      has_space=`$ECHO "$complete" | $GREP " "`
25899      if test "x$has_space" != x; then
25900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25902      fi
25903      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25904    fi
25905  fi
25906
25907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25910  # "foo.exe" is OK but "foo" is an error.
25911  #
25912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25913  # It is also a way to make sure we got the proper file name for the real test later on.
25914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25915  if test "x$test_shortpath" = x; then
25916    # Short path failed, file does not exist as specified.
25917    # Try adding .exe or .cmd
25918    if test -f "${new_path}.exe"; then
25919       input_to_shortpath="${new_path}.exe"
25920    elif test -f "${new_path}.cmd"; then
25921       input_to_shortpath="${new_path}.cmd"
25922    else
25923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25924$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25927      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25928    fi
25929  else
25930    input_to_shortpath="$new_path"
25931  fi
25932
25933  # Call helper function which possibly converts this using DOS-style short mode.
25934  # If so, the updated path is stored in $new_path.
25935  new_path="$input_to_shortpath"
25936
25937  input_path="$input_to_shortpath"
25938  # Check if we need to convert this using DOS-style short mode. If the path
25939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25940  # take no chances and rewrite it.
25941  # Note: m4 eats our [], so we need to use [ and ] instead.
25942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25943  if test "x$has_forbidden_chars" != x; then
25944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25948      # Going to short mode and back again did indeed matter. Since short mode is
25949      # case insensitive, let's make it lowercase to improve readability.
25950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25951      # Now convert it back to Unix-stile (cygpath)
25952      input_path=`$CYGPATH -u "$shortmode_path"`
25953      new_path="$input_path"
25954    fi
25955  fi
25956
25957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25958  if test "x$test_cygdrive_prefix" = x; then
25959    # As a simple fix, exclude /usr/bin since it's not a real path.
25960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25962      # a path prefixed by /cygdrive for fixpath to work.
25963      new_path="$CYGWIN_ROOT_PATH$input_path"
25964    fi
25965  fi
25966
25967  # remove trailing .exe if any
25968  new_path="${new_path/%.exe/}"
25969
25970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25971
25972  # First separate the path from the arguments. This will split at the first
25973  # space.
25974  complete="$STRIP"
25975  path="${complete%% *}"
25976  tmp="$complete EOL"
25977  arguments="${tmp#* }"
25978
25979  # Input might be given as Windows format, start by converting to
25980  # unix format.
25981  new_path="$path"
25982
25983  windows_path="$new_path"
25984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25985    unix_path=`$CYGPATH -u "$windows_path"`
25986    new_path="$unix_path"
25987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25989    new_path="$unix_path"
25990  fi
25991
25992
25993  # Now try to locate executable using which
25994  new_path=`$WHICH "$new_path" 2> /dev/null`
25995
25996  if test "x$new_path" = x; then
25997    # Oops. Which didn't find the executable.
25998    # The splitting of arguments from the executable at a space might have been incorrect,
25999    # since paths with space are more likely in Windows. Give it another try with the whole
26000    # argument.
26001    path="$complete"
26002    arguments="EOL"
26003    new_path="$path"
26004
26005  windows_path="$new_path"
26006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007    unix_path=`$CYGPATH -u "$windows_path"`
26008    new_path="$unix_path"
26009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26011    new_path="$unix_path"
26012  fi
26013
26014
26015    new_path=`$WHICH "$new_path" 2> /dev/null`
26016
26017    if test "x$new_path" = x; then
26018      # It's still not found. Now this is an unrecoverable error.
26019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26020$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26021      has_space=`$ECHO "$complete" | $GREP " "`
26022      if test "x$has_space" != x; then
26023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26025      fi
26026      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26027    fi
26028  fi
26029
26030  # Now new_path has a complete unix path to the binary
26031  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26032    # Keep paths in /bin as-is, but remove trailing .exe if any
26033    new_path="${new_path/%.exe/}"
26034    # Do not save /bin paths to all_fixpath_prefixes!
26035  else
26036    # Not in mixed or Windows style, start by that.
26037    new_path=`cmd //c echo $new_path`
26038
26039  input_path="$new_path"
26040  # Check if we need to convert this using DOS-style short mode. If the path
26041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26042  # take no chances and rewrite it.
26043  # Note: m4 eats our [], so we need to use [ and ] instead.
26044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26045  if test "x$has_forbidden_chars" != x; then
26046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26048  fi
26049
26050    # Output is in $new_path
26051
26052  windows_path="$new_path"
26053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26054    unix_path=`$CYGPATH -u "$windows_path"`
26055    new_path="$unix_path"
26056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26058    new_path="$unix_path"
26059  fi
26060
26061    # remove trailing .exe if any
26062    new_path="${new_path/%.exe/}"
26063
26064    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26065    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26066  fi
26067
26068  else
26069    # We're on a posix platform. Hooray! :)
26070    # First separate the path from the arguments. This will split at the first
26071    # space.
26072    complete="$STRIP"
26073    path="${complete%% *}"
26074    tmp="$complete EOL"
26075    arguments="${tmp#* }"
26076
26077    # Cannot rely on the command "which" here since it doesn't always work.
26078    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26079    if test -z "$is_absolute_path"; then
26080      # Path to executable is not absolute. Find it.
26081      IFS_save="$IFS"
26082      IFS=:
26083      for p in $PATH; do
26084        if test -f "$p/$path" && test -x "$p/$path"; then
26085          new_path="$p/$path"
26086          break
26087        fi
26088      done
26089      IFS="$IFS_save"
26090    else
26091      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26092$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26093      new_path="$path"
26094    fi
26095
26096    if test "x$new_path" = x; then
26097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26098$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26099        has_space=`$ECHO "$complete" | $GREP " "`
26100        if test "x$has_space" != x; then
26101          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26103        fi
26104        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26105      fi
26106  fi
26107
26108      # Now join together the path and the arguments once again
26109      if test "x$arguments" != xEOL; then
26110        new_complete="$new_path ${arguments% *}"
26111      else
26112        new_complete="$new_path"
26113      fi
26114
26115  if test "x$complete" != "x$new_complete"; then
26116      STRIP="$new_complete"
26117      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26118$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26119    fi
26120
26121    # Extract the first word of "mcs", so it can be a program name with args.
26122set dummy mcs; ac_word=$2
26123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26124$as_echo_n "checking for $ac_word... " >&6; }
26125if test "${ac_cv_path_MCS+set}" = set; then :
26126  $as_echo_n "(cached) " >&6
26127else
26128  case $MCS in
26129  [\\/]* | ?:[\\/]*)
26130  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26131  ;;
26132  *)
26133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26134for as_dir in $PATH
26135do
26136  IFS=$as_save_IFS
26137  test -z "$as_dir" && as_dir=.
26138    for ac_exec_ext in '' $ac_executable_extensions; do
26139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26140    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26142    break 2
26143  fi
26144done
26145  done
26146IFS=$as_save_IFS
26147
26148  ;;
26149esac
26150fi
26151MCS=$ac_cv_path_MCS
26152if test -n "$MCS"; then
26153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26154$as_echo "$MCS" >&6; }
26155else
26156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26157$as_echo "no" >&6; }
26158fi
26159
26160
26161
26162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26163
26164  # First separate the path from the arguments. This will split at the first
26165  # space.
26166  complete="$MCS"
26167  path="${complete%% *}"
26168  tmp="$complete EOL"
26169  arguments="${tmp#* }"
26170
26171  # Input might be given as Windows format, start by converting to
26172  # unix format.
26173  new_path=`$CYGPATH -u "$path"`
26174
26175  # Now try to locate executable using which
26176  new_path=`$WHICH "$new_path" 2> /dev/null`
26177  # bat and cmd files are not always considered executable in cygwin causing which
26178  # to not find them
26179  if test "x$new_path" = x \
26180           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26181           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26182    new_path=`$CYGPATH -u "$path"`
26183  fi
26184  if test "x$new_path" = x; then
26185    # Oops. Which didn't find the executable.
26186    # The splitting of arguments from the executable at a space might have been incorrect,
26187    # since paths with space are more likely in Windows. Give it another try with the whole
26188    # argument.
26189    path="$complete"
26190    arguments="EOL"
26191    new_path=`$CYGPATH -u "$path"`
26192    new_path=`$WHICH "$new_path" 2> /dev/null`
26193    # bat and cmd files are not always considered executable in cygwin causing which
26194    # to not find them
26195    if test "x$new_path" = x \
26196             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26197             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26198      new_path=`$CYGPATH -u "$path"`
26199    fi
26200    if test "x$new_path" = x; then
26201      # It's still not found. Now this is an unrecoverable error.
26202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26203$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26204      has_space=`$ECHO "$complete" | $GREP " "`
26205      if test "x$has_space" != x; then
26206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26208      fi
26209      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26210    fi
26211  fi
26212
26213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26216  # "foo.exe" is OK but "foo" is an error.
26217  #
26218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26219  # It is also a way to make sure we got the proper file name for the real test later on.
26220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26221  if test "x$test_shortpath" = x; then
26222    # Short path failed, file does not exist as specified.
26223    # Try adding .exe or .cmd
26224    if test -f "${new_path}.exe"; then
26225       input_to_shortpath="${new_path}.exe"
26226    elif test -f "${new_path}.cmd"; then
26227       input_to_shortpath="${new_path}.cmd"
26228    else
26229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26230$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26231      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26232$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26233      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26234    fi
26235  else
26236    input_to_shortpath="$new_path"
26237  fi
26238
26239  # Call helper function which possibly converts this using DOS-style short mode.
26240  # If so, the updated path is stored in $new_path.
26241  new_path="$input_to_shortpath"
26242
26243  input_path="$input_to_shortpath"
26244  # Check if we need to convert this using DOS-style short mode. If the path
26245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26246  # take no chances and rewrite it.
26247  # Note: m4 eats our [], so we need to use [ and ] instead.
26248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26249  if test "x$has_forbidden_chars" != x; then
26250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26254      # Going to short mode and back again did indeed matter. Since short mode is
26255      # case insensitive, let's make it lowercase to improve readability.
26256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26257      # Now convert it back to Unix-stile (cygpath)
26258      input_path=`$CYGPATH -u "$shortmode_path"`
26259      new_path="$input_path"
26260    fi
26261  fi
26262
26263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26264  if test "x$test_cygdrive_prefix" = x; then
26265    # As a simple fix, exclude /usr/bin since it's not a real path.
26266    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26268      # a path prefixed by /cygdrive for fixpath to work.
26269      new_path="$CYGWIN_ROOT_PATH$input_path"
26270    fi
26271  fi
26272
26273  # remove trailing .exe if any
26274  new_path="${new_path/%.exe/}"
26275
26276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26277
26278  # First separate the path from the arguments. This will split at the first
26279  # space.
26280  complete="$MCS"
26281  path="${complete%% *}"
26282  tmp="$complete EOL"
26283  arguments="${tmp#* }"
26284
26285  # Input might be given as Windows format, start by converting to
26286  # unix format.
26287  new_path="$path"
26288
26289  windows_path="$new_path"
26290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26291    unix_path=`$CYGPATH -u "$windows_path"`
26292    new_path="$unix_path"
26293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26295    new_path="$unix_path"
26296  fi
26297
26298
26299  # Now try to locate executable using which
26300  new_path=`$WHICH "$new_path" 2> /dev/null`
26301
26302  if test "x$new_path" = x; then
26303    # Oops. Which didn't find the executable.
26304    # The splitting of arguments from the executable at a space might have been incorrect,
26305    # since paths with space are more likely in Windows. Give it another try with the whole
26306    # argument.
26307    path="$complete"
26308    arguments="EOL"
26309    new_path="$path"
26310
26311  windows_path="$new_path"
26312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26313    unix_path=`$CYGPATH -u "$windows_path"`
26314    new_path="$unix_path"
26315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26317    new_path="$unix_path"
26318  fi
26319
26320
26321    new_path=`$WHICH "$new_path" 2> /dev/null`
26322
26323    if test "x$new_path" = x; then
26324      # It's still not found. Now this is an unrecoverable error.
26325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26326$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26327      has_space=`$ECHO "$complete" | $GREP " "`
26328      if test "x$has_space" != x; then
26329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26331      fi
26332      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26333    fi
26334  fi
26335
26336  # Now new_path has a complete unix path to the binary
26337  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26338    # Keep paths in /bin as-is, but remove trailing .exe if any
26339    new_path="${new_path/%.exe/}"
26340    # Do not save /bin paths to all_fixpath_prefixes!
26341  else
26342    # Not in mixed or Windows style, start by that.
26343    new_path=`cmd //c echo $new_path`
26344
26345  input_path="$new_path"
26346  # Check if we need to convert this using DOS-style short mode. If the path
26347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26348  # take no chances and rewrite it.
26349  # Note: m4 eats our [], so we need to use [ and ] instead.
26350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26351  if test "x$has_forbidden_chars" != x; then
26352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26354  fi
26355
26356    # Output is in $new_path
26357
26358  windows_path="$new_path"
26359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26360    unix_path=`$CYGPATH -u "$windows_path"`
26361    new_path="$unix_path"
26362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26364    new_path="$unix_path"
26365  fi
26366
26367    # remove trailing .exe if any
26368    new_path="${new_path/%.exe/}"
26369
26370    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26371    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26372  fi
26373
26374  else
26375    # We're on a posix platform. Hooray! :)
26376    # First separate the path from the arguments. This will split at the first
26377    # space.
26378    complete="$MCS"
26379    path="${complete%% *}"
26380    tmp="$complete EOL"
26381    arguments="${tmp#* }"
26382
26383    # Cannot rely on the command "which" here since it doesn't always work.
26384    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26385    if test -z "$is_absolute_path"; then
26386      # Path to executable is not absolute. Find it.
26387      IFS_save="$IFS"
26388      IFS=:
26389      for p in $PATH; do
26390        if test -f "$p/$path" && test -x "$p/$path"; then
26391          new_path="$p/$path"
26392          break
26393        fi
26394      done
26395      IFS="$IFS_save"
26396    else
26397      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26398$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26399      new_path="$path"
26400    fi
26401
26402    if test "x$new_path" = x; then
26403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26404$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26405        has_space=`$ECHO "$complete" | $GREP " "`
26406        if test "x$has_space" != x; then
26407          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26408$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26409        fi
26410        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26411      fi
26412  fi
26413
26414      # Now join together the path and the arguments once again
26415      if test "x$arguments" != xEOL; then
26416        new_complete="$new_path ${arguments% *}"
26417      else
26418        new_complete="$new_path"
26419      fi
26420
26421  if test "x$complete" != "x$new_complete"; then
26422      MCS="$new_complete"
26423      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26424$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26425    fi
26426
26427elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26428    if test -n "$ac_tool_prefix"; then
26429  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26430set dummy ${ac_tool_prefix}nm; ac_word=$2
26431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26432$as_echo_n "checking for $ac_word... " >&6; }
26433if test "${ac_cv_prog_NM+set}" = set; then :
26434  $as_echo_n "(cached) " >&6
26435else
26436  if test -n "$NM"; then
26437  ac_cv_prog_NM="$NM" # Let the user override the test.
26438else
26439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26440for as_dir in $PATH
26441do
26442  IFS=$as_save_IFS
26443  test -z "$as_dir" && as_dir=.
26444    for ac_exec_ext in '' $ac_executable_extensions; do
26445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26446    ac_cv_prog_NM="${ac_tool_prefix}nm"
26447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26448    break 2
26449  fi
26450done
26451  done
26452IFS=$as_save_IFS
26453
26454fi
26455fi
26456NM=$ac_cv_prog_NM
26457if test -n "$NM"; then
26458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26459$as_echo "$NM" >&6; }
26460else
26461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26462$as_echo "no" >&6; }
26463fi
26464
26465
26466fi
26467if test -z "$ac_cv_prog_NM"; then
26468  ac_ct_NM=$NM
26469  # Extract the first word of "nm", so it can be a program name with args.
26470set dummy nm; ac_word=$2
26471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26472$as_echo_n "checking for $ac_word... " >&6; }
26473if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26474  $as_echo_n "(cached) " >&6
26475else
26476  if test -n "$ac_ct_NM"; then
26477  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26478else
26479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26480for as_dir in $PATH
26481do
26482  IFS=$as_save_IFS
26483  test -z "$as_dir" && as_dir=.
26484    for ac_exec_ext in '' $ac_executable_extensions; do
26485  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26486    ac_cv_prog_ac_ct_NM="nm"
26487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26488    break 2
26489  fi
26490done
26491  done
26492IFS=$as_save_IFS
26493
26494fi
26495fi
26496ac_ct_NM=$ac_cv_prog_ac_ct_NM
26497if test -n "$ac_ct_NM"; then
26498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26499$as_echo "$ac_ct_NM" >&6; }
26500else
26501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26502$as_echo "no" >&6; }
26503fi
26504
26505  if test "x$ac_ct_NM" = x; then
26506    NM=""
26507  else
26508    case $cross_compiling:$ac_tool_warned in
26509yes:)
26510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26512ac_tool_warned=yes ;;
26513esac
26514    NM=$ac_ct_NM
26515  fi
26516else
26517  NM="$ac_cv_prog_NM"
26518fi
26519
26520
26521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26522
26523  # First separate the path from the arguments. This will split at the first
26524  # space.
26525  complete="$NM"
26526  path="${complete%% *}"
26527  tmp="$complete EOL"
26528  arguments="${tmp#* }"
26529
26530  # Input might be given as Windows format, start by converting to
26531  # unix format.
26532  new_path=`$CYGPATH -u "$path"`
26533
26534  # Now try to locate executable using which
26535  new_path=`$WHICH "$new_path" 2> /dev/null`
26536  # bat and cmd files are not always considered executable in cygwin causing which
26537  # to not find them
26538  if test "x$new_path" = x \
26539           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26540           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26541    new_path=`$CYGPATH -u "$path"`
26542  fi
26543  if test "x$new_path" = x; then
26544    # Oops. Which didn't find the executable.
26545    # The splitting of arguments from the executable at a space might have been incorrect,
26546    # since paths with space are more likely in Windows. Give it another try with the whole
26547    # argument.
26548    path="$complete"
26549    arguments="EOL"
26550    new_path=`$CYGPATH -u "$path"`
26551    new_path=`$WHICH "$new_path" 2> /dev/null`
26552    # bat and cmd files are not always considered executable in cygwin causing which
26553    # to not find them
26554    if test "x$new_path" = x \
26555             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26556             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26557      new_path=`$CYGPATH -u "$path"`
26558    fi
26559    if test "x$new_path" = x; then
26560      # It's still not found. Now this is an unrecoverable error.
26561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26562$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26563      has_space=`$ECHO "$complete" | $GREP " "`
26564      if test "x$has_space" != x; then
26565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26567      fi
26568      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26569    fi
26570  fi
26571
26572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26575  # "foo.exe" is OK but "foo" is an error.
26576  #
26577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26578  # It is also a way to make sure we got the proper file name for the real test later on.
26579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26580  if test "x$test_shortpath" = x; then
26581    # Short path failed, file does not exist as specified.
26582    # Try adding .exe or .cmd
26583    if test -f "${new_path}.exe"; then
26584       input_to_shortpath="${new_path}.exe"
26585    elif test -f "${new_path}.cmd"; then
26586       input_to_shortpath="${new_path}.cmd"
26587    else
26588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26589$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26592      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26593    fi
26594  else
26595    input_to_shortpath="$new_path"
26596  fi
26597
26598  # Call helper function which possibly converts this using DOS-style short mode.
26599  # If so, the updated path is stored in $new_path.
26600  new_path="$input_to_shortpath"
26601
26602  input_path="$input_to_shortpath"
26603  # Check if we need to convert this using DOS-style short mode. If the path
26604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26605  # take no chances and rewrite it.
26606  # Note: m4 eats our [], so we need to use [ and ] instead.
26607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26608  if test "x$has_forbidden_chars" != x; then
26609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26613      # Going to short mode and back again did indeed matter. Since short mode is
26614      # case insensitive, let's make it lowercase to improve readability.
26615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26616      # Now convert it back to Unix-stile (cygpath)
26617      input_path=`$CYGPATH -u "$shortmode_path"`
26618      new_path="$input_path"
26619    fi
26620  fi
26621
26622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26623  if test "x$test_cygdrive_prefix" = x; then
26624    # As a simple fix, exclude /usr/bin since it's not a real path.
26625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26627      # a path prefixed by /cygdrive for fixpath to work.
26628      new_path="$CYGWIN_ROOT_PATH$input_path"
26629    fi
26630  fi
26631
26632  # remove trailing .exe if any
26633  new_path="${new_path/%.exe/}"
26634
26635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26636
26637  # First separate the path from the arguments. This will split at the first
26638  # space.
26639  complete="$NM"
26640  path="${complete%% *}"
26641  tmp="$complete EOL"
26642  arguments="${tmp#* }"
26643
26644  # Input might be given as Windows format, start by converting to
26645  # unix format.
26646  new_path="$path"
26647
26648  windows_path="$new_path"
26649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26650    unix_path=`$CYGPATH -u "$windows_path"`
26651    new_path="$unix_path"
26652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26654    new_path="$unix_path"
26655  fi
26656
26657
26658  # Now try to locate executable using which
26659  new_path=`$WHICH "$new_path" 2> /dev/null`
26660
26661  if test "x$new_path" = x; then
26662    # Oops. Which didn't find the executable.
26663    # The splitting of arguments from the executable at a space might have been incorrect,
26664    # since paths with space are more likely in Windows. Give it another try with the whole
26665    # argument.
26666    path="$complete"
26667    arguments="EOL"
26668    new_path="$path"
26669
26670  windows_path="$new_path"
26671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26672    unix_path=`$CYGPATH -u "$windows_path"`
26673    new_path="$unix_path"
26674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26676    new_path="$unix_path"
26677  fi
26678
26679
26680    new_path=`$WHICH "$new_path" 2> /dev/null`
26681
26682    if test "x$new_path" = x; then
26683      # It's still not found. Now this is an unrecoverable error.
26684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26685$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26686      has_space=`$ECHO "$complete" | $GREP " "`
26687      if test "x$has_space" != x; then
26688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26690      fi
26691      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26692    fi
26693  fi
26694
26695  # Now new_path has a complete unix path to the binary
26696  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26697    # Keep paths in /bin as-is, but remove trailing .exe if any
26698    new_path="${new_path/%.exe/}"
26699    # Do not save /bin paths to all_fixpath_prefixes!
26700  else
26701    # Not in mixed or Windows style, start by that.
26702    new_path=`cmd //c echo $new_path`
26703
26704  input_path="$new_path"
26705  # Check if we need to convert this using DOS-style short mode. If the path
26706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26707  # take no chances and rewrite it.
26708  # Note: m4 eats our [], so we need to use [ and ] instead.
26709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26710  if test "x$has_forbidden_chars" != x; then
26711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26713  fi
26714
26715    # Output is in $new_path
26716
26717  windows_path="$new_path"
26718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26719    unix_path=`$CYGPATH -u "$windows_path"`
26720    new_path="$unix_path"
26721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26723    new_path="$unix_path"
26724  fi
26725
26726    # remove trailing .exe if any
26727    new_path="${new_path/%.exe/}"
26728
26729    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26730    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26731  fi
26732
26733  else
26734    # We're on a posix platform. Hooray! :)
26735    # First separate the path from the arguments. This will split at the first
26736    # space.
26737    complete="$NM"
26738    path="${complete%% *}"
26739    tmp="$complete EOL"
26740    arguments="${tmp#* }"
26741
26742    # Cannot rely on the command "which" here since it doesn't always work.
26743    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26744    if test -z "$is_absolute_path"; then
26745      # Path to executable is not absolute. Find it.
26746      IFS_save="$IFS"
26747      IFS=:
26748      for p in $PATH; do
26749        if test -f "$p/$path" && test -x "$p/$path"; then
26750          new_path="$p/$path"
26751          break
26752        fi
26753      done
26754      IFS="$IFS_save"
26755    else
26756      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26757$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26758      new_path="$path"
26759    fi
26760
26761    if test "x$new_path" = x; then
26762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26763$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26764        has_space=`$ECHO "$complete" | $GREP " "`
26765        if test "x$has_space" != x; then
26766          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26768        fi
26769        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26770      fi
26771  fi
26772
26773      # Now join together the path and the arguments once again
26774      if test "x$arguments" != xEOL; then
26775        new_complete="$new_path ${arguments% *}"
26776      else
26777        new_complete="$new_path"
26778      fi
26779
26780  if test "x$complete" != "x$new_complete"; then
26781      NM="$new_complete"
26782      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26783$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26784    fi
26785
26786    GNM="$NM"
26787
26788    if test -n "$ac_tool_prefix"; then
26789  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26790set dummy ${ac_tool_prefix}strip; ac_word=$2
26791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26792$as_echo_n "checking for $ac_word... " >&6; }
26793if test "${ac_cv_prog_STRIP+set}" = set; then :
26794  $as_echo_n "(cached) " >&6
26795else
26796  if test -n "$STRIP"; then
26797  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26798else
26799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26800for as_dir in $PATH
26801do
26802  IFS=$as_save_IFS
26803  test -z "$as_dir" && as_dir=.
26804    for ac_exec_ext in '' $ac_executable_extensions; do
26805  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26806    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26808    break 2
26809  fi
26810done
26811  done
26812IFS=$as_save_IFS
26813
26814fi
26815fi
26816STRIP=$ac_cv_prog_STRIP
26817if test -n "$STRIP"; then
26818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26819$as_echo "$STRIP" >&6; }
26820else
26821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26822$as_echo "no" >&6; }
26823fi
26824
26825
26826fi
26827if test -z "$ac_cv_prog_STRIP"; then
26828  ac_ct_STRIP=$STRIP
26829  # Extract the first word of "strip", so it can be a program name with args.
26830set dummy strip; ac_word=$2
26831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26832$as_echo_n "checking for $ac_word... " >&6; }
26833if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26834  $as_echo_n "(cached) " >&6
26835else
26836  if test -n "$ac_ct_STRIP"; then
26837  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26838else
26839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26840for as_dir in $PATH
26841do
26842  IFS=$as_save_IFS
26843  test -z "$as_dir" && as_dir=.
26844    for ac_exec_ext in '' $ac_executable_extensions; do
26845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26846    ac_cv_prog_ac_ct_STRIP="strip"
26847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26848    break 2
26849  fi
26850done
26851  done
26852IFS=$as_save_IFS
26853
26854fi
26855fi
26856ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26857if test -n "$ac_ct_STRIP"; then
26858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26859$as_echo "$ac_ct_STRIP" >&6; }
26860else
26861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26862$as_echo "no" >&6; }
26863fi
26864
26865  if test "x$ac_ct_STRIP" = x; then
26866    STRIP=""
26867  else
26868    case $cross_compiling:$ac_tool_warned in
26869yes:)
26870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26872ac_tool_warned=yes ;;
26873esac
26874    STRIP=$ac_ct_STRIP
26875  fi
26876else
26877  STRIP="$ac_cv_prog_STRIP"
26878fi
26879
26880
26881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26882
26883  # First separate the path from the arguments. This will split at the first
26884  # space.
26885  complete="$STRIP"
26886  path="${complete%% *}"
26887  tmp="$complete EOL"
26888  arguments="${tmp#* }"
26889
26890  # Input might be given as Windows format, start by converting to
26891  # unix format.
26892  new_path=`$CYGPATH -u "$path"`
26893
26894  # Now try to locate executable using which
26895  new_path=`$WHICH "$new_path" 2> /dev/null`
26896  # bat and cmd files are not always considered executable in cygwin causing which
26897  # to not find them
26898  if test "x$new_path" = x \
26899           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26900           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26901    new_path=`$CYGPATH -u "$path"`
26902  fi
26903  if test "x$new_path" = x; then
26904    # Oops. Which didn't find the executable.
26905    # The splitting of arguments from the executable at a space might have been incorrect,
26906    # since paths with space are more likely in Windows. Give it another try with the whole
26907    # argument.
26908    path="$complete"
26909    arguments="EOL"
26910    new_path=`$CYGPATH -u "$path"`
26911    new_path=`$WHICH "$new_path" 2> /dev/null`
26912    # bat and cmd files are not always considered executable in cygwin causing which
26913    # to not find them
26914    if test "x$new_path" = x \
26915             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26916             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26917      new_path=`$CYGPATH -u "$path"`
26918    fi
26919    if test "x$new_path" = x; then
26920      # It's still not found. Now this is an unrecoverable error.
26921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26922$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26923      has_space=`$ECHO "$complete" | $GREP " "`
26924      if test "x$has_space" != x; then
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26927      fi
26928      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26929    fi
26930  fi
26931
26932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26935  # "foo.exe" is OK but "foo" is an error.
26936  #
26937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26938  # It is also a way to make sure we got the proper file name for the real test later on.
26939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26940  if test "x$test_shortpath" = x; then
26941    # Short path failed, file does not exist as specified.
26942    # Try adding .exe or .cmd
26943    if test -f "${new_path}.exe"; then
26944       input_to_shortpath="${new_path}.exe"
26945    elif test -f "${new_path}.cmd"; then
26946       input_to_shortpath="${new_path}.cmd"
26947    else
26948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26949$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26950      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26951$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26952      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26953    fi
26954  else
26955    input_to_shortpath="$new_path"
26956  fi
26957
26958  # Call helper function which possibly converts this using DOS-style short mode.
26959  # If so, the updated path is stored in $new_path.
26960  new_path="$input_to_shortpath"
26961
26962  input_path="$input_to_shortpath"
26963  # Check if we need to convert this using DOS-style short mode. If the path
26964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26965  # take no chances and rewrite it.
26966  # Note: m4 eats our [], so we need to use [ and ] instead.
26967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26968  if test "x$has_forbidden_chars" != x; then
26969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26973      # Going to short mode and back again did indeed matter. Since short mode is
26974      # case insensitive, let's make it lowercase to improve readability.
26975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26976      # Now convert it back to Unix-stile (cygpath)
26977      input_path=`$CYGPATH -u "$shortmode_path"`
26978      new_path="$input_path"
26979    fi
26980  fi
26981
26982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26983  if test "x$test_cygdrive_prefix" = x; then
26984    # As a simple fix, exclude /usr/bin since it's not a real path.
26985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26987      # a path prefixed by /cygdrive for fixpath to work.
26988      new_path="$CYGWIN_ROOT_PATH$input_path"
26989    fi
26990  fi
26991
26992  # remove trailing .exe if any
26993  new_path="${new_path/%.exe/}"
26994
26995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26996
26997  # First separate the path from the arguments. This will split at the first
26998  # space.
26999  complete="$STRIP"
27000  path="${complete%% *}"
27001  tmp="$complete EOL"
27002  arguments="${tmp#* }"
27003
27004  # Input might be given as Windows format, start by converting to
27005  # unix format.
27006  new_path="$path"
27007
27008  windows_path="$new_path"
27009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27010    unix_path=`$CYGPATH -u "$windows_path"`
27011    new_path="$unix_path"
27012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27014    new_path="$unix_path"
27015  fi
27016
27017
27018  # Now try to locate executable using which
27019  new_path=`$WHICH "$new_path" 2> /dev/null`
27020
27021  if test "x$new_path" = x; then
27022    # Oops. Which didn't find the executable.
27023    # The splitting of arguments from the executable at a space might have been incorrect,
27024    # since paths with space are more likely in Windows. Give it another try with the whole
27025    # argument.
27026    path="$complete"
27027    arguments="EOL"
27028    new_path="$path"
27029
27030  windows_path="$new_path"
27031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27032    unix_path=`$CYGPATH -u "$windows_path"`
27033    new_path="$unix_path"
27034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27036    new_path="$unix_path"
27037  fi
27038
27039
27040    new_path=`$WHICH "$new_path" 2> /dev/null`
27041
27042    if test "x$new_path" = x; then
27043      # It's still not found. Now this is an unrecoverable error.
27044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27045$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27046      has_space=`$ECHO "$complete" | $GREP " "`
27047      if test "x$has_space" != x; then
27048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27050      fi
27051      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27052    fi
27053  fi
27054
27055  # Now new_path has a complete unix path to the binary
27056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27057    # Keep paths in /bin as-is, but remove trailing .exe if any
27058    new_path="${new_path/%.exe/}"
27059    # Do not save /bin paths to all_fixpath_prefixes!
27060  else
27061    # Not in mixed or Windows style, start by that.
27062    new_path=`cmd //c echo $new_path`
27063
27064  input_path="$new_path"
27065  # Check if we need to convert this using DOS-style short mode. If the path
27066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27067  # take no chances and rewrite it.
27068  # Note: m4 eats our [], so we need to use [ and ] instead.
27069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27070  if test "x$has_forbidden_chars" != x; then
27071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27073  fi
27074
27075    # Output is in $new_path
27076
27077  windows_path="$new_path"
27078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27079    unix_path=`$CYGPATH -u "$windows_path"`
27080    new_path="$unix_path"
27081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27083    new_path="$unix_path"
27084  fi
27085
27086    # remove trailing .exe if any
27087    new_path="${new_path/%.exe/}"
27088
27089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27091  fi
27092
27093  else
27094    # We're on a posix platform. Hooray! :)
27095    # First separate the path from the arguments. This will split at the first
27096    # space.
27097    complete="$STRIP"
27098    path="${complete%% *}"
27099    tmp="$complete EOL"
27100    arguments="${tmp#* }"
27101
27102    # Cannot rely on the command "which" here since it doesn't always work.
27103    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27104    if test -z "$is_absolute_path"; then
27105      # Path to executable is not absolute. Find it.
27106      IFS_save="$IFS"
27107      IFS=:
27108      for p in $PATH; do
27109        if test -f "$p/$path" && test -x "$p/$path"; then
27110          new_path="$p/$path"
27111          break
27112        fi
27113      done
27114      IFS="$IFS_save"
27115    else
27116      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27117$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27118      new_path="$path"
27119    fi
27120
27121    if test "x$new_path" = x; then
27122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27123$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27124        has_space=`$ECHO "$complete" | $GREP " "`
27125        if test "x$has_space" != x; then
27126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27128        fi
27129        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27130      fi
27131  fi
27132
27133      # Now join together the path and the arguments once again
27134      if test "x$arguments" != xEOL; then
27135        new_complete="$new_path ${arguments% *}"
27136      else
27137        new_complete="$new_path"
27138      fi
27139
27140  if test "x$complete" != "x$new_complete"; then
27141      STRIP="$new_complete"
27142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27143$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27144    fi
27145
27146fi
27147
27148# objcopy is used for moving debug symbols to separate files when
27149# full debug symbols are enabled.
27150if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27151    if test -n "$ac_tool_prefix"; then
27152  for ac_prog in gobjcopy objcopy
27153  do
27154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27157$as_echo_n "checking for $ac_word... " >&6; }
27158if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27159  $as_echo_n "(cached) " >&6
27160else
27161  if test -n "$OBJCOPY"; then
27162  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27163else
27164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27165for as_dir in $PATH
27166do
27167  IFS=$as_save_IFS
27168  test -z "$as_dir" && as_dir=.
27169    for ac_exec_ext in '' $ac_executable_extensions; do
27170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27171    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27173    break 2
27174  fi
27175done
27176  done
27177IFS=$as_save_IFS
27178
27179fi
27180fi
27181OBJCOPY=$ac_cv_prog_OBJCOPY
27182if test -n "$OBJCOPY"; then
27183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27184$as_echo "$OBJCOPY" >&6; }
27185else
27186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27187$as_echo "no" >&6; }
27188fi
27189
27190
27191    test -n "$OBJCOPY" && break
27192  done
27193fi
27194if test -z "$OBJCOPY"; then
27195  ac_ct_OBJCOPY=$OBJCOPY
27196  for ac_prog in gobjcopy objcopy
27197do
27198  # Extract the first word of "$ac_prog", so it can be a program name with args.
27199set dummy $ac_prog; ac_word=$2
27200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27201$as_echo_n "checking for $ac_word... " >&6; }
27202if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27203  $as_echo_n "(cached) " >&6
27204else
27205  if test -n "$ac_ct_OBJCOPY"; then
27206  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27207else
27208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27209for as_dir in $PATH
27210do
27211  IFS=$as_save_IFS
27212  test -z "$as_dir" && as_dir=.
27213    for ac_exec_ext in '' $ac_executable_extensions; do
27214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27215    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27217    break 2
27218  fi
27219done
27220  done
27221IFS=$as_save_IFS
27222
27223fi
27224fi
27225ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27226if test -n "$ac_ct_OBJCOPY"; then
27227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27228$as_echo "$ac_ct_OBJCOPY" >&6; }
27229else
27230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27231$as_echo "no" >&6; }
27232fi
27233
27234
27235  test -n "$ac_ct_OBJCOPY" && break
27236done
27237
27238  if test "x$ac_ct_OBJCOPY" = x; then
27239    OBJCOPY=""
27240  else
27241    case $cross_compiling:$ac_tool_warned in
27242yes:)
27243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27245ac_tool_warned=yes ;;
27246esac
27247    OBJCOPY=$ac_ct_OBJCOPY
27248  fi
27249fi
27250
27251    # Only call fixup if objcopy was found.
27252    if test -n "$OBJCOPY"; then
27253
27254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27255
27256  # First separate the path from the arguments. This will split at the first
27257  # space.
27258  complete="$OBJCOPY"
27259  path="${complete%% *}"
27260  tmp="$complete EOL"
27261  arguments="${tmp#* }"
27262
27263  # Input might be given as Windows format, start by converting to
27264  # unix format.
27265  new_path=`$CYGPATH -u "$path"`
27266
27267  # Now try to locate executable using which
27268  new_path=`$WHICH "$new_path" 2> /dev/null`
27269  # bat and cmd files are not always considered executable in cygwin causing which
27270  # to not find them
27271  if test "x$new_path" = x \
27272           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27273           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27274    new_path=`$CYGPATH -u "$path"`
27275  fi
27276  if test "x$new_path" = x; then
27277    # Oops. Which didn't find the executable.
27278    # The splitting of arguments from the executable at a space might have been incorrect,
27279    # since paths with space are more likely in Windows. Give it another try with the whole
27280    # argument.
27281    path="$complete"
27282    arguments="EOL"
27283    new_path=`$CYGPATH -u "$path"`
27284    new_path=`$WHICH "$new_path" 2> /dev/null`
27285    # bat and cmd files are not always considered executable in cygwin causing which
27286    # to not find them
27287    if test "x$new_path" = x \
27288             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27289             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27290      new_path=`$CYGPATH -u "$path"`
27291    fi
27292    if test "x$new_path" = x; then
27293      # It's still not found. Now this is an unrecoverable error.
27294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27295$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27296      has_space=`$ECHO "$complete" | $GREP " "`
27297      if test "x$has_space" != x; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27300      fi
27301      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27302    fi
27303  fi
27304
27305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27308  # "foo.exe" is OK but "foo" is an error.
27309  #
27310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27311  # It is also a way to make sure we got the proper file name for the real test later on.
27312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27313  if test "x$test_shortpath" = x; then
27314    # Short path failed, file does not exist as specified.
27315    # Try adding .exe or .cmd
27316    if test -f "${new_path}.exe"; then
27317       input_to_shortpath="${new_path}.exe"
27318    elif test -f "${new_path}.cmd"; then
27319       input_to_shortpath="${new_path}.cmd"
27320    else
27321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27322$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27325      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27326    fi
27327  else
27328    input_to_shortpath="$new_path"
27329  fi
27330
27331  # Call helper function which possibly converts this using DOS-style short mode.
27332  # If so, the updated path is stored in $new_path.
27333  new_path="$input_to_shortpath"
27334
27335  input_path="$input_to_shortpath"
27336  # Check if we need to convert this using DOS-style short mode. If the path
27337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27338  # take no chances and rewrite it.
27339  # Note: m4 eats our [], so we need to use [ and ] instead.
27340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27341  if test "x$has_forbidden_chars" != x; then
27342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27346      # Going to short mode and back again did indeed matter. Since short mode is
27347      # case insensitive, let's make it lowercase to improve readability.
27348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27349      # Now convert it back to Unix-stile (cygpath)
27350      input_path=`$CYGPATH -u "$shortmode_path"`
27351      new_path="$input_path"
27352    fi
27353  fi
27354
27355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27356  if test "x$test_cygdrive_prefix" = x; then
27357    # As a simple fix, exclude /usr/bin since it's not a real path.
27358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27360      # a path prefixed by /cygdrive for fixpath to work.
27361      new_path="$CYGWIN_ROOT_PATH$input_path"
27362    fi
27363  fi
27364
27365  # remove trailing .exe if any
27366  new_path="${new_path/%.exe/}"
27367
27368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27369
27370  # First separate the path from the arguments. This will split at the first
27371  # space.
27372  complete="$OBJCOPY"
27373  path="${complete%% *}"
27374  tmp="$complete EOL"
27375  arguments="${tmp#* }"
27376
27377  # Input might be given as Windows format, start by converting to
27378  # unix format.
27379  new_path="$path"
27380
27381  windows_path="$new_path"
27382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27383    unix_path=`$CYGPATH -u "$windows_path"`
27384    new_path="$unix_path"
27385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27387    new_path="$unix_path"
27388  fi
27389
27390
27391  # Now try to locate executable using which
27392  new_path=`$WHICH "$new_path" 2> /dev/null`
27393
27394  if test "x$new_path" = x; then
27395    # Oops. Which didn't find the executable.
27396    # The splitting of arguments from the executable at a space might have been incorrect,
27397    # since paths with space are more likely in Windows. Give it another try with the whole
27398    # argument.
27399    path="$complete"
27400    arguments="EOL"
27401    new_path="$path"
27402
27403  windows_path="$new_path"
27404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27405    unix_path=`$CYGPATH -u "$windows_path"`
27406    new_path="$unix_path"
27407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27409    new_path="$unix_path"
27410  fi
27411
27412
27413    new_path=`$WHICH "$new_path" 2> /dev/null`
27414
27415    if test "x$new_path" = x; then
27416      # It's still not found. Now this is an unrecoverable error.
27417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27418$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27419      has_space=`$ECHO "$complete" | $GREP " "`
27420      if test "x$has_space" != x; then
27421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27423      fi
27424      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27425    fi
27426  fi
27427
27428  # Now new_path has a complete unix path to the binary
27429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27430    # Keep paths in /bin as-is, but remove trailing .exe if any
27431    new_path="${new_path/%.exe/}"
27432    # Do not save /bin paths to all_fixpath_prefixes!
27433  else
27434    # Not in mixed or Windows style, start by that.
27435    new_path=`cmd //c echo $new_path`
27436
27437  input_path="$new_path"
27438  # Check if we need to convert this using DOS-style short mode. If the path
27439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27440  # take no chances and rewrite it.
27441  # Note: m4 eats our [], so we need to use [ and ] instead.
27442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27443  if test "x$has_forbidden_chars" != x; then
27444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27446  fi
27447
27448    # Output is in $new_path
27449
27450  windows_path="$new_path"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    unix_path=`$CYGPATH -u "$windows_path"`
27453    new_path="$unix_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456    new_path="$unix_path"
27457  fi
27458
27459    # remove trailing .exe if any
27460    new_path="${new_path/%.exe/}"
27461
27462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27464  fi
27465
27466  else
27467    # We're on a posix platform. Hooray! :)
27468    # First separate the path from the arguments. This will split at the first
27469    # space.
27470    complete="$OBJCOPY"
27471    path="${complete%% *}"
27472    tmp="$complete EOL"
27473    arguments="${tmp#* }"
27474
27475    # Cannot rely on the command "which" here since it doesn't always work.
27476    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27477    if test -z "$is_absolute_path"; then
27478      # Path to executable is not absolute. Find it.
27479      IFS_save="$IFS"
27480      IFS=:
27481      for p in $PATH; do
27482        if test -f "$p/$path" && test -x "$p/$path"; then
27483          new_path="$p/$path"
27484          break
27485        fi
27486      done
27487      IFS="$IFS_save"
27488    else
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27490$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27491      new_path="$path"
27492    fi
27493
27494    if test "x$new_path" = x; then
27495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27496$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27497        has_space=`$ECHO "$complete" | $GREP " "`
27498        if test "x$has_space" != x; then
27499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27501        fi
27502        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27503      fi
27504  fi
27505
27506      # Now join together the path and the arguments once again
27507      if test "x$arguments" != xEOL; then
27508        new_complete="$new_path ${arguments% *}"
27509      else
27510        new_complete="$new_path"
27511      fi
27512
27513  if test "x$complete" != "x$new_complete"; then
27514      OBJCOPY="$new_complete"
27515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27516$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27517    fi
27518
27519    fi
27520fi
27521
27522if test -n "$ac_tool_prefix"; then
27523  for ac_prog in gobjdump objdump
27524  do
27525    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27528$as_echo_n "checking for $ac_word... " >&6; }
27529if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27530  $as_echo_n "(cached) " >&6
27531else
27532  if test -n "$OBJDUMP"; then
27533  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27534else
27535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27536for as_dir in $PATH
27537do
27538  IFS=$as_save_IFS
27539  test -z "$as_dir" && as_dir=.
27540    for ac_exec_ext in '' $ac_executable_extensions; do
27541  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27542    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27544    break 2
27545  fi
27546done
27547  done
27548IFS=$as_save_IFS
27549
27550fi
27551fi
27552OBJDUMP=$ac_cv_prog_OBJDUMP
27553if test -n "$OBJDUMP"; then
27554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27555$as_echo "$OBJDUMP" >&6; }
27556else
27557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27558$as_echo "no" >&6; }
27559fi
27560
27561
27562    test -n "$OBJDUMP" && break
27563  done
27564fi
27565if test -z "$OBJDUMP"; then
27566  ac_ct_OBJDUMP=$OBJDUMP
27567  for ac_prog in gobjdump objdump
27568do
27569  # Extract the first word of "$ac_prog", so it can be a program name with args.
27570set dummy $ac_prog; ac_word=$2
27571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27572$as_echo_n "checking for $ac_word... " >&6; }
27573if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27574  $as_echo_n "(cached) " >&6
27575else
27576  if test -n "$ac_ct_OBJDUMP"; then
27577  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27578else
27579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27580for as_dir in $PATH
27581do
27582  IFS=$as_save_IFS
27583  test -z "$as_dir" && as_dir=.
27584    for ac_exec_ext in '' $ac_executable_extensions; do
27585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27586    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27588    break 2
27589  fi
27590done
27591  done
27592IFS=$as_save_IFS
27593
27594fi
27595fi
27596ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27597if test -n "$ac_ct_OBJDUMP"; then
27598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27599$as_echo "$ac_ct_OBJDUMP" >&6; }
27600else
27601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27602$as_echo "no" >&6; }
27603fi
27604
27605
27606  test -n "$ac_ct_OBJDUMP" && break
27607done
27608
27609  if test "x$ac_ct_OBJDUMP" = x; then
27610    OBJDUMP=""
27611  else
27612    case $cross_compiling:$ac_tool_warned in
27613yes:)
27614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27616ac_tool_warned=yes ;;
27617esac
27618    OBJDUMP=$ac_ct_OBJDUMP
27619  fi
27620fi
27621
27622if test "x$OBJDUMP" != x; then
27623  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27624
27625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27626
27627  # First separate the path from the arguments. This will split at the first
27628  # space.
27629  complete="$OBJDUMP"
27630  path="${complete%% *}"
27631  tmp="$complete EOL"
27632  arguments="${tmp#* }"
27633
27634  # Input might be given as Windows format, start by converting to
27635  # unix format.
27636  new_path=`$CYGPATH -u "$path"`
27637
27638  # Now try to locate executable using which
27639  new_path=`$WHICH "$new_path" 2> /dev/null`
27640  # bat and cmd files are not always considered executable in cygwin causing which
27641  # to not find them
27642  if test "x$new_path" = x \
27643           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27644           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27645    new_path=`$CYGPATH -u "$path"`
27646  fi
27647  if test "x$new_path" = x; then
27648    # Oops. Which didn't find the executable.
27649    # The splitting of arguments from the executable at a space might have been incorrect,
27650    # since paths with space are more likely in Windows. Give it another try with the whole
27651    # argument.
27652    path="$complete"
27653    arguments="EOL"
27654    new_path=`$CYGPATH -u "$path"`
27655    new_path=`$WHICH "$new_path" 2> /dev/null`
27656    # bat and cmd files are not always considered executable in cygwin causing which
27657    # to not find them
27658    if test "x$new_path" = x \
27659             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27660             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27661      new_path=`$CYGPATH -u "$path"`
27662    fi
27663    if test "x$new_path" = x; then
27664      # It's still not found. Now this is an unrecoverable error.
27665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27666$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27667      has_space=`$ECHO "$complete" | $GREP " "`
27668      if test "x$has_space" != x; then
27669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27671      fi
27672      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27673    fi
27674  fi
27675
27676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27679  # "foo.exe" is OK but "foo" is an error.
27680  #
27681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27682  # It is also a way to make sure we got the proper file name for the real test later on.
27683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27684  if test "x$test_shortpath" = x; then
27685    # Short path failed, file does not exist as specified.
27686    # Try adding .exe or .cmd
27687    if test -f "${new_path}.exe"; then
27688       input_to_shortpath="${new_path}.exe"
27689    elif test -f "${new_path}.cmd"; then
27690       input_to_shortpath="${new_path}.cmd"
27691    else
27692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27693$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27696      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27697    fi
27698  else
27699    input_to_shortpath="$new_path"
27700  fi
27701
27702  # Call helper function which possibly converts this using DOS-style short mode.
27703  # If so, the updated path is stored in $new_path.
27704  new_path="$input_to_shortpath"
27705
27706  input_path="$input_to_shortpath"
27707  # Check if we need to convert this using DOS-style short mode. If the path
27708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27709  # take no chances and rewrite it.
27710  # Note: m4 eats our [], so we need to use [ and ] instead.
27711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27712  if test "x$has_forbidden_chars" != x; then
27713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27717      # Going to short mode and back again did indeed matter. Since short mode is
27718      # case insensitive, let's make it lowercase to improve readability.
27719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27720      # Now convert it back to Unix-stile (cygpath)
27721      input_path=`$CYGPATH -u "$shortmode_path"`
27722      new_path="$input_path"
27723    fi
27724  fi
27725
27726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27727  if test "x$test_cygdrive_prefix" = x; then
27728    # As a simple fix, exclude /usr/bin since it's not a real path.
27729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27731      # a path prefixed by /cygdrive for fixpath to work.
27732      new_path="$CYGWIN_ROOT_PATH$input_path"
27733    fi
27734  fi
27735
27736  # remove trailing .exe if any
27737  new_path="${new_path/%.exe/}"
27738
27739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27740
27741  # First separate the path from the arguments. This will split at the first
27742  # space.
27743  complete="$OBJDUMP"
27744  path="${complete%% *}"
27745  tmp="$complete EOL"
27746  arguments="${tmp#* }"
27747
27748  # Input might be given as Windows format, start by converting to
27749  # unix format.
27750  new_path="$path"
27751
27752  windows_path="$new_path"
27753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27754    unix_path=`$CYGPATH -u "$windows_path"`
27755    new_path="$unix_path"
27756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27758    new_path="$unix_path"
27759  fi
27760
27761
27762  # Now try to locate executable using which
27763  new_path=`$WHICH "$new_path" 2> /dev/null`
27764
27765  if test "x$new_path" = x; then
27766    # Oops. Which didn't find the executable.
27767    # The splitting of arguments from the executable at a space might have been incorrect,
27768    # since paths with space are more likely in Windows. Give it another try with the whole
27769    # argument.
27770    path="$complete"
27771    arguments="EOL"
27772    new_path="$path"
27773
27774  windows_path="$new_path"
27775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27776    unix_path=`$CYGPATH -u "$windows_path"`
27777    new_path="$unix_path"
27778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27780    new_path="$unix_path"
27781  fi
27782
27783
27784    new_path=`$WHICH "$new_path" 2> /dev/null`
27785
27786    if test "x$new_path" = x; then
27787      # It's still not found. Now this is an unrecoverable error.
27788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27789$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27790      has_space=`$ECHO "$complete" | $GREP " "`
27791      if test "x$has_space" != x; then
27792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27794      fi
27795      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27796    fi
27797  fi
27798
27799  # Now new_path has a complete unix path to the binary
27800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27801    # Keep paths in /bin as-is, but remove trailing .exe if any
27802    new_path="${new_path/%.exe/}"
27803    # Do not save /bin paths to all_fixpath_prefixes!
27804  else
27805    # Not in mixed or Windows style, start by that.
27806    new_path=`cmd //c echo $new_path`
27807
27808  input_path="$new_path"
27809  # Check if we need to convert this using DOS-style short mode. If the path
27810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27811  # take no chances and rewrite it.
27812  # Note: m4 eats our [], so we need to use [ and ] instead.
27813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27814  if test "x$has_forbidden_chars" != x; then
27815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27817  fi
27818
27819    # Output is in $new_path
27820
27821  windows_path="$new_path"
27822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27823    unix_path=`$CYGPATH -u "$windows_path"`
27824    new_path="$unix_path"
27825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27827    new_path="$unix_path"
27828  fi
27829
27830    # remove trailing .exe if any
27831    new_path="${new_path/%.exe/}"
27832
27833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27835  fi
27836
27837  else
27838    # We're on a posix platform. Hooray! :)
27839    # First separate the path from the arguments. This will split at the first
27840    # space.
27841    complete="$OBJDUMP"
27842    path="${complete%% *}"
27843    tmp="$complete EOL"
27844    arguments="${tmp#* }"
27845
27846    # Cannot rely on the command "which" here since it doesn't always work.
27847    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27848    if test -z "$is_absolute_path"; then
27849      # Path to executable is not absolute. Find it.
27850      IFS_save="$IFS"
27851      IFS=:
27852      for p in $PATH; do
27853        if test -f "$p/$path" && test -x "$p/$path"; then
27854          new_path="$p/$path"
27855          break
27856        fi
27857      done
27858      IFS="$IFS_save"
27859    else
27860      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27861$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27862      new_path="$path"
27863    fi
27864
27865    if test "x$new_path" = x; then
27866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27867$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27868        has_space=`$ECHO "$complete" | $GREP " "`
27869        if test "x$has_space" != x; then
27870          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27872        fi
27873        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27874      fi
27875  fi
27876
27877      # Now join together the path and the arguments once again
27878      if test "x$arguments" != xEOL; then
27879        new_complete="$new_path ${arguments% *}"
27880      else
27881        new_complete="$new_path"
27882      fi
27883
27884  if test "x$complete" != "x$new_complete"; then
27885      OBJDUMP="$new_complete"
27886      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27887$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27888    fi
27889
27890fi
27891
27892if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27893   # Extract the first word of "lipo", so it can be a program name with args.
27894set dummy lipo; ac_word=$2
27895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27896$as_echo_n "checking for $ac_word... " >&6; }
27897if test "${ac_cv_path_LIPO+set}" = set; then :
27898  $as_echo_n "(cached) " >&6
27899else
27900  case $LIPO in
27901  [\\/]* | ?:[\\/]*)
27902  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27903  ;;
27904  *)
27905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27906for as_dir in $PATH
27907do
27908  IFS=$as_save_IFS
27909  test -z "$as_dir" && as_dir=.
27910    for ac_exec_ext in '' $ac_executable_extensions; do
27911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27912    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27914    break 2
27915  fi
27916done
27917  done
27918IFS=$as_save_IFS
27919
27920  ;;
27921esac
27922fi
27923LIPO=$ac_cv_path_LIPO
27924if test -n "$LIPO"; then
27925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27926$as_echo "$LIPO" >&6; }
27927else
27928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27929$as_echo "no" >&6; }
27930fi
27931
27932
27933
27934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27935
27936  # First separate the path from the arguments. This will split at the first
27937  # space.
27938  complete="$LIPO"
27939  path="${complete%% *}"
27940  tmp="$complete EOL"
27941  arguments="${tmp#* }"
27942
27943  # Input might be given as Windows format, start by converting to
27944  # unix format.
27945  new_path=`$CYGPATH -u "$path"`
27946
27947  # Now try to locate executable using which
27948  new_path=`$WHICH "$new_path" 2> /dev/null`
27949  # bat and cmd files are not always considered executable in cygwin causing which
27950  # to not find them
27951  if test "x$new_path" = x \
27952           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27953           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27954    new_path=`$CYGPATH -u "$path"`
27955  fi
27956  if test "x$new_path" = x; then
27957    # Oops. Which didn't find the executable.
27958    # The splitting of arguments from the executable at a space might have been incorrect,
27959    # since paths with space are more likely in Windows. Give it another try with the whole
27960    # argument.
27961    path="$complete"
27962    arguments="EOL"
27963    new_path=`$CYGPATH -u "$path"`
27964    new_path=`$WHICH "$new_path" 2> /dev/null`
27965    # bat and cmd files are not always considered executable in cygwin causing which
27966    # to not find them
27967    if test "x$new_path" = x \
27968             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27969             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27970      new_path=`$CYGPATH -u "$path"`
27971    fi
27972    if test "x$new_path" = x; then
27973      # It's still not found. Now this is an unrecoverable error.
27974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27975$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27976      has_space=`$ECHO "$complete" | $GREP " "`
27977      if test "x$has_space" != x; then
27978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27980      fi
27981      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27982    fi
27983  fi
27984
27985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27988  # "foo.exe" is OK but "foo" is an error.
27989  #
27990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27991  # It is also a way to make sure we got the proper file name for the real test later on.
27992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27993  if test "x$test_shortpath" = x; then
27994    # Short path failed, file does not exist as specified.
27995    # Try adding .exe or .cmd
27996    if test -f "${new_path}.exe"; then
27997       input_to_shortpath="${new_path}.exe"
27998    elif test -f "${new_path}.cmd"; then
27999       input_to_shortpath="${new_path}.cmd"
28000    else
28001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28002$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28005      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28006    fi
28007  else
28008    input_to_shortpath="$new_path"
28009  fi
28010
28011  # Call helper function which possibly converts this using DOS-style short mode.
28012  # If so, the updated path is stored in $new_path.
28013  new_path="$input_to_shortpath"
28014
28015  input_path="$input_to_shortpath"
28016  # Check if we need to convert this using DOS-style short mode. If the path
28017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28018  # take no chances and rewrite it.
28019  # Note: m4 eats our [], so we need to use [ and ] instead.
28020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28021  if test "x$has_forbidden_chars" != x; then
28022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28026      # Going to short mode and back again did indeed matter. Since short mode is
28027      # case insensitive, let's make it lowercase to improve readability.
28028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28029      # Now convert it back to Unix-stile (cygpath)
28030      input_path=`$CYGPATH -u "$shortmode_path"`
28031      new_path="$input_path"
28032    fi
28033  fi
28034
28035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28036  if test "x$test_cygdrive_prefix" = x; then
28037    # As a simple fix, exclude /usr/bin since it's not a real path.
28038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28040      # a path prefixed by /cygdrive for fixpath to work.
28041      new_path="$CYGWIN_ROOT_PATH$input_path"
28042    fi
28043  fi
28044
28045  # remove trailing .exe if any
28046  new_path="${new_path/%.exe/}"
28047
28048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28049
28050  # First separate the path from the arguments. This will split at the first
28051  # space.
28052  complete="$LIPO"
28053  path="${complete%% *}"
28054  tmp="$complete EOL"
28055  arguments="${tmp#* }"
28056
28057  # Input might be given as Windows format, start by converting to
28058  # unix format.
28059  new_path="$path"
28060
28061  windows_path="$new_path"
28062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28063    unix_path=`$CYGPATH -u "$windows_path"`
28064    new_path="$unix_path"
28065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28067    new_path="$unix_path"
28068  fi
28069
28070
28071  # Now try to locate executable using which
28072  new_path=`$WHICH "$new_path" 2> /dev/null`
28073
28074  if test "x$new_path" = x; then
28075    # Oops. Which didn't find the executable.
28076    # The splitting of arguments from the executable at a space might have been incorrect,
28077    # since paths with space are more likely in Windows. Give it another try with the whole
28078    # argument.
28079    path="$complete"
28080    arguments="EOL"
28081    new_path="$path"
28082
28083  windows_path="$new_path"
28084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28085    unix_path=`$CYGPATH -u "$windows_path"`
28086    new_path="$unix_path"
28087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28089    new_path="$unix_path"
28090  fi
28091
28092
28093    new_path=`$WHICH "$new_path" 2> /dev/null`
28094
28095    if test "x$new_path" = x; then
28096      # It's still not found. Now this is an unrecoverable error.
28097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28098$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28099      has_space=`$ECHO "$complete" | $GREP " "`
28100      if test "x$has_space" != x; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28103      fi
28104      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28105    fi
28106  fi
28107
28108  # Now new_path has a complete unix path to the binary
28109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28110    # Keep paths in /bin as-is, but remove trailing .exe if any
28111    new_path="${new_path/%.exe/}"
28112    # Do not save /bin paths to all_fixpath_prefixes!
28113  else
28114    # Not in mixed or Windows style, start by that.
28115    new_path=`cmd //c echo $new_path`
28116
28117  input_path="$new_path"
28118  # Check if we need to convert this using DOS-style short mode. If the path
28119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28120  # take no chances and rewrite it.
28121  # Note: m4 eats our [], so we need to use [ and ] instead.
28122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28123  if test "x$has_forbidden_chars" != x; then
28124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28126  fi
28127
28128    # Output is in $new_path
28129
28130  windows_path="$new_path"
28131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132    unix_path=`$CYGPATH -u "$windows_path"`
28133    new_path="$unix_path"
28134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28136    new_path="$unix_path"
28137  fi
28138
28139    # remove trailing .exe if any
28140    new_path="${new_path/%.exe/}"
28141
28142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28144  fi
28145
28146  else
28147    # We're on a posix platform. Hooray! :)
28148    # First separate the path from the arguments. This will split at the first
28149    # space.
28150    complete="$LIPO"
28151    path="${complete%% *}"
28152    tmp="$complete EOL"
28153    arguments="${tmp#* }"
28154
28155    # Cannot rely on the command "which" here since it doesn't always work.
28156    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28157    if test -z "$is_absolute_path"; then
28158      # Path to executable is not absolute. Find it.
28159      IFS_save="$IFS"
28160      IFS=:
28161      for p in $PATH; do
28162        if test -f "$p/$path" && test -x "$p/$path"; then
28163          new_path="$p/$path"
28164          break
28165        fi
28166      done
28167      IFS="$IFS_save"
28168    else
28169      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28170$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28171      new_path="$path"
28172    fi
28173
28174    if test "x$new_path" = x; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28176$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28177        has_space=`$ECHO "$complete" | $GREP " "`
28178        if test "x$has_space" != x; then
28179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28181        fi
28182        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28183      fi
28184  fi
28185
28186      # Now join together the path and the arguments once again
28187      if test "x$arguments" != xEOL; then
28188        new_complete="$new_path ${arguments% *}"
28189      else
28190        new_complete="$new_path"
28191      fi
28192
28193  if test "x$complete" != "x$new_complete"; then
28194      LIPO="$new_complete"
28195      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28196$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28197    fi
28198
28199fi
28200
28201# Restore old path without tools dir
28202PATH="$OLD_PATH"
28203
28204
28205# FIXME: Currently we must test this after paths but before flags. Fix!
28206
28207# And we can test some aspects on the target using configure macros.
28208
28209
28210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28211$as_echo_n "checking for ANSI C header files... " >&6; }
28212if test "${ac_cv_header_stdc+set}" = set; then :
28213  $as_echo_n "(cached) " >&6
28214else
28215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28216/* end confdefs.h.  */
28217#include <stdlib.h>
28218#include <stdarg.h>
28219#include <string.h>
28220#include <float.h>
28221
28222int
28223main ()
28224{
28225
28226  ;
28227  return 0;
28228}
28229_ACEOF
28230if ac_fn_cxx_try_compile "$LINENO"; then :
28231  ac_cv_header_stdc=yes
28232else
28233  ac_cv_header_stdc=no
28234fi
28235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28236
28237if test $ac_cv_header_stdc = yes; then
28238  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28240/* end confdefs.h.  */
28241#include <string.h>
28242
28243_ACEOF
28244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28245  $EGREP "memchr" >/dev/null 2>&1; then :
28246
28247else
28248  ac_cv_header_stdc=no
28249fi
28250rm -f conftest*
28251
28252fi
28253
28254if test $ac_cv_header_stdc = yes; then
28255  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28257/* end confdefs.h.  */
28258#include <stdlib.h>
28259
28260_ACEOF
28261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28262  $EGREP "free" >/dev/null 2>&1; then :
28263
28264else
28265  ac_cv_header_stdc=no
28266fi
28267rm -f conftest*
28268
28269fi
28270
28271if test $ac_cv_header_stdc = yes; then
28272  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28273  if test "$cross_compiling" = yes; then :
28274  :
28275else
28276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28277/* end confdefs.h.  */
28278#include <ctype.h>
28279#include <stdlib.h>
28280#if ((' ' & 0x0FF) == 0x020)
28281# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28282# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28283#else
28284# define ISLOWER(c) \
28285		   (('a' <= (c) && (c) <= 'i') \
28286		     || ('j' <= (c) && (c) <= 'r') \
28287		     || ('s' <= (c) && (c) <= 'z'))
28288# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28289#endif
28290
28291#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28292int
28293main ()
28294{
28295  int i;
28296  for (i = 0; i < 256; i++)
28297    if (XOR (islower (i), ISLOWER (i))
28298	|| toupper (i) != TOUPPER (i))
28299      return 2;
28300  return 0;
28301}
28302_ACEOF
28303if ac_fn_cxx_try_run "$LINENO"; then :
28304
28305else
28306  ac_cv_header_stdc=no
28307fi
28308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28309  conftest.$ac_objext conftest.beam conftest.$ac_ext
28310fi
28311
28312fi
28313fi
28314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28315$as_echo "$ac_cv_header_stdc" >&6; }
28316if test $ac_cv_header_stdc = yes; then
28317
28318$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28319
28320fi
28321
28322# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28323for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28324		  inttypes.h stdint.h unistd.h
28325do :
28326  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28327ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28328"
28329if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28330  cat >>confdefs.h <<_ACEOF
28331#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28332_ACEOF
28333
28334fi
28335
28336done
28337
28338
28339
28340###############################################################################
28341#
28342# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28343# (The JVM can use 32 or 64 bit Java pointers but that decision
28344# is made at runtime.)
28345#
28346
28347if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28348  # Always specify -m flags on Solaris
28349
28350  # keep track of c/cxx flags that we added outselves...
28351  #   to prevent emitting warning...
28352  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28353  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28354  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28355
28356  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28357  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28358  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28359
28360  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28361  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28362  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28363
28364elif test "x$COMPILE_TYPE" = xreduced; then
28365  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28366    # Specify -m if running reduced on other Posix platforms
28367
28368  # keep track of c/cxx flags that we added outselves...
28369  #   to prevent emitting warning...
28370  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28371  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28372  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28373
28374  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28375  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28376  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28377
28378  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28379  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28380  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28381
28382  fi
28383fi
28384
28385# Make compilation sanity check
28386for ac_header in stdio.h
28387do :
28388  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28389if test "x$ac_cv_header_stdio_h" = x""yes; then :
28390  cat >>confdefs.h <<_ACEOF
28391#define HAVE_STDIO_H 1
28392_ACEOF
28393
28394else
28395
28396  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28397$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28398  if test "x$COMPILE_TYPE" = xreduced; then
28399    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28400$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28401  elif test "x$COMPILE_TYPE" = xcross; then
28402    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28403$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28404  fi
28405  as_fn_error $? "Cannot continue." "$LINENO" 5
28406
28407fi
28408
28409done
28410
28411
28412# The cast to long int works around a bug in the HP C Compiler
28413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28415# This bug is HP SR number 8606223364.
28416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28417$as_echo_n "checking size of int *... " >&6; }
28418if test "${ac_cv_sizeof_int_p+set}" = set; then :
28419  $as_echo_n "(cached) " >&6
28420else
28421  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28422
28423else
28424  if test "$ac_cv_type_int_p" = yes; then
28425     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28427as_fn_error 77 "cannot compute sizeof (int *)
28428See \`config.log' for more details" "$LINENO" 5 ; }
28429   else
28430     ac_cv_sizeof_int_p=0
28431   fi
28432fi
28433
28434fi
28435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28436$as_echo "$ac_cv_sizeof_int_p" >&6; }
28437
28438
28439
28440cat >>confdefs.h <<_ACEOF
28441#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28442_ACEOF
28443
28444
28445
28446if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28447  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28448  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28449fi
28450
28451if test "x$SIZEOF_INT_P" = x; then
28452    # The test failed, lets stick to the assumed value.
28453    { $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
28454$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28455else
28456    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28457
28458    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28459        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
28460    fi
28461fi
28462
28463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28464$as_echo_n "checking for target address size... " >&6; }
28465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28466$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28467
28468
28469###############################################################################
28470#
28471# Is the target little of big endian?
28472#
28473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28474$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28475if test "${ac_cv_c_bigendian+set}" = set; then :
28476  $as_echo_n "(cached) " >&6
28477else
28478  ac_cv_c_bigendian=unknown
28479    # See if we're dealing with a universal compiler.
28480    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28481/* end confdefs.h.  */
28482#ifndef __APPLE_CC__
28483	       not a universal capable compiler
28484	     #endif
28485	     typedef int dummy;
28486
28487_ACEOF
28488if ac_fn_cxx_try_compile "$LINENO"; then :
28489
28490	# Check for potential -arch flags.  It is not universal unless
28491	# there are at least two -arch flags with different values.
28492	ac_arch=
28493	ac_prev=
28494	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28495	 if test -n "$ac_prev"; then
28496	   case $ac_word in
28497	     i?86 | x86_64 | ppc | ppc64)
28498	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28499		 ac_arch=$ac_word
28500	       else
28501		 ac_cv_c_bigendian=universal
28502		 break
28503	       fi
28504	       ;;
28505	   esac
28506	   ac_prev=
28507	 elif test "x$ac_word" = "x-arch"; then
28508	   ac_prev=arch
28509	 fi
28510       done
28511fi
28512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28513    if test $ac_cv_c_bigendian = unknown; then
28514      # See if sys/param.h defines the BYTE_ORDER macro.
28515      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28516/* end confdefs.h.  */
28517#include <sys/types.h>
28518	     #include <sys/param.h>
28519
28520int
28521main ()
28522{
28523#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28524		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28525		     && LITTLE_ENDIAN)
28526	      bogus endian macros
28527	     #endif
28528
28529  ;
28530  return 0;
28531}
28532_ACEOF
28533if ac_fn_cxx_try_compile "$LINENO"; then :
28534  # It does; now see whether it defined to BIG_ENDIAN or not.
28535	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28536/* end confdefs.h.  */
28537#include <sys/types.h>
28538		#include <sys/param.h>
28539
28540int
28541main ()
28542{
28543#if BYTE_ORDER != BIG_ENDIAN
28544		 not big endian
28545		#endif
28546
28547  ;
28548  return 0;
28549}
28550_ACEOF
28551if ac_fn_cxx_try_compile "$LINENO"; then :
28552  ac_cv_c_bigendian=yes
28553else
28554  ac_cv_c_bigendian=no
28555fi
28556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28557fi
28558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28559    fi
28560    if test $ac_cv_c_bigendian = unknown; then
28561      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28562      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28563/* end confdefs.h.  */
28564#include <limits.h>
28565
28566int
28567main ()
28568{
28569#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28570	      bogus endian macros
28571	     #endif
28572
28573  ;
28574  return 0;
28575}
28576_ACEOF
28577if ac_fn_cxx_try_compile "$LINENO"; then :
28578  # It does; now see whether it defined to _BIG_ENDIAN or not.
28579	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28580/* end confdefs.h.  */
28581#include <limits.h>
28582
28583int
28584main ()
28585{
28586#ifndef _BIG_ENDIAN
28587		 not big endian
28588		#endif
28589
28590  ;
28591  return 0;
28592}
28593_ACEOF
28594if ac_fn_cxx_try_compile "$LINENO"; then :
28595  ac_cv_c_bigendian=yes
28596else
28597  ac_cv_c_bigendian=no
28598fi
28599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28600fi
28601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28602    fi
28603    if test $ac_cv_c_bigendian = unknown; then
28604      # Compile a test program.
28605      if test "$cross_compiling" = yes; then :
28606  # Try to guess by grepping values from an object file.
28607	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28608/* end confdefs.h.  */
28609short int ascii_mm[] =
28610		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28611		short int ascii_ii[] =
28612		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28613		int use_ascii (int i) {
28614		  return ascii_mm[i] + ascii_ii[i];
28615		}
28616		short int ebcdic_ii[] =
28617		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28618		short int ebcdic_mm[] =
28619		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28620		int use_ebcdic (int i) {
28621		  return ebcdic_mm[i] + ebcdic_ii[i];
28622		}
28623		extern int foo;
28624
28625int
28626main ()
28627{
28628return use_ascii (foo) == use_ebcdic (foo);
28629  ;
28630  return 0;
28631}
28632_ACEOF
28633if ac_fn_cxx_try_compile "$LINENO"; then :
28634  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28635	      ac_cv_c_bigendian=yes
28636	    fi
28637	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28638	      if test "$ac_cv_c_bigendian" = unknown; then
28639		ac_cv_c_bigendian=no
28640	      else
28641		# finding both strings is unlikely to happen, but who knows?
28642		ac_cv_c_bigendian=unknown
28643	      fi
28644	    fi
28645fi
28646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28647else
28648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28649/* end confdefs.h.  */
28650$ac_includes_default
28651int
28652main ()
28653{
28654
28655	     /* Are we little or big endian?  From Harbison&Steele.  */
28656	     union
28657	     {
28658	       long int l;
28659	       char c[sizeof (long int)];
28660	     } u;
28661	     u.l = 1;
28662	     return u.c[sizeof (long int) - 1] == 1;
28663
28664  ;
28665  return 0;
28666}
28667_ACEOF
28668if ac_fn_cxx_try_run "$LINENO"; then :
28669  ac_cv_c_bigendian=no
28670else
28671  ac_cv_c_bigendian=yes
28672fi
28673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28674  conftest.$ac_objext conftest.beam conftest.$ac_ext
28675fi
28676
28677    fi
28678fi
28679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28680$as_echo "$ac_cv_c_bigendian" >&6; }
28681 case $ac_cv_c_bigendian in #(
28682   yes)
28683     ENDIAN="big";; #(
28684   no)
28685     ENDIAN="little" ;; #(
28686   universal)
28687     ENDIAN="universal_endianness"
28688     ;; #(
28689   *)
28690     ENDIAN="unknown" ;;
28691 esac
28692
28693
28694if test "x$ENDIAN" = xuniversal_endianness; then
28695    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28696fi
28697if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28698    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
28699fi
28700
28701
28702# Configure flags for the tools
28703
28704
28705###############################################################################
28706#
28707# How to compile shared libraries.
28708#
28709
28710if test "x$GCC" = xyes; then
28711    COMPILER_NAME=gcc
28712    PICFLAG="-fPIC"
28713    LIBRARY_PREFIX=lib
28714    SHARED_LIBRARY='lib$1.so'
28715    STATIC_LIBRARY='lib$1.a'
28716    SHARED_LIBRARY_FLAGS="-shared"
28717    SHARED_LIBRARY_SUFFIX='.so'
28718    STATIC_LIBRARY_SUFFIX='.a'
28719    OBJ_SUFFIX='.o'
28720    EXE_SUFFIX=''
28721    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28722    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28723    C_FLAG_REORDER=''
28724    CXX_FLAG_REORDER=''
28725    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28726    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28727    LD="$CC"
28728    LDEXE="$CC"
28729    LDCXX="$CXX"
28730    LDEXECXX="$CXX"
28731    POST_STRIP_CMD="$STRIP -g"
28732
28733    # Linking is different on MacOSX
28734    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28735        # Might change in the future to clang.
28736        COMPILER_NAME=gcc
28737        SHARED_LIBRARY='lib$1.dylib'
28738        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28739        SHARED_LIBRARY_SUFFIX='.dylib'
28740        EXE_SUFFIX=''
28741        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28742        SET_SHARED_LIBRARY_MAPFILE=''
28743        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28744        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28745        POST_STRIP_CMD="$STRIP -S"
28746    fi
28747else
28748    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28749        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28750        COMPILER_NAME=ossc
28751        PICFLAG="-KPIC"
28752        LIBRARY_PREFIX=lib
28753        SHARED_LIBRARY='lib$1.so'
28754        STATIC_LIBRARY='lib$1.a'
28755        SHARED_LIBRARY_FLAGS="-G"
28756        SHARED_LIBRARY_SUFFIX='.so'
28757        STATIC_LIBRARY_SUFFIX='.a'
28758        OBJ_SUFFIX='.o'
28759        EXE_SUFFIX=''
28760        SET_SHARED_LIBRARY_NAME=''
28761        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28762	C_FLAG_REORDER='-xF'
28763	CXX_FLAG_REORDER='-xF'
28764        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28765        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28766        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28767        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28768        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28769        POST_STRIP_CMD="$STRIP -x"
28770        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28771    fi
28772    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28773        # If it is not gcc, then assume it is the MS Visual Studio compiler
28774        COMPILER_NAME=cl
28775        PICFLAG=""
28776        LIBRARY_PREFIX=
28777        SHARED_LIBRARY='$1.dll'
28778        STATIC_LIBRARY='$1.lib'
28779        SHARED_LIBRARY_FLAGS="-LD"
28780        SHARED_LIBRARY_SUFFIX='.dll'
28781        STATIC_LIBRARY_SUFFIX='.lib'
28782        OBJ_SUFFIX='.obj'
28783        EXE_SUFFIX='.exe'
28784        SET_SHARED_LIBRARY_NAME=''
28785        SET_SHARED_LIBRARY_MAPFILE=''
28786        SET_SHARED_LIBRARY_ORIGIN=''
28787        SET_EXECUTABLE_ORIGIN=''
28788    fi
28789fi
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808# The (cross) compiler is now configured, we can now test capabilities
28809# of the target platform.
28810
28811
28812
28813###############################################################################
28814#
28815# Setup the opt flags for different compilers
28816# and different operating systems.
28817#
28818
28819#
28820# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28821#
28822if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28823    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28824    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28825    CFLAGS="$CFLAGS -mstackrealign"
28826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28827$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28828    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28829/* end confdefs.h.  */
28830int main() { return 0; }
28831_ACEOF
28832if ac_fn_cxx_try_link "$LINENO"; then :
28833
28834		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28835$as_echo "yes" >&6; }
28836
28837else
28838
28839		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28840$as_echo "no" >&6; }
28841	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28842
28843fi
28844rm -f core conftest.err conftest.$ac_objext \
28845    conftest$ac_exeext conftest.$ac_ext
28846fi
28847
28848C_FLAG_DEPS="-MMD -MF"
28849CXX_FLAG_DEPS="-MMD -MF"
28850
28851case $COMPILER_TYPE in
28852  CC )
28853    D_FLAG="-g"
28854    case $COMPILER_NAME in
28855      gcc )
28856      	case $OPENJDK_TARGET_OS in
28857	  macosx )
28858	    # On MacOSX we optimize for size, something
28859	    # we should do for all platforms?
28860	    C_O_FLAG_HI="-Os"
28861	    C_O_FLAG_NORM="-Os"
28862	    C_O_FLAG_NONE=""
28863	    ;;
28864	  *)
28865	    C_O_FLAG_HI="-O3"
28866	    C_O_FLAG_NORM="-O2"
28867	    C_O_FLAG_NONE="-O0"
28868	    CFLAGS_DEBUG_SYMBOLS="-g"
28869	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28870	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28871	       CFLAGS_DEBUG_SYMBOLS="-g1"
28872	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28873	    fi
28874	    ;;
28875	esac
28876        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28877        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28878        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28879        ;;
28880      ossc )
28881        #
28882        # Forte has different names for this with their C++ compiler...
28883        #
28884        C_FLAG_DEPS="-xMMD -xMF"
28885        CXX_FLAG_DEPS="-xMMD -xMF"
28886
28887        # Extra options used with HIGHEST
28888        #
28889        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28890        #          done with care, there are some assumptions below that need to
28891        #          be understood about the use of pointers, and IEEE behavior.
28892        #
28893        # Use non-standard floating point mode (not IEEE 754)
28894        CC_HIGHEST="$CC_HIGHEST -fns"
28895        # Do some simplification of floating point arithmetic (not IEEE 754)
28896        CC_HIGHEST="$CC_HIGHEST -fsimple"
28897        # Use single precision floating point with 'float'
28898        CC_HIGHEST="$CC_HIGHEST -fsingle"
28899        # Assume memory references via basic pointer types do not alias
28900        #   (Source with excessing pointer casting and data access with mixed
28901        #    pointer types are not recommended)
28902        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28903        # Use intrinsic or inline versions for math/std functions
28904        #   (If you expect perfect errno behavior, do not use this)
28905        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28906        # Loop data dependency optimizations (need -xO3 or higher)
28907        CC_HIGHEST="$CC_HIGHEST -xdepend"
28908        # Pointer parameters to functions do not overlap
28909        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28910        #    If you pass in multiple pointers to the same data, do not use this)
28911        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28912        # Inline some library routines
28913        #   (If you expect perfect errno behavior, do not use this)
28914        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28915        # Use optimized math routines
28916        #   (If you expect perfect errno behavior, do not use this)
28917        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28918        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28919
28920        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28921          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28922          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28923        fi
28924
28925        case $OPENJDK_TARGET_CPU_ARCH in
28926          x86)
28927            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28928            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28929            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28930            C_O_FLAG_NONE="-xregs=no%frameptr"
28931            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28932            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28933            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28934            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28935            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28936               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28937               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28938            fi
28939            ;;
28940          sparc)
28941            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28942            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28943            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28944            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28945            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28946            C_O_FLAG_NONE=""
28947            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28948            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28949            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28950            CXX_O_FLAG_NONE=""
28951            ;;
28952        esac
28953
28954    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28955    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28956    esac
28957    ;;
28958  CL )
28959    D_FLAG=
28960    C_O_FLAG_HIGHEST="-O2"
28961    C_O_FLAG_HI="-O1"
28962    C_O_FLAG_NORM="-O1"
28963    C_O_FLAG_NONE="-Od"
28964    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28965    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28966    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28967    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28968    ;;
28969esac
28970
28971if test -z "$C_O_FLAG_HIGHEST"; then
28972   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28973fi
28974
28975if test -z "$CXX_O_FLAG_HIGHEST"; then
28976   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28977fi
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28993   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28994$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28995fi
28996
28997if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28998   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28999$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29000fi
29001
29002if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29003   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29004$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29005fi
29006
29007
29008# Check whether --with-extra-cflags was given.
29009if test "${with_extra_cflags+set}" = set; then :
29010  withval=$with_extra_cflags;
29011fi
29012
29013
29014
29015# Check whether --with-extra-cxxflags was given.
29016if test "${with_extra_cxxflags+set}" = set; then :
29017  withval=$with_extra_cxxflags;
29018fi
29019
29020
29021
29022# Check whether --with-extra-ldflags was given.
29023if test "${with_extra_ldflags+set}" = set; then :
29024  withval=$with_extra_ldflags;
29025fi
29026
29027
29028CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29029CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29030LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29031
29032# Hotspot needs these set in their legacy form
29033LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29034LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29035LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29036
29037
29038
29039
29040
29041###############################################################################
29042#
29043# Now setup the CFLAGS and LDFLAGS for the JDK build.
29044# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29045#
29046case $COMPILER_NAME in
29047      gcc )
29048      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29049                          -pipe \
29050                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29051	  case $OPENJDK_TARGET_CPU_ARCH in
29052	  arm )
29053            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29054	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29055	  ;;
29056	  ppc )
29057            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29058	  ;;
29059	  * )
29060	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29061	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29062          ;;
29063	  esac
29064          ;;
29065      ossc )
29066          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29067          case $OPENJDK_TARGET_CPU_ARCH in
29068          x86 )
29069            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29070       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29071          ;;
29072          esac
29073
29074      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29075      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29076
29077          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29078          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29079          ;;
29080      cl )
29081          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29082               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29083	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29084	       -DWIN32 -DIAL"
29085          case $OPENJDK_TARGET_CPU in
29086              x86 )
29087                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29088                  ;;
29089              x86_64 )
29090                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29091                  ;;
29092          esac
29093          ;;
29094esac
29095
29096###############################################################################
29097
29098CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29099
29100# The package path is used only on macosx?
29101PACKAGE_PATH=/opt/local
29102
29103
29104if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29105    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29106    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29107    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29108    #   Note: -Dmacro         is the same as    #define macro 1
29109    #         -Dmacro=	    is the same as    #define macro
29110    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29111        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29112    else
29113        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29114    fi
29115else
29116    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29117fi
29118if test "x$OPENJDK_TARGET_OS" = xlinux; then
29119    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29120fi
29121if test "x$OPENJDK_TARGET_OS" = xwindows; then
29122    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29123fi
29124if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29125    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29126fi
29127if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29128    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29129    # Setting these parameters makes it an error to link to macosx APIs that are
29130    # newer than the given OS version and makes the linked binaries compatible even
29131    # if built on a newer version of the OS.
29132    # The expected format is X.Y.Z
29133    MACOSX_VERSION_MIN=10.7.0
29134
29135    # The macro takes the version with no dots, ex: 1070
29136    # Let the flags variables get resolved in make for easier override on make
29137    # command line.
29138    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29139    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29140fi
29141if test "x$OPENJDK_TARGET_OS" = xbsd; then
29142    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29143fi
29144if test "x$DEBUG_LEVEL" = xrelease; then
29145    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29146    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29147        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29148    fi
29149else
29150    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29151fi
29152
29153CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29154CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29155
29156CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29157        -I${JDK_OUTPUTDIR}/include \
29158        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29159        -I${JDK_TOPDIR}/src/share/javavm/export \
29160        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29161        -I${JDK_TOPDIR}/src/share/native/common \
29162        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29163
29164# The shared libraries are compiled using the picflag.
29165CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29166CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29167
29168# Executable flags
29169CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29170CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29171
29172# Now this is odd. The JDK native libraries have to link against libjvm.so
29173# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29174# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29175# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29176# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29177# libraries will link to whatever is in memory. Yuck.
29178#
29179# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29180if test "x$COMPILER_NAME" = xcl; then
29181    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29182    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29183        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29184    fi
29185    # TODO: make -debug optional "--disable-full-debug-symbols"
29186    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29187    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29188    LDFLAGS_JDKLIB_SUFFIX=""
29189    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29190        LDFLAGS_STACK_SIZE=1048576
29191    else
29192        LDFLAGS_STACK_SIZE=327680
29193    fi
29194    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29195else
29196    if test "x$COMPILER_NAME" = xgcc; then
29197        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29198        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29199        if test -n "$HAS_GNU_HASH"; then
29200            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29201        fi
29202        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29203          # And since we now know that the linker is gnu, then add -z defs, to forbid
29204          # undefined symbols in object files.
29205          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29206          if test "x$DEBUG_LEVEL" = "xrelease"; then
29207              # When building release libraries, tell the linker optimize them.
29208              # Should this be supplied to the OSS linker as well?
29209              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29210          fi
29211        fi
29212    fi
29213    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29214                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29215
29216    # On some platforms (mac) the linker warns about non existing -L dirs.
29217    # Add server first if available. Linking aginst client does not always produce the same results.
29218    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29219    # Default to server for other variants.
29220    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29221        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29222    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29223        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29224    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29225        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29226    else
29227        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29228    fi
29229
29230    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29231    if test "x$COMPILER_NAME" = xossc; then
29232        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29233    fi
29234
29235    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29236    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29237        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29238    fi
29239fi
29240
29241# Adjust flags according to debug level.
29242case $DEBUG_LEVEL in
29243      fastdebug )
29244              CFLAGS="$CFLAGS $D_FLAG"
29245              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29246              ;;
29247      slowdebug )
29248              CFLAGS="$CFLAGS $D_FLAG"
29249	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29250	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29251	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29252	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29253              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29254              ;;
29255esac
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272  # Some Zero and Shark settings.
29273  # ZERO_ARCHFLAG tells the compiler which mode to build for
29274  case "${OPENJDK_TARGET_CPU}" in
29275    s390)
29276      ZERO_ARCHFLAG="-m31"
29277      ;;
29278    *)
29279      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29280  esac
29281
29282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29283$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29284  supports=yes
29285
29286  saved_cflags="$CFLAGS"
29287  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29288  ac_ext=c
29289ac_cpp='$CPP $CPPFLAGS'
29290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29292ac_compiler_gnu=$ac_cv_c_compiler_gnu
29293
29294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29295/* end confdefs.h.  */
29296
29297    int i;
29298
29299_ACEOF
29300if ac_fn_c_try_compile "$LINENO"; then :
29301
29302else
29303  supports=no
29304fi
29305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29306  ac_ext=cpp
29307ac_cpp='$CXXCPP $CPPFLAGS'
29308ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29309ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29310ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29311
29312  CFLAGS="$saved_cflags"
29313
29314  saved_cxxflags="$CXXFLAGS"
29315  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29316  ac_ext=cpp
29317ac_cpp='$CXXCPP $CPPFLAGS'
29318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29321
29322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29323/* end confdefs.h.  */
29324
29325    int i;
29326
29327_ACEOF
29328if ac_fn_cxx_try_compile "$LINENO"; then :
29329
29330else
29331  supports=no
29332fi
29333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29334  ac_ext=cpp
29335ac_cpp='$CXXCPP $CPPFLAGS'
29336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29339
29340  CXXFLAGS="$saved_cxxflags"
29341
29342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29343$as_echo "$supports" >&6; }
29344  if test "x$supports" = "xyes" ; then
29345    :
29346  else
29347    ZERO_ARCHFLAG=""
29348  fi
29349
29350
29351
29352  # Check that the compiler supports -mX flags
29353  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29354
29355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29356$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29357  supports=yes
29358
29359  saved_cflags="$CFLAGS"
29360  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29361  ac_ext=c
29362ac_cpp='$CPP $CPPFLAGS'
29363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29365ac_compiler_gnu=$ac_cv_c_compiler_gnu
29366
29367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29368/* end confdefs.h.  */
29369
29370    int i;
29371
29372_ACEOF
29373if ac_fn_c_try_compile "$LINENO"; then :
29374
29375else
29376  supports=no
29377fi
29378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29379  ac_ext=cpp
29380ac_cpp='$CXXCPP $CPPFLAGS'
29381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29384
29385  CFLAGS="$saved_cflags"
29386
29387  saved_cxxflags="$CXXFLAGS"
29388  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29389  ac_ext=cpp
29390ac_cpp='$CXXCPP $CPPFLAGS'
29391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29394
29395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29396/* end confdefs.h.  */
29397
29398    int i;
29399
29400_ACEOF
29401if ac_fn_cxx_try_compile "$LINENO"; then :
29402
29403else
29404  supports=no
29405fi
29406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29407  ac_ext=cpp
29408ac_cpp='$CXXCPP $CPPFLAGS'
29409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29412
29413  CXXFLAGS="$saved_cxxflags"
29414
29415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29416$as_echo "$supports" >&6; }
29417  if test "x$supports" = "xyes" ; then
29418    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29419  else
29420    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29421  fi
29422
29423
29424
29425
29426# Setup debug symbols (need objcopy from the toolchain for that)
29427
29428#
29429# ENABLE_DEBUG_SYMBOLS
29430# This must be done after the toolchain is setup, since we're looking at objcopy.
29431#
29432# Check whether --enable-debug-symbols was given.
29433if test "${enable_debug_symbols+set}" = set; then :
29434  enableval=$enable_debug_symbols;
29435fi
29436
29437
29438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29439$as_echo_n "checking if we should generate debug symbols... " >&6; }
29440
29441if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29442   # explicit enabling of enable-debug-symbols and can't find objcopy
29443   #   this is an error
29444   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29445fi
29446
29447if test "x$enable_debug_symbols" = "xyes"; then
29448  ENABLE_DEBUG_SYMBOLS=true
29449elif test "x$enable_debug_symbols" = "xno"; then
29450  ENABLE_DEBUG_SYMBOLS=false
29451else
29452  # default on macosx is false
29453  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29454    ENABLE_DEBUG_SYMBOLS=false
29455  # Default is on if objcopy is found, otherwise off
29456  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29457    ENABLE_DEBUG_SYMBOLS=true
29458  else
29459    ENABLE_DEBUG_SYMBOLS=false
29460  fi
29461fi
29462
29463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29464$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29465
29466#
29467# ZIP_DEBUGINFO_FILES
29468#
29469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29470$as_echo_n "checking if we should zip debug-info files... " >&6; }
29471# Check whether --enable-zip-debug-info was given.
29472if test "${enable_zip_debug_info+set}" = set; then :
29473  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29474else
29475  enable_zip_debug_info="yes"
29476fi
29477
29478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29479$as_echo "${enable_zip_debug_info}" >&6; }
29480
29481if test "x${enable_zip_debug_info}" = "xno"; then
29482   ZIP_DEBUGINFO_FILES=false
29483else
29484   ZIP_DEBUGINFO_FILES=true
29485fi
29486
29487
29488
29489
29490
29491
29492
29493###############################################################################
29494#
29495# Check dependencies for external and internal libraries.
29496#
29497###############################################################################
29498
29499
29500
29501###############################################################################
29502#
29503# OS specific settings that we never will need to probe.
29504#
29505if test "x$OPENJDK_TARGET_OS" = xlinux; then
29506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29507$as_echo_n "checking what is not needed on Linux?... " >&6; }
29508    PULSE_NOT_NEEDED=yes
29509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29510$as_echo "pulse" >&6; }
29511fi
29512
29513if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29515$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29516    ALSA_NOT_NEEDED=yes
29517    PULSE_NOT_NEEDED=yes
29518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29519$as_echo "alsa pulse" >&6; }
29520fi
29521
29522if test "x$OPENJDK_TARGET_OS" = xwindows; then
29523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29524$as_echo_n "checking what is not needed on Windows?... " >&6; }
29525    CUPS_NOT_NEEDED=yes
29526    ALSA_NOT_NEEDED=yes
29527    PULSE_NOT_NEEDED=yes
29528    X11_NOT_NEEDED=yes
29529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29530$as_echo "alsa cups pulse x11" >&6; }
29531fi
29532
29533if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29535$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29536    ALSA_NOT_NEEDED=yes
29537    PULSE_NOT_NEEDED=yes
29538    X11_NOT_NEEDED=yes
29539    FREETYPE2_NOT_NEEDED=yes
29540    # If the java runtime framework is disabled, then we need X11.
29541    # This will be adjusted below.
29542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29543$as_echo "alsa pulse x11" >&6; }
29544fi
29545
29546if test "x$OPENJDK_TARGET_OS" = xbsd; then
29547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29548$as_echo_n "checking what is not needed on bsd?... " >&6; }
29549    ALSA_NOT_NEEDED=yes
29550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29551$as_echo "alsa" >&6; }
29552fi
29553
29554if test "x$OPENJDK" = "xfalse"; then
29555    FREETYPE2_NOT_NEEDED=yes
29556fi
29557
29558if test "x$SUPPORT_HEADFUL" = xno; then
29559    X11_NOT_NEEDED=yes
29560fi
29561
29562###############################################################################
29563#
29564# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29565# that uses this API.
29566#
29567# Check whether --enable-macosx-runtime-support was given.
29568if test "${enable_macosx_runtime_support+set}" = set; then :
29569  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29570else
29571  MACOSX_RUNTIME_SUPPORT="no"
29572fi
29573
29574
29575USE_MACOSX_RUNTIME_SUPPORT=no
29576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29577$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29578if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29579    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29580        MACOSX_RUNTIME_SUPPORT=yes
29581        USE_MACOSX_RUNTIME_SUPPORT=yes
29582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29583$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29584    else
29585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29586$as_echo "yes, but explicitly disabled." >&6; }
29587    fi
29588else
29589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29590$as_echo "no" >&6; }
29591fi
29592
29593if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29595$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29596    X11_NOT_NEEDED=
29597    FREETYPE2_NOT_NEEDED=
29598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29599$as_echo "alsa pulse" >&6; }
29600fi
29601
29602
29603
29604###############################################################################
29605#
29606# Check for X Windows
29607#
29608
29609# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29610# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29611# --x-libraries for the sysroot, if that seems to be correct.
29612if test "x$SYS_ROOT" != "x/"; then
29613  if test "x$x_includes" = xNONE; then
29614    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29615      x_includes="$SYS_ROOT/usr/X11R6/include"
29616    fi
29617  fi
29618  if test "x$x_libraries" = xNONE; then
29619    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29620      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29621    fi
29622  fi
29623fi
29624
29625# Now let autoconf do it's magic
29626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29627$as_echo_n "checking for X... " >&6; }
29628
29629
29630# Check whether --with-x was given.
29631if test "${with_x+set}" = set; then :
29632  withval=$with_x;
29633fi
29634
29635# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29636if test "x$with_x" = xno; then
29637  # The user explicitly disabled X.
29638  have_x=disabled
29639else
29640  case $x_includes,$x_libraries in #(
29641    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29642    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29643  $as_echo_n "(cached) " >&6
29644else
29645  # One or both of the vars are not set, and there is no cached value.
29646ac_x_includes=no ac_x_libraries=no
29647rm -f -r conftest.dir
29648if mkdir conftest.dir; then
29649  cd conftest.dir
29650  cat >Imakefile <<'_ACEOF'
29651incroot:
29652	@echo incroot='${INCROOT}'
29653usrlibdir:
29654	@echo usrlibdir='${USRLIBDIR}'
29655libdir:
29656	@echo libdir='${LIBDIR}'
29657_ACEOF
29658  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29659    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29660    for ac_var in incroot usrlibdir libdir; do
29661      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29662    done
29663    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29664    for ac_extension in a so sl dylib la dll; do
29665      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29666	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29667	ac_im_usrlibdir=$ac_im_libdir; break
29668      fi
29669    done
29670    # Screen out bogus values from the imake configuration.  They are
29671    # bogus both because they are the default anyway, and because
29672    # using them would break gcc on systems where it needs fixed includes.
29673    case $ac_im_incroot in
29674	/usr/include) ac_x_includes= ;;
29675	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29676    esac
29677    case $ac_im_usrlibdir in
29678	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29679	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29680    esac
29681  fi
29682  cd ..
29683  rm -f -r conftest.dir
29684fi
29685
29686# Standard set of common directories for X headers.
29687# Check X11 before X11Rn because it is often a symlink to the current release.
29688ac_x_header_dirs='
29689/usr/X11/include
29690/usr/X11R7/include
29691/usr/X11R6/include
29692/usr/X11R5/include
29693/usr/X11R4/include
29694
29695/usr/include/X11
29696/usr/include/X11R7
29697/usr/include/X11R6
29698/usr/include/X11R5
29699/usr/include/X11R4
29700
29701/usr/local/X11/include
29702/usr/local/X11R7/include
29703/usr/local/X11R6/include
29704/usr/local/X11R5/include
29705/usr/local/X11R4/include
29706
29707/usr/local/include/X11
29708/usr/local/include/X11R7
29709/usr/local/include/X11R6
29710/usr/local/include/X11R5
29711/usr/local/include/X11R4
29712
29713/usr/X386/include
29714/usr/x386/include
29715/usr/XFree86/include/X11
29716
29717/usr/include
29718/usr/local/include
29719/usr/unsupported/include
29720/usr/athena/include
29721/usr/local/x11r5/include
29722/usr/lpp/Xamples/include
29723
29724/usr/openwin/include
29725/usr/openwin/share/include'
29726
29727if test "$ac_x_includes" = no; then
29728  # Guess where to find include files, by looking for Xlib.h.
29729  # First, try using that file with no special directory specified.
29730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29731/* end confdefs.h.  */
29732#include <X11/Xlib.h>
29733_ACEOF
29734if ac_fn_cxx_try_cpp "$LINENO"; then :
29735  # We can compile using X headers with no special include directory.
29736ac_x_includes=
29737else
29738  for ac_dir in $ac_x_header_dirs; do
29739  if test -r "$ac_dir/X11/Xlib.h"; then
29740    ac_x_includes=$ac_dir
29741    break
29742  fi
29743done
29744fi
29745rm -f conftest.err conftest.i conftest.$ac_ext
29746fi # $ac_x_includes = no
29747
29748if test "$ac_x_libraries" = no; then
29749  # Check for the libraries.
29750  # See if we find them without any special options.
29751  # Don't add to $LIBS permanently.
29752  ac_save_LIBS=$LIBS
29753  LIBS="-lX11 $LIBS"
29754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29755/* end confdefs.h.  */
29756#include <X11/Xlib.h>
29757int
29758main ()
29759{
29760XrmInitialize ()
29761  ;
29762  return 0;
29763}
29764_ACEOF
29765if ac_fn_cxx_try_link "$LINENO"; then :
29766  LIBS=$ac_save_LIBS
29767# We can link X programs with no special library path.
29768ac_x_libraries=
29769else
29770  LIBS=$ac_save_LIBS
29771for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29772do
29773  # Don't even attempt the hair of trying to link an X program!
29774  for ac_extension in a so sl dylib la dll; do
29775    if test -r "$ac_dir/libX11.$ac_extension"; then
29776      ac_x_libraries=$ac_dir
29777      break 2
29778    fi
29779  done
29780done
29781fi
29782rm -f core conftest.err conftest.$ac_objext \
29783    conftest$ac_exeext conftest.$ac_ext
29784fi # $ac_x_libraries = no
29785
29786case $ac_x_includes,$ac_x_libraries in #(
29787  no,* | *,no | *\'*)
29788    # Didn't find X, or a directory has "'" in its name.
29789    ac_cv_have_x="have_x=no";; #(
29790  *)
29791    # Record where we found X for the cache.
29792    ac_cv_have_x="have_x=yes\
29793	ac_x_includes='$ac_x_includes'\
29794	ac_x_libraries='$ac_x_libraries'"
29795esac
29796fi
29797;; #(
29798    *) have_x=yes;;
29799  esac
29800  eval "$ac_cv_have_x"
29801fi # $with_x != no
29802
29803if test "$have_x" != yes; then
29804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29805$as_echo "$have_x" >&6; }
29806  no_x=yes
29807else
29808  # If each of the values was on the command line, it overrides each guess.
29809  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29810  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29811  # Update the cache value to reflect the command line values.
29812  ac_cv_have_x="have_x=yes\
29813	ac_x_includes='$x_includes'\
29814	ac_x_libraries='$x_libraries'"
29815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29816$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29817fi
29818
29819if test "$no_x" = yes; then
29820  # Not all programs may use this symbol, but it does not hurt to define it.
29821
29822$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29823
29824  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29825else
29826  if test -n "$x_includes"; then
29827    X_CFLAGS="$X_CFLAGS -I$x_includes"
29828  fi
29829
29830  # It would also be nice to do this for all -L options, not just this one.
29831  if test -n "$x_libraries"; then
29832    X_LIBS="$X_LIBS -L$x_libraries"
29833    # For Solaris; some versions of Sun CC require a space after -R and
29834    # others require no space.  Words are not sufficient . . . .
29835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29836$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29837    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29838    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29839    ac_cxx_werror_flag=yes
29840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29841/* end confdefs.h.  */
29842
29843int
29844main ()
29845{
29846
29847  ;
29848  return 0;
29849}
29850_ACEOF
29851if ac_fn_cxx_try_link "$LINENO"; then :
29852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29853$as_echo "no" >&6; }
29854       X_LIBS="$X_LIBS -R$x_libraries"
29855else
29856  LIBS="$ac_xsave_LIBS -R $x_libraries"
29857       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29858/* end confdefs.h.  */
29859
29860int
29861main ()
29862{
29863
29864  ;
29865  return 0;
29866}
29867_ACEOF
29868if ac_fn_cxx_try_link "$LINENO"; then :
29869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29870$as_echo "yes" >&6; }
29871	  X_LIBS="$X_LIBS -R $x_libraries"
29872else
29873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29874$as_echo "neither works" >&6; }
29875fi
29876rm -f core conftest.err conftest.$ac_objext \
29877    conftest$ac_exeext conftest.$ac_ext
29878fi
29879rm -f core conftest.err conftest.$ac_objext \
29880    conftest$ac_exeext conftest.$ac_ext
29881    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29882    LIBS=$ac_xsave_LIBS
29883  fi
29884
29885  # Check for system-dependent libraries X programs must link with.
29886  # Do this before checking for the system-independent R6 libraries
29887  # (-lICE), since we may need -lsocket or whatever for X linking.
29888
29889  if test "$ISC" = yes; then
29890    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29891  else
29892    # Martyn Johnson says this is needed for Ultrix, if the X
29893    # libraries were built with DECnet support.  And Karl Berry says
29894    # the Alpha needs dnet_stub (dnet does not exist).
29895    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29896    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29897/* end confdefs.h.  */
29898
29899/* Override any GCC internal prototype to avoid an error.
29900   Use char because int might match the return type of a GCC
29901   builtin and then its argument prototype would still apply.  */
29902#ifdef __cplusplus
29903extern "C"
29904#endif
29905char XOpenDisplay ();
29906int
29907main ()
29908{
29909return XOpenDisplay ();
29910  ;
29911  return 0;
29912}
29913_ACEOF
29914if ac_fn_cxx_try_link "$LINENO"; then :
29915
29916else
29917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29918$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29919if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29920  $as_echo_n "(cached) " >&6
29921else
29922  ac_check_lib_save_LIBS=$LIBS
29923LIBS="-ldnet  $LIBS"
29924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29925/* end confdefs.h.  */
29926
29927/* Override any GCC internal prototype to avoid an error.
29928   Use char because int might match the return type of a GCC
29929   builtin and then its argument prototype would still apply.  */
29930#ifdef __cplusplus
29931extern "C"
29932#endif
29933char dnet_ntoa ();
29934int
29935main ()
29936{
29937return dnet_ntoa ();
29938  ;
29939  return 0;
29940}
29941_ACEOF
29942if ac_fn_cxx_try_link "$LINENO"; then :
29943  ac_cv_lib_dnet_dnet_ntoa=yes
29944else
29945  ac_cv_lib_dnet_dnet_ntoa=no
29946fi
29947rm -f core conftest.err conftest.$ac_objext \
29948    conftest$ac_exeext conftest.$ac_ext
29949LIBS=$ac_check_lib_save_LIBS
29950fi
29951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29952$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29953if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29954  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29955fi
29956
29957    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29959$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29960if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
29961  $as_echo_n "(cached) " >&6
29962else
29963  ac_check_lib_save_LIBS=$LIBS
29964LIBS="-ldnet_stub  $LIBS"
29965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29966/* end confdefs.h.  */
29967
29968/* Override any GCC internal prototype to avoid an error.
29969   Use char because int might match the return type of a GCC
29970   builtin and then its argument prototype would still apply.  */
29971#ifdef __cplusplus
29972extern "C"
29973#endif
29974char dnet_ntoa ();
29975int
29976main ()
29977{
29978return dnet_ntoa ();
29979  ;
29980  return 0;
29981}
29982_ACEOF
29983if ac_fn_cxx_try_link "$LINENO"; then :
29984  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29985else
29986  ac_cv_lib_dnet_stub_dnet_ntoa=no
29987fi
29988rm -f core conftest.err conftest.$ac_objext \
29989    conftest$ac_exeext conftest.$ac_ext
29990LIBS=$ac_check_lib_save_LIBS
29991fi
29992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29993$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29994if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
29995  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29996fi
29997
29998    fi
29999fi
30000rm -f core conftest.err conftest.$ac_objext \
30001    conftest$ac_exeext conftest.$ac_ext
30002    LIBS="$ac_xsave_LIBS"
30003
30004    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30005    # to get the SysV transport functions.
30006    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30007    # needs -lnsl.
30008    # The nsl library prevents programs from opening the X display
30009    # on Irix 5.2, according to T.E. Dickey.
30010    # The functions gethostbyname, getservbyname, and inet_addr are
30011    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30012    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30013if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30014
30015fi
30016
30017    if test $ac_cv_func_gethostbyname = no; then
30018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30019$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30020if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30021  $as_echo_n "(cached) " >&6
30022else
30023  ac_check_lib_save_LIBS=$LIBS
30024LIBS="-lnsl  $LIBS"
30025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30026/* end confdefs.h.  */
30027
30028/* Override any GCC internal prototype to avoid an error.
30029   Use char because int might match the return type of a GCC
30030   builtin and then its argument prototype would still apply.  */
30031#ifdef __cplusplus
30032extern "C"
30033#endif
30034char gethostbyname ();
30035int
30036main ()
30037{
30038return gethostbyname ();
30039  ;
30040  return 0;
30041}
30042_ACEOF
30043if ac_fn_cxx_try_link "$LINENO"; then :
30044  ac_cv_lib_nsl_gethostbyname=yes
30045else
30046  ac_cv_lib_nsl_gethostbyname=no
30047fi
30048rm -f core conftest.err conftest.$ac_objext \
30049    conftest$ac_exeext conftest.$ac_ext
30050LIBS=$ac_check_lib_save_LIBS
30051fi
30052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30053$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30054if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30055  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30056fi
30057
30058      if test $ac_cv_lib_nsl_gethostbyname = no; then
30059	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30060$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30061if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30062  $as_echo_n "(cached) " >&6
30063else
30064  ac_check_lib_save_LIBS=$LIBS
30065LIBS="-lbsd  $LIBS"
30066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30067/* end confdefs.h.  */
30068
30069/* Override any GCC internal prototype to avoid an error.
30070   Use char because int might match the return type of a GCC
30071   builtin and then its argument prototype would still apply.  */
30072#ifdef __cplusplus
30073extern "C"
30074#endif
30075char gethostbyname ();
30076int
30077main ()
30078{
30079return gethostbyname ();
30080  ;
30081  return 0;
30082}
30083_ACEOF
30084if ac_fn_cxx_try_link "$LINENO"; then :
30085  ac_cv_lib_bsd_gethostbyname=yes
30086else
30087  ac_cv_lib_bsd_gethostbyname=no
30088fi
30089rm -f core conftest.err conftest.$ac_objext \
30090    conftest$ac_exeext conftest.$ac_ext
30091LIBS=$ac_check_lib_save_LIBS
30092fi
30093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30094$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30095if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30096  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30097fi
30098
30099      fi
30100    fi
30101
30102    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30103    # socket/setsockopt and other routines are undefined under SCO ODT
30104    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30105    # on later versions), says Simon Leinen: it contains gethostby*
30106    # variants that don't use the name server (or something).  -lsocket
30107    # must be given before -lnsl if both are needed.  We assume that
30108    # if connect needs -lnsl, so does gethostbyname.
30109    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30110if test "x$ac_cv_func_connect" = x""yes; then :
30111
30112fi
30113
30114    if test $ac_cv_func_connect = no; then
30115      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30116$as_echo_n "checking for connect in -lsocket... " >&6; }
30117if test "${ac_cv_lib_socket_connect+set}" = set; then :
30118  $as_echo_n "(cached) " >&6
30119else
30120  ac_check_lib_save_LIBS=$LIBS
30121LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30123/* end confdefs.h.  */
30124
30125/* Override any GCC internal prototype to avoid an error.
30126   Use char because int might match the return type of a GCC
30127   builtin and then its argument prototype would still apply.  */
30128#ifdef __cplusplus
30129extern "C"
30130#endif
30131char connect ();
30132int
30133main ()
30134{
30135return connect ();
30136  ;
30137  return 0;
30138}
30139_ACEOF
30140if ac_fn_cxx_try_link "$LINENO"; then :
30141  ac_cv_lib_socket_connect=yes
30142else
30143  ac_cv_lib_socket_connect=no
30144fi
30145rm -f core conftest.err conftest.$ac_objext \
30146    conftest$ac_exeext conftest.$ac_ext
30147LIBS=$ac_check_lib_save_LIBS
30148fi
30149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30150$as_echo "$ac_cv_lib_socket_connect" >&6; }
30151if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30152  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30153fi
30154
30155    fi
30156
30157    # Guillermo Gomez says -lposix is necessary on A/UX.
30158    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30159if test "x$ac_cv_func_remove" = x""yes; then :
30160
30161fi
30162
30163    if test $ac_cv_func_remove = no; then
30164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30165$as_echo_n "checking for remove in -lposix... " >&6; }
30166if test "${ac_cv_lib_posix_remove+set}" = set; then :
30167  $as_echo_n "(cached) " >&6
30168else
30169  ac_check_lib_save_LIBS=$LIBS
30170LIBS="-lposix  $LIBS"
30171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30172/* end confdefs.h.  */
30173
30174/* Override any GCC internal prototype to avoid an error.
30175   Use char because int might match the return type of a GCC
30176   builtin and then its argument prototype would still apply.  */
30177#ifdef __cplusplus
30178extern "C"
30179#endif
30180char remove ();
30181int
30182main ()
30183{
30184return remove ();
30185  ;
30186  return 0;
30187}
30188_ACEOF
30189if ac_fn_cxx_try_link "$LINENO"; then :
30190  ac_cv_lib_posix_remove=yes
30191else
30192  ac_cv_lib_posix_remove=no
30193fi
30194rm -f core conftest.err conftest.$ac_objext \
30195    conftest$ac_exeext conftest.$ac_ext
30196LIBS=$ac_check_lib_save_LIBS
30197fi
30198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30199$as_echo "$ac_cv_lib_posix_remove" >&6; }
30200if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30201  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30202fi
30203
30204    fi
30205
30206    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30207    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30208if test "x$ac_cv_func_shmat" = x""yes; then :
30209
30210fi
30211
30212    if test $ac_cv_func_shmat = no; then
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30214$as_echo_n "checking for shmat in -lipc... " >&6; }
30215if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30216  $as_echo_n "(cached) " >&6
30217else
30218  ac_check_lib_save_LIBS=$LIBS
30219LIBS="-lipc  $LIBS"
30220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30221/* end confdefs.h.  */
30222
30223/* Override any GCC internal prototype to avoid an error.
30224   Use char because int might match the return type of a GCC
30225   builtin and then its argument prototype would still apply.  */
30226#ifdef __cplusplus
30227extern "C"
30228#endif
30229char shmat ();
30230int
30231main ()
30232{
30233return shmat ();
30234  ;
30235  return 0;
30236}
30237_ACEOF
30238if ac_fn_cxx_try_link "$LINENO"; then :
30239  ac_cv_lib_ipc_shmat=yes
30240else
30241  ac_cv_lib_ipc_shmat=no
30242fi
30243rm -f core conftest.err conftest.$ac_objext \
30244    conftest$ac_exeext conftest.$ac_ext
30245LIBS=$ac_check_lib_save_LIBS
30246fi
30247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30248$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30249if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30250  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30251fi
30252
30253    fi
30254  fi
30255
30256  # Check for libraries that X11R6 Xt/Xaw programs need.
30257  ac_save_LDFLAGS=$LDFLAGS
30258  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30259  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30260  # check for ICE first), but we must link in the order -lSM -lICE or
30261  # we get undefined symbols.  So assume we have SM if we have ICE.
30262  # These have to be linked with before -lX11, unlike the other
30263  # libraries we check for below, so use a different variable.
30264  # John Interrante, Karl Berry
30265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30266$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30267if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30268  $as_echo_n "(cached) " >&6
30269else
30270  ac_check_lib_save_LIBS=$LIBS
30271LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30273/* end confdefs.h.  */
30274
30275/* Override any GCC internal prototype to avoid an error.
30276   Use char because int might match the return type of a GCC
30277   builtin and then its argument prototype would still apply.  */
30278#ifdef __cplusplus
30279extern "C"
30280#endif
30281char IceConnectionNumber ();
30282int
30283main ()
30284{
30285return IceConnectionNumber ();
30286  ;
30287  return 0;
30288}
30289_ACEOF
30290if ac_fn_cxx_try_link "$LINENO"; then :
30291  ac_cv_lib_ICE_IceConnectionNumber=yes
30292else
30293  ac_cv_lib_ICE_IceConnectionNumber=no
30294fi
30295rm -f core conftest.err conftest.$ac_objext \
30296    conftest$ac_exeext conftest.$ac_ext
30297LIBS=$ac_check_lib_save_LIBS
30298fi
30299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30300$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30301if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30302  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30303fi
30304
30305  LDFLAGS=$ac_save_LDFLAGS
30306
30307fi
30308
30309
30310# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30311# this doesn't make sense so we remove it.
30312if test "x$COMPILE_TYPE" = xcross; then
30313  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30314fi
30315
30316if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30317
30318    # Print a helpful message on how to acquire the necessary build dependency.
30319    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30320    MISSING_DEPENDENCY=x11
30321    PKGHANDLER_COMMAND=
30322
30323    case $PKGHANDLER in
30324	apt-get)
30325                apt_help     $MISSING_DEPENDENCY ;;
30326    yum)
30327                yum_help     $MISSING_DEPENDENCY ;;
30328	port)
30329                port_help    $MISSING_DEPENDENCY ;;
30330	pkgutil)
30331                pkgutil_help $MISSING_DEPENDENCY ;;
30332	pkgadd)
30333                pkgadd_help  $MISSING_DEPENDENCY ;;
30334    * )
30335      break ;;
30336    esac
30337
30338    if test "x$PKGHANDLER_COMMAND" != x; then
30339        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30340    fi
30341
30342    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30343fi
30344
30345# Some of the old makefiles require a setting of OPENWIN_HOME
30346# Since the X11R6 directory has disappeared on later Linuxes,
30347# we need to probe for it.
30348if test "x$OPENJDK_TARGET_OS" = xlinux; then
30349    if test -d "$SYS_ROOT/usr/X11R6"; then
30350        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30351    fi
30352    if test -d "$SYS_ROOT/usr/include/X11"; then
30353        OPENWIN_HOME="$SYS_ROOT/usr"
30354    fi
30355fi
30356if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30357    OPENWIN_HOME="/usr/openwin"
30358fi
30359
30360
30361
30362#
30363# Weird Sol10 something check...TODO change to try compile
30364#
30365if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30366  if test "`uname -r`" = "5.10"; then
30367     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30368     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30369     fi
30370  fi
30371fi
30372
30373ac_ext=c
30374ac_cpp='$CPP $CPPFLAGS'
30375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30377ac_compiler_gnu=$ac_cv_c_compiler_gnu
30378
30379OLD_CFLAGS="$CFLAGS"
30380CFLAGS="$CFLAGS $X_CFLAGS"
30381
30382# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30383for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30384do :
30385  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30386ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30387                   # include <X11/Xutil.h>
30388
30389"
30390if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30391  cat >>confdefs.h <<_ACEOF
30392#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30393_ACEOF
30394 X11_A_OK=yes
30395else
30396  X11_A_OK=no; break
30397fi
30398
30399done
30400
30401
30402CFLAGS="$OLD_CFLAGS"
30403ac_ext=cpp
30404ac_cpp='$CXXCPP $CPPFLAGS'
30405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30408
30409
30410if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30411
30412    # Print a helpful message on how to acquire the necessary build dependency.
30413    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30414    MISSING_DEPENDENCY=x11
30415    PKGHANDLER_COMMAND=
30416
30417    case $PKGHANDLER in
30418	apt-get)
30419                apt_help     $MISSING_DEPENDENCY ;;
30420    yum)
30421                yum_help     $MISSING_DEPENDENCY ;;
30422	port)
30423                port_help    $MISSING_DEPENDENCY ;;
30424	pkgutil)
30425                pkgutil_help $MISSING_DEPENDENCY ;;
30426	pkgadd)
30427                pkgadd_help  $MISSING_DEPENDENCY ;;
30428    * )
30429      break ;;
30430    esac
30431
30432    if test "x$PKGHANDLER_COMMAND" != x; then
30433        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30434    fi
30435
30436    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30437fi
30438
30439
30440
30441
30442
30443
30444###############################################################################
30445#
30446# The common unix printing system cups is used to print from java.
30447#
30448
30449# Check whether --with-cups was given.
30450if test "${with_cups+set}" = set; then :
30451  withval=$with_cups;
30452fi
30453
30454
30455# Check whether --with-cups-include was given.
30456if test "${with_cups_include+set}" = set; then :
30457  withval=$with_cups_include;
30458fi
30459
30460
30461if test "x$CUPS_NOT_NEEDED" = xyes; then
30462	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30463		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30464$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30465	fi
30466	CUPS_CFLAGS=
30467else
30468	CUPS_FOUND=no
30469
30470	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30471	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30472	fi
30473
30474	if test "x${with_cups}" != x; then
30475	    CUPS_CFLAGS="-I${with_cups}/include"
30476	    CUPS_FOUND=yes
30477	fi
30478	if test "x${with_cups_include}" != x; then
30479	    CUPS_CFLAGS="-I${with_cups_include}"
30480	    CUPS_FOUND=yes
30481	fi
30482	if test "x$CUPS_FOUND" = xno; then
30483
30484
30485    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30486        # Source the builddeps file again, to make sure it uses the latest variables!
30487        . $builddepsfile
30488        # Look for a target and build machine specific resource!
30489        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30490        if test "x$resource" = x; then
30491            # Ok, lets instead look for a target specific resource
30492            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30493        fi
30494        if test "x$resource" = x; then
30495            # Ok, lets instead look for a build specific resource
30496            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30497        fi
30498        if test "x$resource" = x; then
30499            # Ok, lets instead look for a generic resource
30500            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30501            resource=${builddep_cups}
30502        fi
30503        if test "x$resource" != x; then
30504            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30505$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30506	    # If the resource in the builddeps.conf file is an existing directory,
30507	    # for example /java/linux/cups
30508	    if test -d ${resource}; then
30509	       depdir=${resource}
30510	    else
30511
30512# cups is for example mymodule
30513# $resource is for example libs/general/libmymod_1_2_3.zip
30514# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30515# $with_builddeps_dir is for example /localhome/builddeps
30516# depdir is the name of the variable into which we store the depdir, eg MYMOD
30517# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30518# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30519    filename=`basename $resource`
30520    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30521    filebase=${filename%%.*}
30522    extension=${filename#*.}
30523    installdir=$with_builddeps_dir/$filebase
30524    if test ! -f $installdir/$filename.unpacked; then
30525        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30526$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30527        if test ! -d $installdir; then
30528            mkdir -p $installdir
30529        fi
30530        if test ! -d $installdir; then
30531            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30532        fi
30533        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30534        touch $tmpfile
30535        if test ! -f $tmpfile; then
30536            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30537        fi
30538
30539    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30540    # $tmpfile is the local file name for the downloaded file.
30541    VALID_TOOL=no
30542    if test "x$BDEPS_FTP" = xwget; then
30543       VALID_TOOL=yes
30544       wget -O $tmpfile $with_builddeps_server/$resource
30545    fi
30546    if test "x$BDEPS_FTP" = xlftp; then
30547       VALID_TOOL=yes
30548       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30549    fi
30550    if test "x$BDEPS_FTP" = xftp; then
30551        VALID_TOOL=yes
30552        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30553        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30554        FTPUSERPWD=${FTPSERVER%%@*}
30555        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30556            FTPUSER=${userpwd%%:*}
30557            FTPPWD=${userpwd#*@}
30558            FTPSERVER=${FTPSERVER#*@}
30559        else
30560            FTPUSER=ftp
30561            FTPPWD=ftp
30562        fi
30563        # the "pass" command does not work on some
30564        # ftp clients (read ftp.exe) but if it works,
30565        # passive mode is better!
30566        (\
30567            echo "user $FTPUSER $FTPPWD"        ;\
30568            echo "pass"                         ;\
30569            echo "bin"                          ;\
30570            echo "get $FTPPATH $tmpfile"              ;\
30571        ) | ftp -in $FTPSERVER
30572    fi
30573    if test "x$VALID_TOOL" != xyes; then
30574       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30575    fi
30576
30577        mv $tmpfile $installdir/$filename
30578        if test ! -s $installdir/$filename; then
30579            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30580        fi
30581        case "$extension" in
30582            zip)  echo "Unzipping $installdir/$filename..."
30583               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30584            ;;
30585            tar.gz) echo "Untaring $installdir/$filename..."
30586               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30587            ;;
30588            tgz) echo "Untaring $installdir/$filename..."
30589               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30590            ;;
30591            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30592            ;;
30593        esac
30594    fi
30595    if test -f $installdir/$filename.unpacked; then
30596        depdir=$installdir
30597    fi
30598
30599	    fi
30600            # Source the builddeps file again, because in the previous command, the depdir
30601            # was updated to point at the current build dependency install directory.
30602            . $builddepsfile
30603            # Now extract variables from the builddeps.conf files.
30604            theroot=${builddep_cups_ROOT}
30605            thecflags=${builddep_cups_CFLAGS}
30606            thelibs=${builddep_cups_LIBS}
30607            if test "x$depdir" = x; then
30608                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30609            fi
30610            CUPS=$depdir
30611            if test "x$theroot" != x; then
30612               CUPS="$theroot"
30613            fi
30614            if test "x$thecflags" != x; then
30615               CUPS_CFLAGS="$thecflags"
30616            fi
30617            if test "x$thelibs" != x; then
30618               CUPS_LIBS="$thelibs"
30619            fi
30620            CUPS_FOUND=yes
30621
30622        fi
30623
30624    fi
30625
30626	fi
30627	if test "x$CUPS_FOUND" = xno; then
30628	    # Are the cups headers installed in the default /usr/include location?
30629	    for ac_header in cups/cups.h cups/ppd.h
30630do :
30631  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30632ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30633if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30634  cat >>confdefs.h <<_ACEOF
30635#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30636_ACEOF
30637 CUPS_FOUND=yes
30638	                      CUPS_CFLAGS=
30639	                      DEFAULT_CUPS=yes
30640fi
30641
30642done
30643
30644	fi
30645	if test "x$CUPS_FOUND" = xno; then
30646	    # Getting nervous now? Lets poke around for standard Solaris third-party
30647	    # package installation locations.
30648	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30649$as_echo_n "checking for cups headers... " >&6; }
30650	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30651	       # An SFW package seems to be installed!
30652	       CUPS_FOUND=yes
30653	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30654	    elif test -s /opt/csw/include/cups/cups.h; then
30655	       # A CSW package seems to be installed!
30656	       CUPS_FOUND=yes
30657	       CUPS_CFLAGS="-I/opt/csw/include"
30658	    fi
30659	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30660$as_echo "$CUPS_FOUND" >&6; }
30661	fi
30662	if test "x$CUPS_FOUND" = xno; then
30663
30664    # Print a helpful message on how to acquire the necessary build dependency.
30665    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30666    MISSING_DEPENDENCY=cups
30667    PKGHANDLER_COMMAND=
30668
30669    case $PKGHANDLER in
30670	apt-get)
30671                apt_help     $MISSING_DEPENDENCY ;;
30672    yum)
30673                yum_help     $MISSING_DEPENDENCY ;;
30674	port)
30675                port_help    $MISSING_DEPENDENCY ;;
30676	pkgutil)
30677                pkgutil_help $MISSING_DEPENDENCY ;;
30678	pkgadd)
30679                pkgadd_help  $MISSING_DEPENDENCY ;;
30680    * )
30681      break ;;
30682    esac
30683
30684    if test "x$PKGHANDLER_COMMAND" != x; then
30685        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30686    fi
30687
30688	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30689	fi
30690fi
30691
30692
30693
30694
30695
30696
30697###############################################################################
30698#
30699# The ubiquitous freetype2 library is used to render fonts.
30700#
30701
30702# Check whether --with-freetype was given.
30703if test "${with_freetype+set}" = set; then :
30704  withval=$with_freetype;
30705fi
30706
30707
30708# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30709USING_SYSTEM_FT_LIB=false
30710
30711if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30712	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30713		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30714$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30715	fi
30716	FREETYPE2_CFLAGS=
30717	FREETYPE2_LIBS=
30718        FREETYPE2_LIB_PATH=
30719else
30720	FREETYPE2_FOUND=no
30721
30722	if test "x$with_freetype" != x; then
30723
30724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30725
30726  # Input might be given as Windows format, start by converting to
30727  # unix format.
30728  path="$with_freetype"
30729  new_path=`$CYGPATH -u "$path"`
30730
30731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30734  # "foo.exe" is OK but "foo" is an error.
30735  #
30736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30737  # It is also a way to make sure we got the proper file name for the real test later on.
30738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30739  if test "x$test_shortpath" = x; then
30740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30741$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30742    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30743  fi
30744
30745  # Call helper function which possibly converts this using DOS-style short mode.
30746  # If so, the updated path is stored in $new_path.
30747
30748  input_path="$new_path"
30749  # Check if we need to convert this using DOS-style short mode. If the path
30750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30751  # take no chances and rewrite it.
30752  # Note: m4 eats our [], so we need to use [ and ] instead.
30753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30754  if test "x$has_forbidden_chars" != x; then
30755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30759      # Going to short mode and back again did indeed matter. Since short mode is
30760      # case insensitive, let's make it lowercase to improve readability.
30761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30762      # Now convert it back to Unix-stile (cygpath)
30763      input_path=`$CYGPATH -u "$shortmode_path"`
30764      new_path="$input_path"
30765    fi
30766  fi
30767
30768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30769  if test "x$test_cygdrive_prefix" = x; then
30770    # As a simple fix, exclude /usr/bin since it's not a real path.
30771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30773      # a path prefixed by /cygdrive for fixpath to work.
30774      new_path="$CYGWIN_ROOT_PATH$input_path"
30775    fi
30776  fi
30777
30778
30779  if test "x$path" != "x$new_path"; then
30780    with_freetype="$new_path"
30781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30782$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30783  fi
30784
30785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30786
30787  path="$with_freetype"
30788  has_colon=`$ECHO $path | $GREP ^.:`
30789  new_path="$path"
30790  if test "x$has_colon" = x; then
30791    # Not in mixed or Windows style, start by that.
30792    new_path=`cmd //c echo $path`
30793  fi
30794
30795
30796  input_path="$new_path"
30797  # Check if we need to convert this using DOS-style short mode. If the path
30798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30799  # take no chances and rewrite it.
30800  # Note: m4 eats our [], so we need to use [ and ] instead.
30801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30802  if test "x$has_forbidden_chars" != x; then
30803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30805  fi
30806
30807
30808  windows_path="$new_path"
30809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30810    unix_path=`$CYGPATH -u "$windows_path"`
30811    new_path="$unix_path"
30812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30814    new_path="$unix_path"
30815  fi
30816
30817  if test "x$path" != "x$new_path"; then
30818    with_freetype="$new_path"
30819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30820$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30821  fi
30822
30823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30825
30826  else
30827    # We're on a posix platform. Hooray! :)
30828    path="$with_freetype"
30829
30830    if test ! -f "$path" && test ! -d "$path"; then
30831      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30832    fi
30833
30834    has_space=`$ECHO "$path" | $GREP " "`
30835    if test "x$has_space" != x; then
30836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30837$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30838      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30839    fi
30840  fi
30841
30842	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30843            FREETYPE2_LIB_PATH="$with_freetype/lib"
30844            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30845                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30846                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30847            fi
30848            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30849                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30850            fi
30851	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30852            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30853                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30854            fi
30855 	    FREETYPE2_FOUND=yes
30856   	    if test "x$FREETYPE2_FOUND" = xyes; then
30857	        # Verify that the directories exist
30858                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30859		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30860		fi
30861	        # List the contents of the lib.
30862		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30863                if test "x$FREETYPELIB" = x; then
30864		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30865		fi
30866	        # Check one h-file
30867                if ! test -s "$with_freetype/include/ft2build.h"; then
30868		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30869		fi
30870            fi
30871        fi
30872	if test "x$FREETYPE2_FOUND" = xno; then
30873
30874
30875    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30876        # Source the builddeps file again, to make sure it uses the latest variables!
30877        . $builddepsfile
30878        # Look for a target and build machine specific resource!
30879        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30880        if test "x$resource" = x; then
30881            # Ok, lets instead look for a target specific resource
30882            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30883        fi
30884        if test "x$resource" = x; then
30885            # Ok, lets instead look for a build specific resource
30886            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30887        fi
30888        if test "x$resource" = x; then
30889            # Ok, lets instead look for a generic resource
30890            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30891            resource=${builddep_freetype2}
30892        fi
30893        if test "x$resource" != x; then
30894            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30895$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30896	    # If the resource in the builddeps.conf file is an existing directory,
30897	    # for example /java/linux/cups
30898	    if test -d ${resource}; then
30899	       depdir=${resource}
30900	    else
30901
30902# freetype2 is for example mymodule
30903# $resource is for example libs/general/libmymod_1_2_3.zip
30904# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30905# $with_builddeps_dir is for example /localhome/builddeps
30906# depdir is the name of the variable into which we store the depdir, eg MYMOD
30907# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30908# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30909    filename=`basename $resource`
30910    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30911    filebase=${filename%%.*}
30912    extension=${filename#*.}
30913    installdir=$with_builddeps_dir/$filebase
30914    if test ! -f $installdir/$filename.unpacked; then
30915        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30916$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30917        if test ! -d $installdir; then
30918            mkdir -p $installdir
30919        fi
30920        if test ! -d $installdir; then
30921            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30922        fi
30923        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30924        touch $tmpfile
30925        if test ! -f $tmpfile; then
30926            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30927        fi
30928
30929    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30930    # $tmpfile is the local file name for the downloaded file.
30931    VALID_TOOL=no
30932    if test "x$BDEPS_FTP" = xwget; then
30933       VALID_TOOL=yes
30934       wget -O $tmpfile $with_builddeps_server/$resource
30935    fi
30936    if test "x$BDEPS_FTP" = xlftp; then
30937       VALID_TOOL=yes
30938       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30939    fi
30940    if test "x$BDEPS_FTP" = xftp; then
30941        VALID_TOOL=yes
30942        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30943        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30944        FTPUSERPWD=${FTPSERVER%%@*}
30945        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30946            FTPUSER=${userpwd%%:*}
30947            FTPPWD=${userpwd#*@}
30948            FTPSERVER=${FTPSERVER#*@}
30949        else
30950            FTPUSER=ftp
30951            FTPPWD=ftp
30952        fi
30953        # the "pass" command does not work on some
30954        # ftp clients (read ftp.exe) but if it works,
30955        # passive mode is better!
30956        (\
30957            echo "user $FTPUSER $FTPPWD"        ;\
30958            echo "pass"                         ;\
30959            echo "bin"                          ;\
30960            echo "get $FTPPATH $tmpfile"              ;\
30961        ) | ftp -in $FTPSERVER
30962    fi
30963    if test "x$VALID_TOOL" != xyes; then
30964       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30965    fi
30966
30967        mv $tmpfile $installdir/$filename
30968        if test ! -s $installdir/$filename; then
30969            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30970        fi
30971        case "$extension" in
30972            zip)  echo "Unzipping $installdir/$filename..."
30973               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30974            ;;
30975            tar.gz) echo "Untaring $installdir/$filename..."
30976               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30977            ;;
30978            tgz) echo "Untaring $installdir/$filename..."
30979               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30980            ;;
30981            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30982            ;;
30983        esac
30984    fi
30985    if test -f $installdir/$filename.unpacked; then
30986        depdir=$installdir
30987    fi
30988
30989	    fi
30990            # Source the builddeps file again, because in the previous command, the depdir
30991            # was updated to point at the current build dependency install directory.
30992            . $builddepsfile
30993            # Now extract variables from the builddeps.conf files.
30994            theroot=${builddep_freetype2_ROOT}
30995            thecflags=${builddep_freetype2_CFLAGS}
30996            thelibs=${builddep_freetype2_LIBS}
30997            if test "x$depdir" = x; then
30998                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30999            fi
31000            FREETYPE2=$depdir
31001            if test "x$theroot" != x; then
31002               FREETYPE2="$theroot"
31003            fi
31004            if test "x$thecflags" != x; then
31005               FREETYPE2_CFLAGS="$thecflags"
31006            fi
31007            if test "x$thelibs" != x; then
31008               FREETYPE2_LIBS="$thelibs"
31009            fi
31010            FREETYPE2_FOUND=yes
31011            else FREETYPE2_FOUND=no
31012
31013        fi
31014        else FREETYPE2_FOUND=no
31015
31016    fi
31017
31018            USING_SYSTEM_FT_LIB=true
31019	fi
31020	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31021            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31022
31023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31024
31025  # Input might be given as Windows format, start by converting to
31026  # unix format.
31027  path="$FREETYPELOCATION"
31028  new_path=`$CYGPATH -u "$path"`
31029
31030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31033  # "foo.exe" is OK but "foo" is an error.
31034  #
31035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31036  # It is also a way to make sure we got the proper file name for the real test later on.
31037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31038  if test "x$test_shortpath" = x; then
31039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31040$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31041    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31042  fi
31043
31044  # Call helper function which possibly converts this using DOS-style short mode.
31045  # If so, the updated path is stored in $new_path.
31046
31047  input_path="$new_path"
31048  # Check if we need to convert this using DOS-style short mode. If the path
31049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31050  # take no chances and rewrite it.
31051  # Note: m4 eats our [], so we need to use [ and ] instead.
31052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31053  if test "x$has_forbidden_chars" != x; then
31054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31058      # Going to short mode and back again did indeed matter. Since short mode is
31059      # case insensitive, let's make it lowercase to improve readability.
31060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31061      # Now convert it back to Unix-stile (cygpath)
31062      input_path=`$CYGPATH -u "$shortmode_path"`
31063      new_path="$input_path"
31064    fi
31065  fi
31066
31067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31068  if test "x$test_cygdrive_prefix" = x; then
31069    # As a simple fix, exclude /usr/bin since it's not a real path.
31070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31072      # a path prefixed by /cygdrive for fixpath to work.
31073      new_path="$CYGWIN_ROOT_PATH$input_path"
31074    fi
31075  fi
31076
31077
31078  if test "x$path" != "x$new_path"; then
31079    FREETYPELOCATION="$new_path"
31080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31081$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31082  fi
31083
31084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31085
31086  path="$FREETYPELOCATION"
31087  has_colon=`$ECHO $path | $GREP ^.:`
31088  new_path="$path"
31089  if test "x$has_colon" = x; then
31090    # Not in mixed or Windows style, start by that.
31091    new_path=`cmd //c echo $path`
31092  fi
31093
31094
31095  input_path="$new_path"
31096  # Check if we need to convert this using DOS-style short mode. If the path
31097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31098  # take no chances and rewrite it.
31099  # Note: m4 eats our [], so we need to use [ and ] instead.
31100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31101  if test "x$has_forbidden_chars" != x; then
31102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31104  fi
31105
31106
31107  windows_path="$new_path"
31108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31109    unix_path=`$CYGPATH -u "$windows_path"`
31110    new_path="$unix_path"
31111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31113    new_path="$unix_path"
31114  fi
31115
31116  if test "x$path" != "x$new_path"; then
31117    FREETYPELOCATION="$new_path"
31118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31119$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31120  fi
31121
31122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31124
31125  else
31126    # We're on a posix platform. Hooray! :)
31127    path="$FREETYPELOCATION"
31128
31129    if test ! -f "$path" && test ! -d "$path"; then
31130      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31131    fi
31132
31133    has_space=`$ECHO "$path" | $GREP " "`
31134    if test "x$has_space" != x; then
31135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31136$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31137      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31138    fi
31139  fi
31140
31141	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31142$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31143	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31144	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31145	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31146 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31147                if ! test -s "$FREETYPE2_LIBS"; then
31148		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31149		fi
31150                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31151		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31152		fi
31153                USING_SYSTEM_FT_LIB=true
31154                FREETYPE2_FOUND=yes
31155	    fi
31156	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31157$as_echo "$FREETYPE2_FOUND" >&6; }
31158        fi
31159	if test "x$FREETYPE2_FOUND" = xno; then
31160
31161pkg_failed=no
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31163$as_echo_n "checking for FREETYPE2... " >&6; }
31164
31165if test -n "$FREETYPE2_CFLAGS"; then
31166    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31167 elif test -n "$PKG_CONFIG"; then
31168    if test -n "$PKG_CONFIG" && \
31169    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31170  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31171  ac_status=$?
31172  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31173  test $ac_status = 0; }; then
31174  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31175else
31176  pkg_failed=yes
31177fi
31178 else
31179    pkg_failed=untried
31180fi
31181if test -n "$FREETYPE2_LIBS"; then
31182    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31183 elif test -n "$PKG_CONFIG"; then
31184    if test -n "$PKG_CONFIG" && \
31185    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31186  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31187  ac_status=$?
31188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31189  test $ac_status = 0; }; then
31190  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31191else
31192  pkg_failed=yes
31193fi
31194 else
31195    pkg_failed=untried
31196fi
31197
31198
31199
31200if test $pkg_failed = yes; then
31201
31202if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31203        _pkg_short_errors_supported=yes
31204else
31205        _pkg_short_errors_supported=no
31206fi
31207        if test $_pkg_short_errors_supported = yes; then
31208	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31209        else
31210	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31211        fi
31212	# Put the nasty error message in config.log where it belongs
31213	echo "$FREETYPE2_PKG_ERRORS" >&5
31214
31215	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31216$as_echo "no" >&6; }
31217                FREETYPE2_FOUND=no
31218elif test $pkg_failed = untried; then
31219	FREETYPE2_FOUND=no
31220else
31221	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31222	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31224$as_echo "yes" >&6; }
31225	FREETYPE2_FOUND=yes
31226fi
31227            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31228            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31229            USING_SYSTEM_FT_LIB=true
31230            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31231            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31232              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31233            fi
31234	fi
31235	if test "x$FREETYPE2_FOUND" = xno; then
31236	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31237$as_echo_n "checking for freetype in some standard locations... " >&6; }
31238
31239	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31240	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31241	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31242	    fi
31243	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31244	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31245	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31246	    fi
31247
31248	    PREV_CXXCFLAGS="$CXXFLAGS"
31249	    PREV_LDFLAGS="$LDFLAGS"
31250	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31251	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31252	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31253/* end confdefs.h.  */
31254#include<ft2build.h>
31255	                    #include FT_FREETYPE_H
31256	                   int main() { return 0; }
31257
31258_ACEOF
31259if ac_fn_cxx_try_link "$LINENO"; then :
31260
31261	                      # Yes, the default cflags and libs did the trick.
31262	                      FREETYPE2_FOUND=yes
31263	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31264	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31265
31266else
31267
31268	                      FREETYPE2_FOUND=no
31269
31270fi
31271rm -f core conftest.err conftest.$ac_objext \
31272    conftest$ac_exeext conftest.$ac_ext
31273            CXXCFLAGS="$PREV_CXXFLAGS"
31274	    LDFLAGS="$PREV_LDFLAGS"
31275	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31276$as_echo "$FREETYPE2_FOUND" >&6; }
31277            USING_SYSTEM_FT_LIB=true
31278	fi
31279	if test "x$FREETYPE2_FOUND" = xno; then
31280
31281    # Print a helpful message on how to acquire the necessary build dependency.
31282    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31283    MISSING_DEPENDENCY=freetype2
31284    PKGHANDLER_COMMAND=
31285
31286    case $PKGHANDLER in
31287	apt-get)
31288                apt_help     $MISSING_DEPENDENCY ;;
31289    yum)
31290                yum_help     $MISSING_DEPENDENCY ;;
31291	port)
31292                port_help    $MISSING_DEPENDENCY ;;
31293	pkgutil)
31294                pkgutil_help $MISSING_DEPENDENCY ;;
31295	pkgadd)
31296                pkgadd_help  $MISSING_DEPENDENCY ;;
31297    * )
31298      break ;;
31299    esac
31300
31301    if test "x$PKGHANDLER_COMMAND" != x; then
31302        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31303    fi
31304
31305		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31306	fi
31307
31308        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31309            # AC_CHECK_LIB does not support use of cl.exe
31310            PREV_LDFLAGS="$LDFLAGS"
31311            LDFLAGS="$FREETYPE2_LIBS"
31312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31313$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31314if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31315  $as_echo_n "(cached) " >&6
31316else
31317  ac_check_lib_save_LIBS=$LIBS
31318LIBS="-lfreetype  $LIBS"
31319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31320/* end confdefs.h.  */
31321
31322/* Override any GCC internal prototype to avoid an error.
31323   Use char because int might match the return type of a GCC
31324   builtin and then its argument prototype would still apply.  */
31325#ifdef __cplusplus
31326extern "C"
31327#endif
31328char FT_Init_FreeType ();
31329int
31330main ()
31331{
31332return FT_Init_FreeType ();
31333  ;
31334  return 0;
31335}
31336_ACEOF
31337if ac_fn_cxx_try_link "$LINENO"; then :
31338  ac_cv_lib_freetype_FT_Init_FreeType=yes
31339else
31340  ac_cv_lib_freetype_FT_Init_FreeType=no
31341fi
31342rm -f core conftest.err conftest.$ac_objext \
31343    conftest$ac_exeext conftest.$ac_ext
31344LIBS=$ac_check_lib_save_LIBS
31345fi
31346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31347$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31348if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31349  FREETYPE2_FOUND=true
31350else
31351  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31352fi
31353
31354            LDFLAGS="$PREV_LDFLAGS"
31355        fi
31356fi
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366###############################################################################
31367#
31368# Check for alsa headers and libraries. Used on Linux/GNU systems.
31369#
31370
31371# Check whether --with-alsa was given.
31372if test "${with_alsa+set}" = set; then :
31373  withval=$with_alsa;
31374fi
31375
31376
31377# Check whether --with-alsa-include was given.
31378if test "${with_alsa_include+set}" = set; then :
31379  withval=$with_alsa_include;
31380fi
31381
31382
31383# Check whether --with-alsa-lib was given.
31384if test "${with_alsa_lib+set}" = set; then :
31385  withval=$with_alsa_lib;
31386fi
31387
31388
31389if test "x$ALSA_NOT_NEEDED" = xyes; then
31390	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31391		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31392$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31393	fi
31394	ALSA_CFLAGS=
31395	ALSA_LIBS=
31396else
31397	ALSA_FOUND=no
31398
31399	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31400	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31401	fi
31402
31403	if test "x${with_alsa}" != x; then
31404	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31405	    ALSA_CFLAGS="-I${with_alsa}/include"
31406	    ALSA_FOUND=yes
31407	fi
31408	if test "x${with_alsa_include}" != x; then
31409	    ALSA_CFLAGS="-I${with_alsa_include}"
31410	    ALSA_FOUND=yes
31411	fi
31412	if test "x${with_alsa_lib}" != x; then
31413	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31414	    ALSA_FOUND=yes
31415	fi
31416	if test "x$ALSA_FOUND" = xno; then
31417
31418
31419    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31420        # Source the builddeps file again, to make sure it uses the latest variables!
31421        . $builddepsfile
31422        # Look for a target and build machine specific resource!
31423        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31424        if test "x$resource" = x; then
31425            # Ok, lets instead look for a target specific resource
31426            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31427        fi
31428        if test "x$resource" = x; then
31429            # Ok, lets instead look for a build specific resource
31430            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31431        fi
31432        if test "x$resource" = x; then
31433            # Ok, lets instead look for a generic resource
31434            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31435            resource=${builddep_alsa}
31436        fi
31437        if test "x$resource" != x; then
31438            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31439$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31440	    # If the resource in the builddeps.conf file is an existing directory,
31441	    # for example /java/linux/cups
31442	    if test -d ${resource}; then
31443	       depdir=${resource}
31444	    else
31445
31446# alsa is for example mymodule
31447# $resource is for example libs/general/libmymod_1_2_3.zip
31448# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31449# $with_builddeps_dir is for example /localhome/builddeps
31450# depdir is the name of the variable into which we store the depdir, eg MYMOD
31451# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31452# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31453    filename=`basename $resource`
31454    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31455    filebase=${filename%%.*}
31456    extension=${filename#*.}
31457    installdir=$with_builddeps_dir/$filebase
31458    if test ! -f $installdir/$filename.unpacked; then
31459        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31460$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31461        if test ! -d $installdir; then
31462            mkdir -p $installdir
31463        fi
31464        if test ! -d $installdir; then
31465            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31466        fi
31467        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31468        touch $tmpfile
31469        if test ! -f $tmpfile; then
31470            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31471        fi
31472
31473    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31474    # $tmpfile is the local file name for the downloaded file.
31475    VALID_TOOL=no
31476    if test "x$BDEPS_FTP" = xwget; then
31477       VALID_TOOL=yes
31478       wget -O $tmpfile $with_builddeps_server/$resource
31479    fi
31480    if test "x$BDEPS_FTP" = xlftp; then
31481       VALID_TOOL=yes
31482       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31483    fi
31484    if test "x$BDEPS_FTP" = xftp; then
31485        VALID_TOOL=yes
31486        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31487        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31488        FTPUSERPWD=${FTPSERVER%%@*}
31489        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31490            FTPUSER=${userpwd%%:*}
31491            FTPPWD=${userpwd#*@}
31492            FTPSERVER=${FTPSERVER#*@}
31493        else
31494            FTPUSER=ftp
31495            FTPPWD=ftp
31496        fi
31497        # the "pass" command does not work on some
31498        # ftp clients (read ftp.exe) but if it works,
31499        # passive mode is better!
31500        (\
31501            echo "user $FTPUSER $FTPPWD"        ;\
31502            echo "pass"                         ;\
31503            echo "bin"                          ;\
31504            echo "get $FTPPATH $tmpfile"              ;\
31505        ) | ftp -in $FTPSERVER
31506    fi
31507    if test "x$VALID_TOOL" != xyes; then
31508       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31509    fi
31510
31511        mv $tmpfile $installdir/$filename
31512        if test ! -s $installdir/$filename; then
31513            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31514        fi
31515        case "$extension" in
31516            zip)  echo "Unzipping $installdir/$filename..."
31517               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31518            ;;
31519            tar.gz) echo "Untaring $installdir/$filename..."
31520               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31521            ;;
31522            tgz) echo "Untaring $installdir/$filename..."
31523               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31524            ;;
31525            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31526            ;;
31527        esac
31528    fi
31529    if test -f $installdir/$filename.unpacked; then
31530        depdir=$installdir
31531    fi
31532
31533	    fi
31534            # Source the builddeps file again, because in the previous command, the depdir
31535            # was updated to point at the current build dependency install directory.
31536            . $builddepsfile
31537            # Now extract variables from the builddeps.conf files.
31538            theroot=${builddep_alsa_ROOT}
31539            thecflags=${builddep_alsa_CFLAGS}
31540            thelibs=${builddep_alsa_LIBS}
31541            if test "x$depdir" = x; then
31542                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31543            fi
31544            ALSA=$depdir
31545            if test "x$theroot" != x; then
31546               ALSA="$theroot"
31547            fi
31548            if test "x$thecflags" != x; then
31549               ALSA_CFLAGS="$thecflags"
31550            fi
31551            if test "x$thelibs" != x; then
31552               ALSA_LIBS="$thelibs"
31553            fi
31554            ALSA_FOUND=yes
31555            else ALSA_FOUND=no
31556
31557        fi
31558        else ALSA_FOUND=no
31559
31560    fi
31561
31562	fi
31563	if test "x$ALSA_FOUND" = xno; then
31564
31565pkg_failed=no
31566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31567$as_echo_n "checking for ALSA... " >&6; }
31568
31569if test -n "$ALSA_CFLAGS"; then
31570    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31571 elif test -n "$PKG_CONFIG"; then
31572    if test -n "$PKG_CONFIG" && \
31573    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31574  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31575  ac_status=$?
31576  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31577  test $ac_status = 0; }; then
31578  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31579else
31580  pkg_failed=yes
31581fi
31582 else
31583    pkg_failed=untried
31584fi
31585if test -n "$ALSA_LIBS"; then
31586    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31587 elif test -n "$PKG_CONFIG"; then
31588    if test -n "$PKG_CONFIG" && \
31589    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31590  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31591  ac_status=$?
31592  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31593  test $ac_status = 0; }; then
31594  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31595else
31596  pkg_failed=yes
31597fi
31598 else
31599    pkg_failed=untried
31600fi
31601
31602
31603
31604if test $pkg_failed = yes; then
31605
31606if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31607        _pkg_short_errors_supported=yes
31608else
31609        _pkg_short_errors_supported=no
31610fi
31611        if test $_pkg_short_errors_supported = yes; then
31612	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31613        else
31614	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31615        fi
31616	# Put the nasty error message in config.log where it belongs
31617	echo "$ALSA_PKG_ERRORS" >&5
31618
31619	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31620$as_echo "no" >&6; }
31621                ALSA_FOUND=no
31622elif test $pkg_failed = untried; then
31623	ALSA_FOUND=no
31624else
31625	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31626	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31628$as_echo "yes" >&6; }
31629	ALSA_FOUND=yes
31630fi
31631	fi
31632	if test "x$ALSA_FOUND" = xno; then
31633	    for ac_header in alsa/asoundlib.h
31634do :
31635  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31636if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31637  cat >>confdefs.h <<_ACEOF
31638#define HAVE_ALSA_ASOUNDLIB_H 1
31639_ACEOF
31640 ALSA_FOUND=yes
31641	                      ALSA_CFLAGS=-Iignoreme
31642	                      ALSA_LIBS=-lasound
31643	                      DEFAULT_ALSA=yes
31644else
31645  ALSA_FOUND=no
31646fi
31647
31648done
31649
31650	fi
31651	if test "x$ALSA_FOUND" = xno; then
31652
31653    # Print a helpful message on how to acquire the necessary build dependency.
31654    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31655    MISSING_DEPENDENCY=alsa
31656    PKGHANDLER_COMMAND=
31657
31658    case $PKGHANDLER in
31659	apt-get)
31660                apt_help     $MISSING_DEPENDENCY ;;
31661    yum)
31662                yum_help     $MISSING_DEPENDENCY ;;
31663	port)
31664                port_help    $MISSING_DEPENDENCY ;;
31665	pkgutil)
31666                pkgutil_help $MISSING_DEPENDENCY ;;
31667	pkgadd)
31668                pkgadd_help  $MISSING_DEPENDENCY ;;
31669    * )
31670      break ;;
31671    esac
31672
31673    if test "x$PKGHANDLER_COMMAND" != x; then
31674        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31675    fi
31676
31677	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31678	fi
31679fi
31680
31681
31682
31683
31684
31685
31686
31687###############################################################################
31688#
31689# Check for the jpeg library
31690#
31691
31692USE_EXTERNAL_LIBJPEG=true
31693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31694$as_echo_n "checking for main in -ljpeg... " >&6; }
31695if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31696  $as_echo_n "(cached) " >&6
31697else
31698  ac_check_lib_save_LIBS=$LIBS
31699LIBS="-ljpeg  $LIBS"
31700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31701/* end confdefs.h.  */
31702
31703
31704int
31705main ()
31706{
31707return main ();
31708  ;
31709  return 0;
31710}
31711_ACEOF
31712if ac_fn_cxx_try_link "$LINENO"; then :
31713  ac_cv_lib_jpeg_main=yes
31714else
31715  ac_cv_lib_jpeg_main=no
31716fi
31717rm -f core conftest.err conftest.$ac_objext \
31718    conftest$ac_exeext conftest.$ac_ext
31719LIBS=$ac_check_lib_save_LIBS
31720fi
31721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31722$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31723if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31724  cat >>confdefs.h <<_ACEOF
31725#define HAVE_LIBJPEG 1
31726_ACEOF
31727
31728  LIBS="-ljpeg $LIBS"
31729
31730else
31731   USE_EXTERNAL_LIBJPEG=false
31732               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31733$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31734
31735fi
31736
31737
31738
31739###############################################################################
31740#
31741# Check for the gif library
31742#
31743
31744
31745# Check whether --with-giflib was given.
31746if test "${with_giflib+set}" = set; then :
31747  withval=$with_giflib;
31748fi
31749
31750
31751
31752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31753$as_echo_n "checking for which giflib to use... " >&6; }
31754
31755# default is bundled
31756DEFAULT_GIFLIB=bundled
31757
31758#
31759# if user didn't specify, use DEFAULT_GIFLIB
31760#
31761if test "x${with_giflib}" = "x"; then
31762    with_giflib=${DEFAULT_GIFLIB}
31763fi
31764
31765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31766$as_echo "${with_giflib}" >&6; }
31767
31768if test "x${with_giflib}" = "xbundled"; then
31769    USE_EXTERNAL_LIBGIF=false
31770elif test "x${with_giflib}" = "xsystem"; then
31771    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31772if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31773
31774else
31775   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31776fi
31777
31778
31779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31780$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31781if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31782  $as_echo_n "(cached) " >&6
31783else
31784  ac_check_lib_save_LIBS=$LIBS
31785LIBS="-lgif  $LIBS"
31786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31787/* end confdefs.h.  */
31788
31789/* Override any GCC internal prototype to avoid an error.
31790   Use char because int might match the return type of a GCC
31791   builtin and then its argument prototype would still apply.  */
31792#ifdef __cplusplus
31793extern "C"
31794#endif
31795char DGifGetCode ();
31796int
31797main ()
31798{
31799return DGifGetCode ();
31800  ;
31801  return 0;
31802}
31803_ACEOF
31804if ac_fn_cxx_try_link "$LINENO"; then :
31805  ac_cv_lib_gif_DGifGetCode=yes
31806else
31807  ac_cv_lib_gif_DGifGetCode=no
31808fi
31809rm -f core conftest.err conftest.$ac_objext \
31810    conftest$ac_exeext conftest.$ac_ext
31811LIBS=$ac_check_lib_save_LIBS
31812fi
31813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31814$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31815if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
31816  cat >>confdefs.h <<_ACEOF
31817#define HAVE_LIBGIF 1
31818_ACEOF
31819
31820  LIBS="-lgif $LIBS"
31821
31822else
31823   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31824fi
31825
31826
31827    USE_EXTERNAL_LIBGIF=true
31828else
31829    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31830fi
31831
31832
31833###############################################################################
31834#
31835# Check for the zlib library
31836#
31837
31838
31839# Check whether --with-zlib was given.
31840if test "${with_zlib+set}" = set; then :
31841  withval=$with_zlib;
31842fi
31843
31844
31845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31846$as_echo_n "checking for compress in -lz... " >&6; }
31847if test "${ac_cv_lib_z_compress+set}" = set; then :
31848  $as_echo_n "(cached) " >&6
31849else
31850  ac_check_lib_save_LIBS=$LIBS
31851LIBS="-lz  $LIBS"
31852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31853/* end confdefs.h.  */
31854
31855/* Override any GCC internal prototype to avoid an error.
31856   Use char because int might match the return type of a GCC
31857   builtin and then its argument prototype would still apply.  */
31858#ifdef __cplusplus
31859extern "C"
31860#endif
31861char compress ();
31862int
31863main ()
31864{
31865return compress ();
31866  ;
31867  return 0;
31868}
31869_ACEOF
31870if ac_fn_cxx_try_link "$LINENO"; then :
31871  ac_cv_lib_z_compress=yes
31872else
31873  ac_cv_lib_z_compress=no
31874fi
31875rm -f core conftest.err conftest.$ac_objext \
31876    conftest$ac_exeext conftest.$ac_ext
31877LIBS=$ac_check_lib_save_LIBS
31878fi
31879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31880$as_echo "$ac_cv_lib_z_compress" >&6; }
31881if test "x$ac_cv_lib_z_compress" = x""yes; then :
31882   ZLIB_FOUND=yes
31883else
31884   ZLIB_FOUND=no
31885fi
31886
31887
31888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31889$as_echo_n "checking for which zlib to use... " >&6; }
31890
31891DEFAULT_ZLIB=bundled
31892if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31893#
31894# On macosx default is system...on others default is
31895#
31896    DEFAULT_ZLIB=system
31897fi
31898
31899if test "x${ZLIB_FOUND}" != "xyes"; then
31900#
31901# If we don't find any system...set default to bundled
31902#
31903    DEFAULT_ZLIB=bundled
31904fi
31905
31906#
31907# If user didn't specify, use DEFAULT_ZLIB
31908#
31909if test "x${with_zlib}" = "x"; then
31910    with_zlib=${DEFAULT_ZLIB}
31911fi
31912
31913if test "x${with_zlib}" = "xbundled"; then
31914    USE_EXTERNAL_LIBZ=false
31915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31916$as_echo "bundled" >&6; }
31917elif test "x${with_zlib}" = "xsystem"; then
31918    if test "x${ZLIB_FOUND}" = "xyes"; then
31919        USE_EXTERNAL_LIBZ=true
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31921$as_echo "system" >&6; }
31922    else
31923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31924$as_echo "system not found" >&6; }
31925        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31926    fi
31927else
31928    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31929fi
31930
31931
31932
31933###############################################################################
31934LIBZIP_CAN_USE_MMAP=true
31935
31936
31937
31938###############################################################################
31939#
31940# Check if altzone exists in time.h
31941#
31942
31943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31944/* end confdefs.h.  */
31945#include <time.h>
31946int
31947main ()
31948{
31949return (int)altzone;
31950  ;
31951  return 0;
31952}
31953_ACEOF
31954if ac_fn_cxx_try_link "$LINENO"; then :
31955  has_altzone=yes
31956else
31957  has_altzone=no
31958fi
31959rm -f core conftest.err conftest.$ac_objext \
31960    conftest$ac_exeext conftest.$ac_ext
31961if test "x$has_altzone" = xyes; then
31962
31963$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31964
31965fi
31966
31967###############################################################################
31968#
31969# Check the maths library
31970#
31971
31972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31973$as_echo_n "checking for cos in -lm... " >&6; }
31974if test "${ac_cv_lib_m_cos+set}" = set; then :
31975  $as_echo_n "(cached) " >&6
31976else
31977  ac_check_lib_save_LIBS=$LIBS
31978LIBS="-lm  $LIBS"
31979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31980/* end confdefs.h.  */
31981
31982/* Override any GCC internal prototype to avoid an error.
31983   Use char because int might match the return type of a GCC
31984   builtin and then its argument prototype would still apply.  */
31985#ifdef __cplusplus
31986extern "C"
31987#endif
31988char cos ();
31989int
31990main ()
31991{
31992return cos ();
31993  ;
31994  return 0;
31995}
31996_ACEOF
31997if ac_fn_cxx_try_link "$LINENO"; then :
31998  ac_cv_lib_m_cos=yes
31999else
32000  ac_cv_lib_m_cos=no
32001fi
32002rm -f core conftest.err conftest.$ac_objext \
32003    conftest$ac_exeext conftest.$ac_ext
32004LIBS=$ac_check_lib_save_LIBS
32005fi
32006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32007$as_echo "$ac_cv_lib_m_cos" >&6; }
32008if test "x$ac_cv_lib_m_cos" = x""yes; then :
32009  cat >>confdefs.h <<_ACEOF
32010#define HAVE_LIBM 1
32011_ACEOF
32012
32013  LIBS="-lm $LIBS"
32014
32015else
32016
32017                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32018$as_echo "$as_me: Maths library was not found" >&6;}
32019
32020fi
32021
32022
32023
32024###############################################################################
32025#
32026# Check for libdl.so
32027
32028save_LIBS="$LIBS"
32029LIBS=""
32030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32031$as_echo_n "checking for dlopen in -ldl... " >&6; }
32032if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32033  $as_echo_n "(cached) " >&6
32034else
32035  ac_check_lib_save_LIBS=$LIBS
32036LIBS="-ldl  $LIBS"
32037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32038/* end confdefs.h.  */
32039
32040/* Override any GCC internal prototype to avoid an error.
32041   Use char because int might match the return type of a GCC
32042   builtin and then its argument prototype would still apply.  */
32043#ifdef __cplusplus
32044extern "C"
32045#endif
32046char dlopen ();
32047int
32048main ()
32049{
32050return dlopen ();
32051  ;
32052  return 0;
32053}
32054_ACEOF
32055if ac_fn_cxx_try_link "$LINENO"; then :
32056  ac_cv_lib_dl_dlopen=yes
32057else
32058  ac_cv_lib_dl_dlopen=no
32059fi
32060rm -f core conftest.err conftest.$ac_objext \
32061    conftest$ac_exeext conftest.$ac_ext
32062LIBS=$ac_check_lib_save_LIBS
32063fi
32064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32065$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32066if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32067  cat >>confdefs.h <<_ACEOF
32068#define HAVE_LIBDL 1
32069_ACEOF
32070
32071  LIBS="-ldl $LIBS"
32072
32073fi
32074
32075LIBDL="$LIBS"
32076
32077LIBS="$save_LIBS"
32078
32079
32080
32081###############################################################################
32082#
32083# statically link libstdc++ before C++ ABI is stablized on Linux unless
32084# dynamic build is configured on command line.
32085#
32086
32087# Check whether --with-stdc++lib was given.
32088if test "${with_stdc__lib+set}" = set; then :
32089  withval=$with_stdc__lib;
32090    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32091        && test "x$with_stdc__lib" != xdefault; then
32092      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32093    fi
32094
32095else
32096  with_stdc__lib=default
32097
32098fi
32099
32100
32101if test "x$OPENJDK_TARGET_OS" = xlinux; then
32102    # Test if -lstdc++ works.
32103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32104$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32105    ac_ext=cpp
32106ac_cpp='$CXXCPP $CPPFLAGS'
32107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32110
32111    OLD_CXXFLAGS="$CXXFLAGS"
32112    CXXFLAGS="$CXXFLAGS -lstdc++"
32113    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32114/* end confdefs.h.  */
32115
32116int
32117main ()
32118{
32119return 0;
32120  ;
32121  return 0;
32122}
32123_ACEOF
32124if ac_fn_cxx_try_link "$LINENO"; then :
32125  has_dynamic_libstdcxx=yes
32126else
32127  has_dynamic_libstdcxx=no
32128fi
32129rm -f core conftest.err conftest.$ac_objext \
32130    conftest$ac_exeext conftest.$ac_ext
32131    CXXFLAGS="$OLD_CXXFLAGS"
32132    ac_ext=cpp
32133ac_cpp='$CXXCPP $CPPFLAGS'
32134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32137
32138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32139$as_echo "$has_dynamic_libstdcxx" >&6; }
32140
32141    # Test if stdc++ can be linked statically.
32142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32143$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32144    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32145    ac_ext=cpp
32146ac_cpp='$CXXCPP $CPPFLAGS'
32147ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32148ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32149ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32150
32151    OLD_LIBS="$LIBS"
32152    OLD_CXX="$CXX"
32153    LIBS="$STATIC_STDCXX_FLAGS"
32154    CXX="$CC"
32155    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32156/* end confdefs.h.  */
32157
32158int
32159main ()
32160{
32161return 0;
32162  ;
32163  return 0;
32164}
32165_ACEOF
32166if ac_fn_cxx_try_link "$LINENO"; then :
32167  has_static_libstdcxx=yes
32168else
32169  has_static_libstdcxx=no
32170fi
32171rm -f core conftest.err conftest.$ac_objext \
32172    conftest$ac_exeext conftest.$ac_ext
32173    LIBS="$OLD_LIBS"
32174    CXX="$OLD_CXX"
32175    ac_ext=cpp
32176ac_cpp='$CXXCPP $CPPFLAGS'
32177ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32178ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32179ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32180
32181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32182$as_echo "$has_static_libstdcxx" >&6; }
32183
32184    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32185        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32186    fi
32187
32188    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32189        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32190    fi
32191
32192    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32193        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32194    fi
32195
32196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32197$as_echo_n "checking how to link with libstdc++... " >&6; }
32198    # If dynamic was requested, it's available since it would fail above otherwise.
32199    # If dynamic wasn't requested, go with static unless it isn't available.
32200    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32201        LIBCXX="$LIBCXX -lstdc++"
32202        LDCXX="$CXX"
32203        STATIC_CXX_SETTING="STATIC_CXX=false"
32204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32205$as_echo "dynamic" >&6; }
32206    else
32207        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32208        LDCXX="$CC"
32209        STATIC_CXX_SETTING="STATIC_CXX=true"
32210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32211$as_echo "static" >&6; }
32212    fi
32213fi
32214
32215
32216if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32217    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32218
32219pkg_failed=no
32220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32221$as_echo_n "checking for LIBFFI... " >&6; }
32222
32223if test -n "$LIBFFI_CFLAGS"; then
32224    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32225 elif test -n "$PKG_CONFIG"; then
32226    if test -n "$PKG_CONFIG" && \
32227    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32228  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32229  ac_status=$?
32230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32231  test $ac_status = 0; }; then
32232  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32233else
32234  pkg_failed=yes
32235fi
32236 else
32237    pkg_failed=untried
32238fi
32239if test -n "$LIBFFI_LIBS"; then
32240    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32241 elif test -n "$PKG_CONFIG"; then
32242    if test -n "$PKG_CONFIG" && \
32243    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32244  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32245  ac_status=$?
32246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32247  test $ac_status = 0; }; then
32248  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32249else
32250  pkg_failed=yes
32251fi
32252 else
32253    pkg_failed=untried
32254fi
32255
32256
32257
32258if test $pkg_failed = yes; then
32259
32260if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32261        _pkg_short_errors_supported=yes
32262else
32263        _pkg_short_errors_supported=no
32264fi
32265        if test $_pkg_short_errors_supported = yes; then
32266	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32267        else
32268	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32269        fi
32270	# Put the nasty error message in config.log where it belongs
32271	echo "$LIBFFI_PKG_ERRORS" >&5
32272
32273	as_fn_error $? "Package requirements (libffi) were not met:
32274
32275$LIBFFI_PKG_ERRORS
32276
32277Consider adjusting the PKG_CONFIG_PATH environment variable if you
32278installed software in a non-standard prefix.
32279
32280Alternatively, you may set the environment variables LIBFFI_CFLAGS
32281and LIBFFI_LIBS to avoid the need to call pkg-config.
32282See the pkg-config man page for more details.
32283" "$LINENO" 5
32284elif test $pkg_failed = untried; then
32285	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32287as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32288is in your PATH or set the PKG_CONFIG environment variable to the full
32289path to pkg-config.
32290
32291Alternatively, you may set the environment variables LIBFFI_CFLAGS
32292and LIBFFI_LIBS to avoid the need to call pkg-config.
32293See the pkg-config man page for more details.
32294
32295To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32296See \`config.log' for more details" "$LINENO" 5 ; }
32297else
32298	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32299	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32301$as_echo "yes" >&6; }
32302	:
32303fi
32304
32305fi
32306
32307if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32308    # Extract the first word of "llvm-config", so it can be a program name with args.
32309set dummy llvm-config; ac_word=$2
32310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32311$as_echo_n "checking for $ac_word... " >&6; }
32312if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32313  $as_echo_n "(cached) " >&6
32314else
32315  if test -n "$LLVM_CONFIG"; then
32316  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32317else
32318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32319for as_dir in $PATH
32320do
32321  IFS=$as_save_IFS
32322  test -z "$as_dir" && as_dir=.
32323    for ac_exec_ext in '' $ac_executable_extensions; do
32324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32325    ac_cv_prog_LLVM_CONFIG="llvm-config"
32326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32327    break 2
32328  fi
32329done
32330  done
32331IFS=$as_save_IFS
32332
32333fi
32334fi
32335LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32336if test -n "$LLVM_CONFIG"; then
32337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32338$as_echo "$LLVM_CONFIG" >&6; }
32339else
32340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32341$as_echo "no" >&6; }
32342fi
32343
32344
32345
32346    if test "x$LLVM_CONFIG" != xllvm-config; then
32347        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32348    fi
32349
32350    llvm_components="jit mcjit engine nativecodegen native"
32351    unset LLVM_CFLAGS
32352    for flag in $("$LLVM_CONFIG" --cxxflags); do
32353      if echo "${flag}" | grep -q '^-[ID]'; then
32354        if test "${flag}" != "-D_DEBUG" ; then
32355          if test "${LLVM_CFLAGS}" != "" ; then
32356            LLVM_CFLAGS="${LLVM_CFLAGS} "
32357          fi
32358          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32359        fi
32360      fi
32361    done
32362    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32363    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32364
32365    unset LLVM_LDFLAGS
32366    for flag in $("${LLVM_CONFIG}" --ldflags); do
32367      if echo "${flag}" | grep -q '^-L'; then
32368        if test "${LLVM_LDFLAGS}" != ""; then
32369          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32370        fi
32371        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32372      fi
32373    done
32374
32375    unset LLVM_LIBS
32376    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32377      if echo "${flag}" | grep -q '^-l'; then
32378        if test "${LLVM_LIBS}" != ""; then
32379          LLVM_LIBS="${LLVM_LIBS} "
32380        fi
32381        LLVM_LIBS="${LLVM_LIBS}${flag}"
32382      fi
32383    done
32384
32385
32386
32387
32388fi
32389
32390# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32391if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32392    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32393fi
32394
32395# TODO better (platform agnostic) test
32396if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32397    LIBCXX="-lstdc++"
32398fi
32399
32400
32401
32402
32403
32404# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32405
32406# When using cygwin or msys, we need a wrapper binary that renames
32407# /cygdrive/c/ arguments into c:/ arguments and peeks into
32408# @files and rewrites these too! This wrapper binary is
32409# called fixpath.
32410FIXPATH=
32411if test "x$OPENJDK_BUILD_OS" = xwindows; then
32412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32413$as_echo_n "checking if fixpath can be created... " >&6; }
32414    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32415    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32416    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32417      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32418      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32419      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32420      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32421    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32422      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32423      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32424
32425      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32426      # @ was chosen as separator to minimize risk of other tools messing around with it
32427      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32428      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32429
32430      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32431    fi
32432    rm -f $OUTPUT_ROOT/fixpath*
32433    cd $OUTPUT_ROOT
32434    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32435    cd $CURDIR
32436
32437    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32439$as_echo "no" >&6; }
32440        cat $OUTPUT_ROOT/fixpath1.log
32441        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32442    fi
32443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32444$as_echo "yes" >&6; }
32445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32446$as_echo_n "checking if fixpath.exe works... " >&6; }
32447    cd $OUTPUT_ROOT
32448    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32449    cd $CURDIR
32450    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32452$as_echo "no" >&6; }
32453        cat $OUTPUT_ROOT/fixpath2.log
32454        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32455    fi
32456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32457$as_echo "yes" >&6; }
32458    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32459fi
32460
32461
32462
32463
32464###############################################################################
32465#
32466# We need to do some final tweaking, when everything else is done.
32467#
32468###############################################################################
32469
32470
32471HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32472
32473
32474# The name of the Service Agent jar.
32475SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32476if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32477  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32478fi
32479
32480
32481
32482
32483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32484$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32485
32486if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32487    ENABLE_INTREE_EC=yes
32488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32489$as_echo "yes" >&6; }
32490else
32491    ENABLE_INTREE_EC=no
32492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32493$as_echo "no" >&6; }
32494fi
32495
32496
32497
32498
32499###############################################################################
32500#
32501# Configure parts of the build that only affect the build performance,
32502# not the result.
32503#
32504###############################################################################
32505
32506
32507  # How many cores do we have on this build system?
32508
32509# Check whether --with-num-cores was given.
32510if test "${with_num_cores+set}" = set; then :
32511  withval=$with_num_cores;
32512fi
32513
32514  if test "x$with_num_cores" = x; then
32515    # The number of cores were not specified, try to probe them.
32516
32517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32518$as_echo_n "checking for number of cores... " >&6; }
32519    NUM_CORES=1
32520    FOUND_CORES=no
32521
32522    if test -f /proc/cpuinfo; then
32523        # Looks like a Linux (or cygwin) system
32524        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32525        FOUND_CORES=yes
32526    elif test -x /usr/sbin/psrinfo; then
32527        # Looks like a Solaris system
32528        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32529        FOUND_CORES=yes
32530    elif test -x /usr/sbin/system_profiler; then
32531        # Looks like a MacOSX system
32532        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32533        FOUND_CORES=yes
32534    elif test -n "$NUMBER_OF_PROCESSORS"; then
32535        # On windows, look in the env
32536        NUM_CORES=$NUMBER_OF_PROCESSORS
32537        FOUND_CORES=yes
32538    fi
32539
32540    if test "x$FOUND_CORES" = xyes; then
32541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32542$as_echo "$NUM_CORES" >&6; }
32543    else
32544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32545$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32547$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32548    fi
32549
32550
32551  else
32552    NUM_CORES=$with_num_cores
32553  fi
32554
32555
32556
32557  # How much memory do we have on this build system?
32558
32559# Check whether --with-memory-size was given.
32560if test "${with_memory_size+set}" = set; then :
32561  withval=$with_memory_size;
32562fi
32563
32564  if test "x$with_memory_size" = x; then
32565    # The memory size was not specified, try to probe it.
32566
32567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32568$as_echo_n "checking for memory size... " >&6; }
32569    # Default to 1024 MB
32570    MEMORY_SIZE=1024
32571    FOUND_MEM=no
32572
32573    if test -f /proc/meminfo; then
32574        # Looks like a Linux (or cygwin) system
32575        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32576        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32577        FOUND_MEM=yes
32578    elif test -x /usr/sbin/prtconf; then
32579        # Looks like a Solaris system
32580        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32581        FOUND_MEM=yes
32582    elif test -x /usr/sbin/system_profiler; then
32583        # Looks like a MacOSX system
32584        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32585        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32586        FOUND_MEM=yes
32587    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32588        # Windows, but without cygwin
32589        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32590        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32591        FOUND_MEM=yes
32592    fi
32593
32594    if test "x$FOUND_MEM" = xyes; then
32595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32596$as_echo "$MEMORY_SIZE MB" >&6; }
32597    else
32598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32599$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32601$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32602    fi
32603
32604  else
32605    MEMORY_SIZE=$with_memory_size
32606  fi
32607
32608
32609
32610  # Provide a decent default number of parallel jobs for make depending on
32611  # number of cores, amount of memory and machine architecture.
32612
32613# Check whether --with-jobs was given.
32614if test "${with_jobs+set}" = set; then :
32615  withval=$with_jobs;
32616fi
32617
32618  if test "x$with_jobs" = x; then
32619    # Number of jobs was not specified, calculate.
32620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32621$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32622    # Approximate memory in GB, rounding up a bit.
32623    memory_gb=`expr $MEMORY_SIZE / 1100`
32624    # Pick the lowest of memory in gb and number of cores.
32625    if test "$memory_gb" -lt "$NUM_CORES"; then
32626      JOBS="$memory_gb"
32627    else
32628      JOBS="$NUM_CORES"
32629      # On bigger machines, leave some room for other processes to run
32630      if test "$JOBS" -gt "4"; then
32631        JOBS=`expr $JOBS '*' 90 / 100`
32632      fi
32633    fi
32634    # Cap number of jobs to 16
32635    if test "$JOBS" -gt "16"; then
32636      JOBS=16
32637    fi
32638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32639$as_echo "$JOBS" >&6; }
32640  else
32641    JOBS=$with_jobs
32642  fi
32643
32644
32645
32646# Setup smart javac (after cores and memory have been setup)
32647
32648
32649# Check whether --with-sjavac-server-java was given.
32650if test "${with_sjavac_server_java+set}" = set; then :
32651  withval=$with_sjavac_server_java;
32652fi
32653
32654
32655if test "x$with_sjavac_server_java" != x; then
32656    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32657    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32658    if test "x$FOUND_VERSION" = x; then
32659        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32660    fi
32661else
32662    SJAVAC_SERVER_JAVA=""
32663    # Hotspot specific options.
32664
32665    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
32666    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
32667    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
32668    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
32669    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32670        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32671    fi
32672
32673    # JRockit specific options.
32674
32675    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
32676    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
32677    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
32678    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
32679    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32680        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32681    fi
32682
32683    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32684fi
32685
32686
32687
32688# Check whether --with-sjavac-server-cores was given.
32689if test "${with_sjavac_server_cores+set}" = set; then :
32690  withval=$with_sjavac_server_cores;
32691fi
32692
32693if test "x$with_sjavac_server_cores" != x; then
32694    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
32695else
32696    if test "$NUM_CORES" -gt 16; then
32697        # We set this arbitrary limit because we want to limit the heap
32698        # size of the javac server.
32699        # In the future we will make the javac compilers in the server
32700        # share more and more state, thus enabling us to use more and
32701        # more concurrent threads in the server.
32702        SJAVAC_SERVER_CORES="16"
32703    else
32704        SJAVAC_SERVER_CORES="$NUM_CORES"
32705    fi
32706
32707    if test "$MEMORY_SIZE" -gt "17000"; then
32708        MAX_HEAP_MEM=10000
32709
32710    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32711    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32712    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32713    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32714    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32715        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32716    fi
32717
32718
32719    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32720    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
32721    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
32722    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
32723    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32724        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32725    fi
32726
32727    elif test "$MEMORY_SIZE" -gt "10000"; then
32728        MAX_HEAP_MEM=6000
32729
32730    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32731    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32732    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32733    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32734    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32735        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32736    fi
32737
32738
32739    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32740    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
32741    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
32742    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
32743    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32744        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32745    fi
32746
32747    elif test "$MEMORY_SIZE" -gt "5000"; then
32748        MAX_HEAP_MEM=3000
32749
32750    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32751    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32752    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32753    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32754    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32755        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32756    fi
32757
32758
32759    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32760    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
32761    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
32762    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
32763    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32764        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32765    fi
32766
32767    elif test "$MEMORY_SIZE" -gt "3800"; then
32768        MAX_HEAP_MEM=2500
32769
32770    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32771    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
32772    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
32773    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
32774    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32775        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32776    fi
32777
32778    elif test "$MEMORY_SIZE" -gt "1900"; then
32779        MAX_HEAP_MEM=1200
32780
32781    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32782    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
32783    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
32784    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
32785    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32786        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32787    fi
32788
32789    elif test "$MEMORY_SIZE" -gt "1000"; then
32790        MAX_HEAP_MEM=900
32791
32792    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32793    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32794    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32795    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32796    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32797        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32798    fi
32799
32800    else
32801        MAX_HEAP_MEM=512
32802
32803    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32804    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32805    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32806    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32807    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32808        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32809    fi
32810
32811    fi
32812
32813
32814    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32815    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32816    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32817    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32818    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32819        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32820    fi
32821
32822
32823    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32824    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32825    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32826    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32827    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32828        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32829    fi
32830
32831
32832    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32833    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32834    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32835    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32836    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32837        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32838    fi
32839
32840
32841    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32842    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32844$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32845        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32847$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32848    fi
32849fi
32850
32851
32852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32853$as_echo_n "checking whether to use sjavac... " >&6; }
32854# Check whether --enable-sjavac was given.
32855if test "${enable_sjavac+set}" = set; then :
32856  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32857else
32858  ENABLE_SJAVAC='no'
32859fi
32860
32861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32862$as_echo "$ENABLE_SJAVAC" >&6; }
32863
32864
32865if test "x$ENABLE_SJAVAC" = xyes; then
32866    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32867else
32868    SJAVAC_SERVER_DIR=
32869fi
32870
32871
32872
32873
32874# Can the C/C++ compiler use precompiled headers?
32875
32876
32877###############################################################################
32878#
32879# Can the C/C++ compiler use precompiled headers?
32880#
32881# Check whether --enable-precompiled-headers was given.
32882if test "${enable_precompiled_headers+set}" = set; then :
32883  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32884else
32885  ENABLE_PRECOMPH=yes
32886fi
32887
32888
32889USE_PRECOMPILED_HEADER=1
32890if test "x$ENABLE_PRECOMPH" = xno; then
32891    USE_PRECOMPILED_HEADER=0
32892fi
32893
32894if test "x$ENABLE_PRECOMPH" = xyes; then
32895    # Check that the compiler actually supports precomp headers.
32896    if test "x$GCC" = xyes; then
32897         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32898$as_echo_n "checking that precompiled headers work... " >&6; }
32899         echo "int alfa();" > conftest.h
32900         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32901         if test ! -f conftest.hpp.gch; then
32902             USE_PRECOMPILED_HEADER=0
32903             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32904$as_echo "no" >&6; }
32905         else
32906             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32907$as_echo "yes" >&6; }
32908         fi
32909         rm -f conftest.h conftest.hpp.gch
32910    fi
32911fi
32912
32913
32914
32915
32916# Setup use of ccache, if available
32917
32918    # Check whether --enable-ccache was given.
32919if test "${enable_ccache+set}" = set; then :
32920  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32921else
32922  ENABLE_CCACHE=yes
32923fi
32924
32925    if test "x$ENABLE_CCACHE" = xyes; then
32926        # Extract the first word of "ccache", so it can be a program name with args.
32927set dummy ccache; ac_word=$2
32928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32929$as_echo_n "checking for $ac_word... " >&6; }
32930if test "${ac_cv_path_CCACHE+set}" = set; then :
32931  $as_echo_n "(cached) " >&6
32932else
32933  case $CCACHE in
32934  [\\/]* | ?:[\\/]*)
32935  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32936  ;;
32937  *)
32938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32939for as_dir in $PATH
32940do
32941  IFS=$as_save_IFS
32942  test -z "$as_dir" && as_dir=.
32943    for ac_exec_ext in '' $ac_executable_extensions; do
32944  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32945    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32947    break 2
32948  fi
32949done
32950  done
32951IFS=$as_save_IFS
32952
32953  ;;
32954esac
32955fi
32956CCACHE=$ac_cv_path_CCACHE
32957if test -n "$CCACHE"; then
32958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32959$as_echo "$CCACHE" >&6; }
32960else
32961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32962$as_echo "no" >&6; }
32963fi
32964
32965
32966    else
32967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32968$as_echo_n "checking for ccache... " >&6; }
32969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32970$as_echo "explicitly disabled" >&6; }
32971        CCACHE=
32972    fi
32973
32974
32975
32976# Check whether --with-ccache-dir was given.
32977if test "${with_ccache_dir+set}" = set; then :
32978  withval=$with_ccache_dir;
32979fi
32980
32981
32982    if test "x$with_ccache_dir" != x; then
32983        # When using a non home ccache directory, assume the use is to share ccache files
32984        # with other users. Thus change the umask.
32985        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32986    fi
32987    CCACHE_FOUND=""
32988    if test "x$CCACHE" != x; then
32989
32990    if test "x$CCACHE" != x; then
32991        CCACHE_FOUND="true"
32992        # Only use ccache if it is 3.1.4 or later, which supports
32993        # precompiled headers.
32994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32995$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32996        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32997        if test "x$HAS_GOOD_CCACHE" = x; then
32998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32999$as_echo "no, disabling ccache" >&6; }
33000            CCACHE=
33001        else
33002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33003$as_echo "yes" >&6; }
33004            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33005$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33006            PUSHED_FLAGS="$CXXFLAGS"
33007            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33008            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33009/* end confdefs.h.  */
33010
33011int
33012main ()
33013{
33014
33015  ;
33016  return 0;
33017}
33018_ACEOF
33019if ac_fn_cxx_try_compile "$LINENO"; then :
33020  CC_KNOWS_CCACHE_TRICK=yes
33021else
33022  CC_KNOWS_CCACHE_TRICK=no
33023fi
33024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33025            CXXFLAGS="$PUSHED_FLAGS"
33026            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33027                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33028$as_echo "yes" >&6; }
33029            else
33030                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33031$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33032                CCACHE=
33033            fi
33034        fi
33035    fi
33036
33037    if test "x$CCACHE" != x; then
33038        CCACHE_SLOPPINESS=time_macros
33039        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33040        CCACHE_FLAGS=-fpch-preprocess
33041
33042        if test "x$SET_CCACHE_DIR" != x; then
33043            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33044	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33045        fi
33046    fi
33047
33048    fi
33049
33050
33051###############################################################################
33052#
33053# And now the finish...
33054#
33055###############################################################################
33056
33057# Check for some common pitfalls
33058
33059  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33060    file_to_test="$SRC_ROOT/LICENSE"
33061    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33062      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
33063    fi
33064  fi
33065
33066
33067
33068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33069$as_echo_n "checking if build directory is on local disk... " >&6; }
33070
33071	# df -l lists only local disks; if the given directory is not found then
33072	# a non-zero exit code is given
33073  if test "x$DF" = x; then
33074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33075      # msys does not have df; use Windows "net use" instead.
33076      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33077      if test "x$IS_NETWORK_DISK" = x; then
33078        OUTPUT_DIR_IS_LOCAL="yes"
33079      else
33080        OUTPUT_DIR_IS_LOCAL="no"
33081      fi
33082    else
33083      # No df here, say it's local
33084      OUTPUT_DIR_IS_LOCAL="yes"
33085    fi
33086  else
33087    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33088      OUTPUT_DIR_IS_LOCAL="yes"
33089    else
33090      OUTPUT_DIR_IS_LOCAL="no"
33091    fi
33092  fi
33093
33094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33095$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33096
33097
33098
33099# Check if the user has any old-style ALT_ variables set.
33100FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33101
33102# Before generating output files, test if they exist. If they do, this is a reconfigure.
33103# Since we can't properly handle the dependencies for this, warn the user about the situation
33104if test -e $OUTPUT_ROOT/spec.gmk; then
33105  IS_RECONFIGURE=yes
33106else
33107  IS_RECONFIGURE=no
33108fi
33109
33110if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33111  HIDE_PERFORMANCE_HINTS=yes
33112else
33113  HIDE_PERFORMANCE_HINTS=no
33114  # Hide it the next time around...
33115  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33116fi
33117
33118
33119
33120# At the end, call the custom hook. (Dummy macro if no custom sources available)
33121
33122
33123# We're messing a bit with internal autoconf variables to put the config.status
33124# in the output directory instead of the current directory.
33125CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33126# Create the actual output files. Now the main work of configure is done.
33127cat >confcache <<\_ACEOF
33128# This file is a shell script that caches the results of configure
33129# tests run on this system so they can be shared between configure
33130# scripts and configure runs, see configure's option --config-cache.
33131# It is not useful on other systems.  If it contains results you don't
33132# want to keep, you may remove or edit it.
33133#
33134# config.status only pays attention to the cache file if you give it
33135# the --recheck option to rerun configure.
33136#
33137# `ac_cv_env_foo' variables (set or unset) will be overridden when
33138# loading this file, other *unset* `ac_cv_foo' will be assigned the
33139# following values.
33140
33141_ACEOF
33142
33143# The following way of writing the cache mishandles newlines in values,
33144# but we know of no workaround that is simple, portable, and efficient.
33145# So, we kill variables containing newlines.
33146# Ultrix sh set writes to stderr and can't be redirected directly,
33147# and sets the high bit in the cache file unless we assign to the vars.
33148(
33149  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33150    eval ac_val=\$$ac_var
33151    case $ac_val in #(
33152    *${as_nl}*)
33153      case $ac_var in #(
33154      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33155$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33156      esac
33157      case $ac_var in #(
33158      _ | IFS | as_nl) ;; #(
33159      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33160      *) { eval $ac_var=; unset $ac_var;} ;;
33161      esac ;;
33162    esac
33163  done
33164
33165  (set) 2>&1 |
33166    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33167    *${as_nl}ac_space=\ *)
33168      # `set' does not quote correctly, so add quotes: double-quote
33169      # substitution turns \\\\ into \\, and sed turns \\ into \.
33170      sed -n \
33171	"s/'/'\\\\''/g;
33172	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33173      ;; #(
33174    *)
33175      # `set' quotes correctly as required by POSIX, so do not add quotes.
33176      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33177      ;;
33178    esac |
33179    sort
33180) |
33181  sed '
33182     /^ac_cv_env_/b end
33183     t clear
33184     :clear
33185     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33186     t end
33187     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33188     :end' >>confcache
33189if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33190  if test -w "$cache_file"; then
33191    test "x$cache_file" != "x/dev/null" &&
33192      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33193$as_echo "$as_me: updating cache $cache_file" >&6;}
33194    cat confcache >$cache_file
33195  else
33196    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33197$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33198  fi
33199fi
33200rm -f confcache
33201
33202test "x$prefix" = xNONE && prefix=$ac_default_prefix
33203# Let make expand exec_prefix.
33204test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33205
33206DEFS=-DHAVE_CONFIG_H
33207
33208ac_libobjs=
33209ac_ltlibobjs=
33210U=
33211for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33212  # 1. Remove the extension, and $U if already installed.
33213  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33214  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33215  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33216  #    will be set to the directory where LIBOBJS objects are built.
33217  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33218  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33219done
33220LIBOBJS=$ac_libobjs
33221
33222LTLIBOBJS=$ac_ltlibobjs
33223
33224
33225
33226: ${CONFIG_STATUS=./config.status}
33227ac_write_fail=0
33228ac_clean_files_save=$ac_clean_files
33229ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33230{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33231$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33232as_write_fail=0
33233cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33234#! $SHELL
33235# Generated by $as_me.
33236# Run this file to recreate the current configuration.
33237# Compiler output produced by configure, useful for debugging
33238# configure, is in config.log if it exists.
33239
33240debug=false
33241ac_cs_recheck=false
33242ac_cs_silent=false
33243
33244SHELL=\${CONFIG_SHELL-$SHELL}
33245export SHELL
33246_ASEOF
33247cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33248## -------------------- ##
33249## M4sh Initialization. ##
33250## -------------------- ##
33251
33252# Be more Bourne compatible
33253DUALCASE=1; export DUALCASE # for MKS sh
33254if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33255  emulate sh
33256  NULLCMD=:
33257  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33258  # is contrary to our usage.  Disable this feature.
33259  alias -g '${1+"$@"}'='"$@"'
33260  setopt NO_GLOB_SUBST
33261else
33262  case `(set -o) 2>/dev/null` in #(
33263  *posix*) :
33264    set -o posix ;; #(
33265  *) :
33266     ;;
33267esac
33268fi
33269
33270
33271as_nl='
33272'
33273export as_nl
33274# Printing a long string crashes Solaris 7 /usr/bin/printf.
33275as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33276as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33277as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33278# Prefer a ksh shell builtin over an external printf program on Solaris,
33279# but without wasting forks for bash or zsh.
33280if test -z "$BASH_VERSION$ZSH_VERSION" \
33281    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33282  as_echo='print -r --'
33283  as_echo_n='print -rn --'
33284elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33285  as_echo='printf %s\n'
33286  as_echo_n='printf %s'
33287else
33288  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33289    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33290    as_echo_n='/usr/ucb/echo -n'
33291  else
33292    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33293    as_echo_n_body='eval
33294      arg=$1;
33295      case $arg in #(
33296      *"$as_nl"*)
33297	expr "X$arg" : "X\\(.*\\)$as_nl";
33298	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33299      esac;
33300      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33301    '
33302    export as_echo_n_body
33303    as_echo_n='sh -c $as_echo_n_body as_echo'
33304  fi
33305  export as_echo_body
33306  as_echo='sh -c $as_echo_body as_echo'
33307fi
33308
33309# The user is always right.
33310if test "${PATH_SEPARATOR+set}" != set; then
33311  PATH_SEPARATOR=:
33312  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33313    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33314      PATH_SEPARATOR=';'
33315  }
33316fi
33317
33318
33319# IFS
33320# We need space, tab and new line, in precisely that order.  Quoting is
33321# there to prevent editors from complaining about space-tab.
33322# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33323# splitting by setting IFS to empty value.)
33324IFS=" ""	$as_nl"
33325
33326# Find who we are.  Look in the path if we contain no directory separator.
33327case $0 in #((
33328  *[\\/]* ) as_myself=$0 ;;
33329  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33330for as_dir in $PATH
33331do
33332  IFS=$as_save_IFS
33333  test -z "$as_dir" && as_dir=.
33334    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33335  done
33336IFS=$as_save_IFS
33337
33338     ;;
33339esac
33340# We did not find ourselves, most probably we were run as `sh COMMAND'
33341# in which case we are not to be found in the path.
33342if test "x$as_myself" = x; then
33343  as_myself=$0
33344fi
33345if test ! -f "$as_myself"; then
33346  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33347  exit 1
33348fi
33349
33350# Unset variables that we do not need and which cause bugs (e.g. in
33351# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33352# suppresses any "Segmentation fault" message there.  '((' could
33353# trigger a bug in pdksh 5.2.14.
33354for as_var in BASH_ENV ENV MAIL MAILPATH
33355do eval test x\${$as_var+set} = xset \
33356  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33357done
33358PS1='$ '
33359PS2='> '
33360PS4='+ '
33361
33362# NLS nuisances.
33363LC_ALL=C
33364export LC_ALL
33365LANGUAGE=C
33366export LANGUAGE
33367
33368# CDPATH.
33369(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33370
33371
33372# as_fn_error STATUS ERROR [LINENO LOG_FD]
33373# ----------------------------------------
33374# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33375# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33376# script with STATUS, using 1 if that was 0.
33377as_fn_error ()
33378{
33379  as_status=$1; test $as_status -eq 0 && as_status=1
33380  if test "$4"; then
33381    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33382    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33383  fi
33384  $as_echo "$as_me: error: $2" >&2
33385  as_fn_exit $as_status
33386} # as_fn_error
33387
33388
33389# as_fn_set_status STATUS
33390# -----------------------
33391# Set $? to STATUS, without forking.
33392as_fn_set_status ()
33393{
33394  return $1
33395} # as_fn_set_status
33396
33397# as_fn_exit STATUS
33398# -----------------
33399# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33400as_fn_exit ()
33401{
33402  set +e
33403  as_fn_set_status $1
33404  exit $1
33405} # as_fn_exit
33406
33407# as_fn_unset VAR
33408# ---------------
33409# Portably unset VAR.
33410as_fn_unset ()
33411{
33412  { eval $1=; unset $1;}
33413}
33414as_unset=as_fn_unset
33415# as_fn_append VAR VALUE
33416# ----------------------
33417# Append the text in VALUE to the end of the definition contained in VAR. Take
33418# advantage of any shell optimizations that allow amortized linear growth over
33419# repeated appends, instead of the typical quadratic growth present in naive
33420# implementations.
33421if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33422  eval 'as_fn_append ()
33423  {
33424    eval $1+=\$2
33425  }'
33426else
33427  as_fn_append ()
33428  {
33429    eval $1=\$$1\$2
33430  }
33431fi # as_fn_append
33432
33433# as_fn_arith ARG...
33434# ------------------
33435# Perform arithmetic evaluation on the ARGs, and store the result in the
33436# global $as_val. Take advantage of shells that can avoid forks. The arguments
33437# must be portable across $(()) and expr.
33438if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33439  eval 'as_fn_arith ()
33440  {
33441    as_val=$(( $* ))
33442  }'
33443else
33444  as_fn_arith ()
33445  {
33446    as_val=`expr "$@" || test $? -eq 1`
33447  }
33448fi # as_fn_arith
33449
33450
33451if expr a : '\(a\)' >/dev/null 2>&1 &&
33452   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33453  as_expr=expr
33454else
33455  as_expr=false
33456fi
33457
33458if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33459  as_basename=basename
33460else
33461  as_basename=false
33462fi
33463
33464if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33465  as_dirname=dirname
33466else
33467  as_dirname=false
33468fi
33469
33470as_me=`$as_basename -- "$0" ||
33471$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33472	 X"$0" : 'X\(//\)$' \| \
33473	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33474$as_echo X/"$0" |
33475    sed '/^.*\/\([^/][^/]*\)\/*$/{
33476	    s//\1/
33477	    q
33478	  }
33479	  /^X\/\(\/\/\)$/{
33480	    s//\1/
33481	    q
33482	  }
33483	  /^X\/\(\/\).*/{
33484	    s//\1/
33485	    q
33486	  }
33487	  s/.*/./; q'`
33488
33489# Avoid depending upon Character Ranges.
33490as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33491as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33492as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33493as_cr_digits='0123456789'
33494as_cr_alnum=$as_cr_Letters$as_cr_digits
33495
33496ECHO_C= ECHO_N= ECHO_T=
33497case `echo -n x` in #(((((
33498-n*)
33499  case `echo 'xy\c'` in
33500  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33501  xy)  ECHO_C='\c';;
33502  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33503       ECHO_T='	';;
33504  esac;;
33505*)
33506  ECHO_N='-n';;
33507esac
33508
33509rm -f conf$$ conf$$.exe conf$$.file
33510if test -d conf$$.dir; then
33511  rm -f conf$$.dir/conf$$.file
33512else
33513  rm -f conf$$.dir
33514  mkdir conf$$.dir 2>/dev/null
33515fi
33516if (echo >conf$$.file) 2>/dev/null; then
33517  if ln -s conf$$.file conf$$ 2>/dev/null; then
33518    as_ln_s='ln -s'
33519    # ... but there are two gotchas:
33520    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33521    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33522    # In both cases, we have to default to `cp -p'.
33523    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33524      as_ln_s='cp -p'
33525  elif ln conf$$.file conf$$ 2>/dev/null; then
33526    as_ln_s=ln
33527  else
33528    as_ln_s='cp -p'
33529  fi
33530else
33531  as_ln_s='cp -p'
33532fi
33533rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33534rmdir conf$$.dir 2>/dev/null
33535
33536
33537# as_fn_mkdir_p
33538# -------------
33539# Create "$as_dir" as a directory, including parents if necessary.
33540as_fn_mkdir_p ()
33541{
33542
33543  case $as_dir in #(
33544  -*) as_dir=./$as_dir;;
33545  esac
33546  test -d "$as_dir" || eval $as_mkdir_p || {
33547    as_dirs=
33548    while :; do
33549      case $as_dir in #(
33550      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33551      *) as_qdir=$as_dir;;
33552      esac
33553      as_dirs="'$as_qdir' $as_dirs"
33554      as_dir=`$as_dirname -- "$as_dir" ||
33555$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33556	 X"$as_dir" : 'X\(//\)[^/]' \| \
33557	 X"$as_dir" : 'X\(//\)$' \| \
33558	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33559$as_echo X"$as_dir" |
33560    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33561	    s//\1/
33562	    q
33563	  }
33564	  /^X\(\/\/\)[^/].*/{
33565	    s//\1/
33566	    q
33567	  }
33568	  /^X\(\/\/\)$/{
33569	    s//\1/
33570	    q
33571	  }
33572	  /^X\(\/\).*/{
33573	    s//\1/
33574	    q
33575	  }
33576	  s/.*/./; q'`
33577      test -d "$as_dir" && break
33578    done
33579    test -z "$as_dirs" || eval "mkdir $as_dirs"
33580  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33581
33582
33583} # as_fn_mkdir_p
33584if mkdir -p . 2>/dev/null; then
33585  as_mkdir_p='mkdir -p "$as_dir"'
33586else
33587  test -d ./-p && rmdir ./-p
33588  as_mkdir_p=false
33589fi
33590
33591if test -x / >/dev/null 2>&1; then
33592  as_test_x='test -x'
33593else
33594  if ls -dL / >/dev/null 2>&1; then
33595    as_ls_L_option=L
33596  else
33597    as_ls_L_option=
33598  fi
33599  as_test_x='
33600    eval sh -c '\''
33601      if test -d "$1"; then
33602	test -d "$1/.";
33603      else
33604	case $1 in #(
33605	-*)set "./$1";;
33606	esac;
33607	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33608	???[sx]*):;;*)false;;esac;fi
33609    '\'' sh
33610  '
33611fi
33612as_executable_p=$as_test_x
33613
33614# Sed expression to map a string onto a valid CPP name.
33615as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33616
33617# Sed expression to map a string onto a valid variable name.
33618as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33619
33620
33621exec 6>&1
33622## ----------------------------------- ##
33623## Main body of $CONFIG_STATUS script. ##
33624## ----------------------------------- ##
33625_ASEOF
33626test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33627
33628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33629# Save the log message, to keep $0 and so on meaningful, and to
33630# report actual input values of CONFIG_FILES etc. instead of their
33631# values after options handling.
33632ac_log="
33633This file was extended by OpenJDK $as_me jdk8, which was
33634generated by GNU Autoconf 2.67.  Invocation command line was
33635
33636  CONFIG_FILES    = $CONFIG_FILES
33637  CONFIG_HEADERS  = $CONFIG_HEADERS
33638  CONFIG_LINKS    = $CONFIG_LINKS
33639  CONFIG_COMMANDS = $CONFIG_COMMANDS
33640  $ $0 $@
33641
33642on `(hostname || uname -n) 2>/dev/null | sed 1q`
33643"
33644
33645_ACEOF
33646
33647case $ac_config_files in *"
33648"*) set x $ac_config_files; shift; ac_config_files=$*;;
33649esac
33650
33651case $ac_config_headers in *"
33652"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33653esac
33654
33655
33656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33657# Files that config.status was made for.
33658config_files="$ac_config_files"
33659config_headers="$ac_config_headers"
33660
33661_ACEOF
33662
33663cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33664ac_cs_usage="\
33665\`$as_me' instantiates files and other configuration actions
33666from templates according to the current configuration.  Unless the files
33667and actions are specified as TAGs, all are instantiated by default.
33668
33669Usage: $0 [OPTION]... [TAG]...
33670
33671  -h, --help       print this help, then exit
33672  -V, --version    print version number and configuration settings, then exit
33673      --config     print configuration, then exit
33674  -q, --quiet, --silent
33675                   do not print progress messages
33676  -d, --debug      don't remove temporary files
33677      --recheck    update $as_me by reconfiguring in the same conditions
33678      --file=FILE[:TEMPLATE]
33679                   instantiate the configuration file FILE
33680      --header=FILE[:TEMPLATE]
33681                   instantiate the configuration header FILE
33682
33683Configuration files:
33684$config_files
33685
33686Configuration headers:
33687$config_headers
33688
33689Report bugs to <build-dev@openjdk.java.net>.
33690OpenJDK home page: <http://openjdk.java.net>."
33691
33692_ACEOF
33693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33694ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33695ac_cs_version="\\
33696OpenJDK config.status jdk8
33697configured by $0, generated by GNU Autoconf 2.67,
33698  with options \\"\$ac_cs_config\\"
33699
33700Copyright (C) 2010 Free Software Foundation, Inc.
33701This config.status script is free software; the Free Software Foundation
33702gives unlimited permission to copy, distribute and modify it."
33703
33704ac_pwd='$ac_pwd'
33705srcdir='$srcdir'
33706AWK='$AWK'
33707test -n "\$AWK" || AWK=awk
33708_ACEOF
33709
33710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33711# The default lists apply if the user does not specify any file.
33712ac_need_defaults=:
33713while test $# != 0
33714do
33715  case $1 in
33716  --*=?*)
33717    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33718    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33719    ac_shift=:
33720    ;;
33721  --*=)
33722    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33723    ac_optarg=
33724    ac_shift=:
33725    ;;
33726  *)
33727    ac_option=$1
33728    ac_optarg=$2
33729    ac_shift=shift
33730    ;;
33731  esac
33732
33733  case $ac_option in
33734  # Handling of the options.
33735  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33736    ac_cs_recheck=: ;;
33737  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33738    $as_echo "$ac_cs_version"; exit ;;
33739  --config | --confi | --conf | --con | --co | --c )
33740    $as_echo "$ac_cs_config"; exit ;;
33741  --debug | --debu | --deb | --de | --d | -d )
33742    debug=: ;;
33743  --file | --fil | --fi | --f )
33744    $ac_shift
33745    case $ac_optarg in
33746    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33747    '') as_fn_error $? "missing file argument" ;;
33748    esac
33749    as_fn_append CONFIG_FILES " '$ac_optarg'"
33750    ac_need_defaults=false;;
33751  --header | --heade | --head | --hea )
33752    $ac_shift
33753    case $ac_optarg in
33754    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33755    esac
33756    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33757    ac_need_defaults=false;;
33758  --he | --h)
33759    # Conflict between --help and --header
33760    as_fn_error $? "ambiguous option: \`$1'
33761Try \`$0 --help' for more information.";;
33762  --help | --hel | -h )
33763    $as_echo "$ac_cs_usage"; exit ;;
33764  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33765  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33766    ac_cs_silent=: ;;
33767
33768  # This is an error.
33769  -*) as_fn_error $? "unrecognized option: \`$1'
33770Try \`$0 --help' for more information." ;;
33771
33772  *) as_fn_append ac_config_targets " $1"
33773     ac_need_defaults=false ;;
33774
33775  esac
33776  shift
33777done
33778
33779ac_configure_extra_args=
33780
33781if $ac_cs_silent; then
33782  exec 6>/dev/null
33783  ac_configure_extra_args="$ac_configure_extra_args --silent"
33784fi
33785
33786_ACEOF
33787cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33788if \$ac_cs_recheck; then
33789  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33790  shift
33791  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33792  CONFIG_SHELL='$SHELL'
33793  export CONFIG_SHELL
33794  exec "\$@"
33795fi
33796
33797_ACEOF
33798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33799exec 5>>config.log
33800{
33801  echo
33802  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33803## Running $as_me. ##
33804_ASBOX
33805  $as_echo "$ac_log"
33806} >&5
33807
33808_ACEOF
33809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33810_ACEOF
33811
33812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33813
33814# Handling of arguments.
33815for ac_config_target in $ac_config_targets
33816do
33817  case $ac_config_target in
33818    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33819    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33820    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33821    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33822    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33823    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33824    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33825
33826  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
33827  esac
33828done
33829
33830
33831# If the user did not use the arguments to specify the items to instantiate,
33832# then the envvar interface is used.  Set only those that are not.
33833# We use the long form for the default assignment because of an extremely
33834# bizarre bug on SunOS 4.1.3.
33835if $ac_need_defaults; then
33836  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33837  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33838fi
33839
33840# Have a temporary directory for convenience.  Make it in the build tree
33841# simply because there is no reason against having it here, and in addition,
33842# creating and moving files from /tmp can sometimes cause problems.
33843# Hook for its removal unless debugging.
33844# Note that there is a small window in which the directory will not be cleaned:
33845# after its creation but before its name has been assigned to `$tmp'.
33846$debug ||
33847{
33848  tmp=
33849  trap 'exit_status=$?
33850  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33851' 0
33852  trap 'as_fn_exit 1' 1 2 13 15
33853}
33854# Create a (secure) tmp directory for tmp files.
33855
33856{
33857  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33858  test -n "$tmp" && test -d "$tmp"
33859}  ||
33860{
33861  tmp=./conf$$-$RANDOM
33862  (umask 077 && mkdir "$tmp")
33863} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33864
33865# Set up the scripts for CONFIG_FILES section.
33866# No need to generate them if there are no CONFIG_FILES.
33867# This happens for instance with `./config.status config.h'.
33868if test -n "$CONFIG_FILES"; then
33869
33870
33871ac_cr=`echo X | tr X '\015'`
33872# On cygwin, bash can eat \r inside `` if the user requested igncr.
33873# But we know of no other shell where ac_cr would be empty at this
33874# point, so we can use a bashism as a fallback.
33875if test "x$ac_cr" = x; then
33876  eval ac_cr=\$\'\\r\'
33877fi
33878ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33879if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33880  ac_cs_awk_cr='\\r'
33881else
33882  ac_cs_awk_cr=$ac_cr
33883fi
33884
33885echo 'BEGIN {' >"$tmp/subs1.awk" &&
33886_ACEOF
33887
33888
33889{
33890  echo "cat >conf$$subs.awk <<_ACEOF" &&
33891  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33892  echo "_ACEOF"
33893} >conf$$subs.sh ||
33894  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33895ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33896ac_delim='%!_!# '
33897for ac_last_try in false false false false false :; do
33898  . ./conf$$subs.sh ||
33899    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33900
33901  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33902  if test $ac_delim_n = $ac_delim_num; then
33903    break
33904  elif $ac_last_try; then
33905    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33906  else
33907    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33908  fi
33909done
33910rm -f conf$$subs.sh
33911
33912cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33913cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33914_ACEOF
33915sed -n '
33916h
33917s/^/S["/; s/!.*/"]=/
33918p
33919g
33920s/^[^!]*!//
33921:repl
33922t repl
33923s/'"$ac_delim"'$//
33924t delim
33925:nl
33926h
33927s/\(.\{148\}\)..*/\1/
33928t more1
33929s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33930p
33931n
33932b repl
33933:more1
33934s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33935p
33936g
33937s/.\{148\}//
33938t nl
33939:delim
33940h
33941s/\(.\{148\}\)..*/\1/
33942t more2
33943s/["\\]/\\&/g; s/^/"/; s/$/"/
33944p
33945b
33946:more2
33947s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33948p
33949g
33950s/.\{148\}//
33951t delim
33952' <conf$$subs.awk | sed '
33953/^[^""]/{
33954  N
33955  s/\n//
33956}
33957' >>$CONFIG_STATUS || ac_write_fail=1
33958rm -f conf$$subs.awk
33959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33960_ACAWK
33961cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33962  for (key in S) S_is_set[key] = 1
33963  FS = ""
33964
33965}
33966{
33967  line = $ 0
33968  nfields = split(line, field, "@")
33969  substed = 0
33970  len = length(field[1])
33971  for (i = 2; i < nfields; i++) {
33972    key = field[i]
33973    keylen = length(key)
33974    if (S_is_set[key]) {
33975      value = S[key]
33976      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33977      len += length(value) + length(field[++i])
33978      substed = 1
33979    } else
33980      len += 1 + keylen
33981  }
33982
33983  print line
33984}
33985
33986_ACAWK
33987_ACEOF
33988cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33989if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33990  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33991else
33992  cat
33993fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
33994  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33995_ACEOF
33996
33997# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33998# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33999# trailing colons and then remove the whole line if VPATH becomes empty
34000# (actually we leave an empty line to preserve line numbers).
34001if test "x$srcdir" = x.; then
34002  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34003h
34004s///
34005s/^/:/
34006s/[	 ]*$/:/
34007s/:\$(srcdir):/:/g
34008s/:\${srcdir}:/:/g
34009s/:@srcdir@:/:/g
34010s/^:*//
34011s/:*$//
34012x
34013s/\(=[	 ]*\).*/\1/
34014G
34015s/\n//
34016s/^[^=]*=[	 ]*$//
34017}'
34018fi
34019
34020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34021fi # test -n "$CONFIG_FILES"
34022
34023# Set up the scripts for CONFIG_HEADERS section.
34024# No need to generate them if there are no CONFIG_HEADERS.
34025# This happens for instance with `./config.status Makefile'.
34026if test -n "$CONFIG_HEADERS"; then
34027cat >"$tmp/defines.awk" <<\_ACAWK ||
34028BEGIN {
34029_ACEOF
34030
34031# Transform confdefs.h into an awk script `defines.awk', embedded as
34032# here-document in config.status, that substitutes the proper values into
34033# config.h.in to produce config.h.
34034
34035# Create a delimiter string that does not exist in confdefs.h, to ease
34036# handling of long lines.
34037ac_delim='%!_!# '
34038for ac_last_try in false false :; do
34039  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34040  if test -z "$ac_t"; then
34041    break
34042  elif $ac_last_try; then
34043    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34044  else
34045    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34046  fi
34047done
34048
34049# For the awk script, D is an array of macro values keyed by name,
34050# likewise P contains macro parameters if any.  Preserve backslash
34051# newline sequences.
34052
34053ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34054sed -n '
34055s/.\{148\}/&'"$ac_delim"'/g
34056t rset
34057:rset
34058s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34059t def
34060d
34061:def
34062s/\\$//
34063t bsnl
34064s/["\\]/\\&/g
34065s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34066D["\1"]=" \3"/p
34067s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34068d
34069:bsnl
34070s/["\\]/\\&/g
34071s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34072D["\1"]=" \3\\\\\\n"\\/p
34073t cont
34074s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34075t cont
34076d
34077:cont
34078n
34079s/.\{148\}/&'"$ac_delim"'/g
34080t clear
34081:clear
34082s/\\$//
34083t bsnlc
34084s/["\\]/\\&/g; s/^/"/; s/$/"/p
34085d
34086:bsnlc
34087s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34088b cont
34089' <confdefs.h | sed '
34090s/'"$ac_delim"'/"\\\
34091"/g' >>$CONFIG_STATUS || ac_write_fail=1
34092
34093cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34094  for (key in D) D_is_set[key] = 1
34095  FS = ""
34096}
34097/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34098  line = \$ 0
34099  split(line, arg, " ")
34100  if (arg[1] == "#") {
34101    defundef = arg[2]
34102    mac1 = arg[3]
34103  } else {
34104    defundef = substr(arg[1], 2)
34105    mac1 = arg[2]
34106  }
34107  split(mac1, mac2, "(") #)
34108  macro = mac2[1]
34109  prefix = substr(line, 1, index(line, defundef) - 1)
34110  if (D_is_set[macro]) {
34111    # Preserve the white space surrounding the "#".
34112    print prefix "define", macro P[macro] D[macro]
34113    next
34114  } else {
34115    # Replace #undef with comments.  This is necessary, for example,
34116    # in the case of _POSIX_SOURCE, which is predefined and required
34117    # on some systems where configure will not decide to define it.
34118    if (defundef == "undef") {
34119      print "/*", prefix defundef, macro, "*/"
34120      next
34121    }
34122  }
34123}
34124{ print }
34125_ACAWK
34126_ACEOF
34127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34128  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34129fi # test -n "$CONFIG_HEADERS"
34130
34131
34132eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34133shift
34134for ac_tag
34135do
34136  case $ac_tag in
34137  :[FHLC]) ac_mode=$ac_tag; continue;;
34138  esac
34139  case $ac_mode$ac_tag in
34140  :[FHL]*:*);;
34141  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34142  :[FH]-) ac_tag=-:-;;
34143  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34144  esac
34145  ac_save_IFS=$IFS
34146  IFS=:
34147  set x $ac_tag
34148  IFS=$ac_save_IFS
34149  shift
34150  ac_file=$1
34151  shift
34152
34153  case $ac_mode in
34154  :L) ac_source=$1;;
34155  :[FH])
34156    ac_file_inputs=
34157    for ac_f
34158    do
34159      case $ac_f in
34160      -) ac_f="$tmp/stdin";;
34161      *) # Look for the file first in the build tree, then in the source tree
34162	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34163	 # because $ac_f cannot contain `:'.
34164	 test -f "$ac_f" ||
34165	   case $ac_f in
34166	   [\\/$]*) false;;
34167	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34168	   esac ||
34169	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34170      esac
34171      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34172      as_fn_append ac_file_inputs " '$ac_f'"
34173    done
34174
34175    # Let's still pretend it is `configure' which instantiates (i.e., don't
34176    # use $as_me), people would be surprised to read:
34177    #    /* config.h.  Generated by config.status.  */
34178    configure_input='Generated from '`
34179	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34180	`' by configure.'
34181    if test x"$ac_file" != x-; then
34182      configure_input="$ac_file.  $configure_input"
34183      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34184$as_echo "$as_me: creating $ac_file" >&6;}
34185    fi
34186    # Neutralize special characters interpreted by sed in replacement strings.
34187    case $configure_input in #(
34188    *\&* | *\|* | *\\* )
34189       ac_sed_conf_input=`$as_echo "$configure_input" |
34190       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34191    *) ac_sed_conf_input=$configure_input;;
34192    esac
34193
34194    case $ac_tag in
34195    *:-:* | *:-) cat >"$tmp/stdin" \
34196      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34197    esac
34198    ;;
34199  esac
34200
34201  ac_dir=`$as_dirname -- "$ac_file" ||
34202$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34203	 X"$ac_file" : 'X\(//\)[^/]' \| \
34204	 X"$ac_file" : 'X\(//\)$' \| \
34205	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34206$as_echo X"$ac_file" |
34207    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34208	    s//\1/
34209	    q
34210	  }
34211	  /^X\(\/\/\)[^/].*/{
34212	    s//\1/
34213	    q
34214	  }
34215	  /^X\(\/\/\)$/{
34216	    s//\1/
34217	    q
34218	  }
34219	  /^X\(\/\).*/{
34220	    s//\1/
34221	    q
34222	  }
34223	  s/.*/./; q'`
34224  as_dir="$ac_dir"; as_fn_mkdir_p
34225  ac_builddir=.
34226
34227case "$ac_dir" in
34228.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34229*)
34230  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34231  # A ".." for each directory in $ac_dir_suffix.
34232  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34233  case $ac_top_builddir_sub in
34234  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34235  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34236  esac ;;
34237esac
34238ac_abs_top_builddir=$ac_pwd
34239ac_abs_builddir=$ac_pwd$ac_dir_suffix
34240# for backward compatibility:
34241ac_top_builddir=$ac_top_build_prefix
34242
34243case $srcdir in
34244  .)  # We are building in place.
34245    ac_srcdir=.
34246    ac_top_srcdir=$ac_top_builddir_sub
34247    ac_abs_top_srcdir=$ac_pwd ;;
34248  [\\/]* | ?:[\\/]* )  # Absolute name.
34249    ac_srcdir=$srcdir$ac_dir_suffix;
34250    ac_top_srcdir=$srcdir
34251    ac_abs_top_srcdir=$srcdir ;;
34252  *) # Relative name.
34253    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34254    ac_top_srcdir=$ac_top_build_prefix$srcdir
34255    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34256esac
34257ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34258
34259
34260  case $ac_mode in
34261  :F)
34262  #
34263  # CONFIG_FILE
34264  #
34265
34266_ACEOF
34267
34268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34269# If the template does not know about datarootdir, expand it.
34270# FIXME: This hack should be removed a few years after 2.60.
34271ac_datarootdir_hack=; ac_datarootdir_seen=
34272ac_sed_dataroot='
34273/datarootdir/ {
34274  p
34275  q
34276}
34277/@datadir@/p
34278/@docdir@/p
34279/@infodir@/p
34280/@localedir@/p
34281/@mandir@/p'
34282case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34283*datarootdir*) ac_datarootdir_seen=yes;;
34284*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34285  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34286$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34287_ACEOF
34288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34289  ac_datarootdir_hack='
34290  s&@datadir@&$datadir&g
34291  s&@docdir@&$docdir&g
34292  s&@infodir@&$infodir&g
34293  s&@localedir@&$localedir&g
34294  s&@mandir@&$mandir&g
34295  s&\\\${datarootdir}&$datarootdir&g' ;;
34296esac
34297_ACEOF
34298
34299# Neutralize VPATH when `$srcdir' = `.'.
34300# Shell code in configure.ac might set extrasub.
34301# FIXME: do we really want to maintain this feature?
34302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34303ac_sed_extra="$ac_vpsub
34304$extrasub
34305_ACEOF
34306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34307:t
34308/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34309s|@configure_input@|$ac_sed_conf_input|;t t
34310s&@top_builddir@&$ac_top_builddir_sub&;t t
34311s&@top_build_prefix@&$ac_top_build_prefix&;t t
34312s&@srcdir@&$ac_srcdir&;t t
34313s&@abs_srcdir@&$ac_abs_srcdir&;t t
34314s&@top_srcdir@&$ac_top_srcdir&;t t
34315s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34316s&@builddir@&$ac_builddir&;t t
34317s&@abs_builddir@&$ac_abs_builddir&;t t
34318s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34319$ac_datarootdir_hack
34320"
34321eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34322  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34323
34324test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34325  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34326  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34327  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34328which seems to be undefined.  Please make sure it is defined" >&5
34329$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34330which seems to be undefined.  Please make sure it is defined" >&2;}
34331
34332  rm -f "$tmp/stdin"
34333  case $ac_file in
34334  -) cat "$tmp/out" && rm -f "$tmp/out";;
34335  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34336  esac \
34337  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34338 ;;
34339  :H)
34340  #
34341  # CONFIG_HEADER
34342  #
34343  if test x"$ac_file" != x-; then
34344    {
34345      $as_echo "/* $configure_input  */" \
34346      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34347    } >"$tmp/config.h" \
34348      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34349    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34350      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34351$as_echo "$as_me: $ac_file is unchanged" >&6;}
34352    else
34353      rm -f "$ac_file"
34354      mv "$tmp/config.h" "$ac_file" \
34355	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34356    fi
34357  else
34358    $as_echo "/* $configure_input  */" \
34359      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34360      || as_fn_error $? "could not create -" "$LINENO" 5
34361  fi
34362 ;;
34363
34364
34365  esac
34366
34367done # for ac_tag
34368
34369
34370as_fn_exit 0
34371_ACEOF
34372ac_clean_files=$ac_clean_files_save
34373
34374test $ac_write_fail = 0 ||
34375  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34376
34377
34378# configure is writing to config.log, and then calls config.status.
34379# config.status does its own redirection, appending to config.log.
34380# Unfortunately, on DOS this fails, as config.log is still kept open
34381# by configure, so config.status won't be able to write to it; its
34382# output is simply discarded.  So we exec the FD to /dev/null,
34383# effectively closing config.log, so it can be properly (re)opened and
34384# appended to by config.status.  When coming back to configure, we
34385# need to make the FD available again.
34386if test "$no_create" != yes; then
34387  ac_cs_success=:
34388  ac_config_status_args=
34389  test "$silent" = yes &&
34390    ac_config_status_args="$ac_config_status_args --quiet"
34391  exec 5>/dev/null
34392  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34393  exec 5>>config.log
34394  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34395  # would make configure fail if this is the last instruction.
34396  $ac_cs_success || as_fn_exit 1
34397fi
34398if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34399  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34400$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34401fi
34402
34403
34404# Make the compare script executable
34405$CHMOD +x $OUTPUT_ROOT/compare.sh
34406
34407# Finally output some useful information to the user
34408
34409# Finally output some useful information to the user
34410
34411if test "x$CCACHE_FOUND" != x; then
34412	if  test "x$HAS_GOOD_CCACHE" = x; then
34413		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34414		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34415	else
34416		CCACHE_STATUS="installed and in use"
34417	fi
34418else
34419	if test "x$GCC" = xyes; then
34420		CCACHE_STATUS="not installed (consider installing)"
34421		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34422	else
34423		CCACHE_STATUS="not available for your system"
34424	fi
34425fi
34426
34427printf "\n"
34428printf "====================================================\n"
34429printf "A new configuration has been successfully created in\n"
34430printf "$OUTPUT_ROOT\n"
34431if test "x$CONFIGURE_COMMAND_LINE" != x; then
34432	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34433else
34434	printf "using default settings.\n"
34435fi
34436
34437printf "\n"
34438printf "Configuration summary:\n"
34439printf "* Debug level:    $DEBUG_LEVEL\n"
34440printf "* JDK variant:    $JDK_VARIANT\n"
34441printf "* JVM variants:   $with_jvm_variants\n"
34442printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34443
34444printf "\n"
34445printf "Tools summary:\n"
34446if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34447  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34448fi
34449printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34450printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34451printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34452
34453printf "\n"
34454printf "Build performance summary:\n"
34455printf "* Cores to use:   $JOBS\n"
34456printf "* Memory limit:   $MEMORY_SIZE MB\n"
34457printf "* ccache status:  $CCACHE_STATUS\n"
34458printf "\n"
34459
34460if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34461	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34462	printf "$CCACHE_HELP_MSG\n"
34463
34464    # Print a helpful message on how to acquire the necessary build dependency.
34465    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34466    MISSING_DEPENDENCY=ccache
34467    PKGHANDLER_COMMAND=
34468
34469    case $PKGHANDLER in
34470	apt-get)
34471                apt_help     $MISSING_DEPENDENCY ;;
34472    yum)
34473                yum_help     $MISSING_DEPENDENCY ;;
34474	port)
34475                port_help    $MISSING_DEPENDENCY ;;
34476	pkgutil)
34477                pkgutil_help $MISSING_DEPENDENCY ;;
34478	pkgadd)
34479                pkgadd_help  $MISSING_DEPENDENCY ;;
34480    * )
34481      break ;;
34482    esac
34483
34484    if test "x$PKGHANDLER_COMMAND" != x; then
34485        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34486    fi
34487
34488	printf "$HELP_MSG\n"
34489	printf "\n"
34490fi
34491
34492if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34493	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34494	printf "will result in longer build times.\n"
34495	printf "\n"
34496fi
34497
34498if test "x$FOUND_ALT_VARIABLES" != "x"; then
34499	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34500	printf "These are not respected, and will be ignored. It is recommended\n"
34501	printf "that you clean your environment. The following variables are set:\n"
34502	printf "$FOUND_ALT_VARIABLES\n"
34503	printf "\n"
34504fi
34505
34506if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34507	printf "WARNING: Your build output directory is not on a local disk.\n"
34508	printf "This will severely degrade build performance!\n"
34509	printf "It is recommended that you create an output directory on a local disk,\n"
34510	printf "and run the configure script again from that directory.\n"
34511	printf "\n"
34512fi
34513
34514if test "x$IS_RECONFIGURE" = "xyes"; then
34515	printf "WARNING: The result of this configuration has overridden an older\n"
34516	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34517	printf "proper build. Failure to do so might result in strange build problems.\n"
34518	printf "\n"
34519fi
34520
34521