generated-configure.sh revision 492:e64f2cb57d05
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
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718ac_ct_PROPER_COMPILER_CC
719PROPER_COMPILER_CC
720POTENTIAL_CC
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724MSVCR_DLL
725VS_PATH
726VS_LIB
727VS_INCLUDE
728CYGWIN_LINK
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733BUILD_OUTPUT
734OVERRIDE_SRC_ROOT
735ADD_SRC_ROOT
736JDK_TOPDIR
737HOTSPOT_TOPDIR
738JAXWS_TOPDIR
739JAXP_TOPDIR
740CORBA_TOPDIR
741LANGTOOLS_TOPDIR
742BOOT_JDK_JVMARGS
743JAVAC_FLAGS
744BOOT_JDK_SOURCETARGET
745BOOT_JDK
746BOOT_TOOLSJAR
747BOOT_RTJAR
748JAVA_CHECK
749JAVAC_CHECK
750COOKED_BUILD_NUMBER
751FULL_VERSION
752RELEASE
753JDK_VERSION
754RUNTIME_NAME
755COPYRIGHT_YEAR
756MACOSX_BUNDLE_ID_BASE
757MACOSX_BUNDLE_NAME_BASE
758COMPANY_NAME
759JDK_RC_PLATFORM_NAME
760PRODUCT_SUFFIX
761PRODUCT_NAME
762LAUNCHER_NAME
763MILESTONE
764JDK_BUILD_NUMBER
765JDK_UPDATE_VERSION
766JDK_MICRO_VERSION
767JDK_MINOR_VERSION
768JDK_MAJOR_VERSION
769COMPRESS_JARS
770CACERTS_FILE
771TEST_IN_BUILD
772BUILD_HEADLESS
773SUPPORT_HEADFUL
774SUPPORT_HEADLESS
775SET_OPENJDK
776BDEPS_FTP
777BDEPS_UNZIP
778OS_VERSION_MICRO
779OS_VERSION_MINOR
780OS_VERSION_MAJOR
781PKG_CONFIG
782COMM
783TIME
784STAT
785HG
786READELF
787OTOOL
788LDD
789ZIP
790UNZIP
791FIND_DELETE
792MAKE
793CHECK_TOOLSDIR_MAKE
794CHECK_TOOLSDIR_GMAKE
795CHECK_MAKE
796CHECK_GMAKE
797PKGHANDLER
798OUTPUT_ROOT
799CONF_NAME
800SPEC
801BUILD_VARIANT_RELEASE
802DEBUG_CLASSFILES
803FASTDEBUG
804VARIANT
805DEBUG_LEVEL
806MACOSX_UNIVERSAL
807JVM_VARIANT_ZEROSHARK
808JVM_VARIANT_ZERO
809JVM_VARIANT_KERNEL
810JVM_VARIANT_CLIENT
811JVM_VARIANT_SERVER
812JVM_VARIANTS
813JDK_VARIANT
814BUILD_LOG_WRAPPER
815BUILD_LOG_PREVIOUS
816BUILD_LOG
817SYS_ROOT
818PATH_SEP
819SRC_ROOT
820DEFINE_CROSS_COMPILE_ARCH
821LP64
822OPENJDK_TARGET_OS_API_DIR
823OPENJDK_TARGET_CPU_JLI_CFLAGS
824OPENJDK_TARGET_CPU_OSARCH
825OPENJDK_TARGET_CPU_ISADIR
826OPENJDK_TARGET_CPU_LIBDIR
827OPENJDK_TARGET_CPU_LEGACY_LIB
828OPENJDK_TARGET_CPU_LEGACY
829REQUIRED_OS_VERSION
830REQUIRED_OS_NAME
831COMPILE_TYPE
832OPENJDK_TARGET_CPU_ENDIAN
833OPENJDK_TARGET_CPU_BITS
834OPENJDK_TARGET_CPU_ARCH
835OPENJDK_TARGET_CPU
836OPENJDK_TARGET_OS_API
837OPENJDK_TARGET_OS
838OPENJDK_BUILD_CPU_ENDIAN
839OPENJDK_BUILD_CPU_BITS
840OPENJDK_BUILD_CPU_ARCH
841OPENJDK_BUILD_CPU
842OPENJDK_BUILD_OS_API
843OPENJDK_BUILD_OS
844OPENJDK_BUILD_AUTOCONF_NAME
845OPENJDK_TARGET_AUTOCONF_NAME
846target_os
847target_vendor
848target_cpu
849target
850host_os
851host_vendor
852host_cpu
853host
854build_os
855build_vendor
856build_cpu
857build
858SETFILE
859DF
860READLINK
861CYGPATH
862NAWK
863SED
864FGREP
865EGREP
866GREP
867AWK
868XARGS
869WHICH
870WC
871UNIQ
872UNAME
873TR
874TOUCH
875TEE
876TAR
877TAIL
878SORT
879SH
880RM
881THEPWDCMD
882PRINTF
883MV
884MKTEMP
885MKDIR
886LS
887LN
888HEAD
889FIND
890FILE
891EXPR
892ECHO
893DIRNAME
894DIFF
895DATE
896CUT
897CP
898CMP
899CHMOD
900CAT
901BASH
902BASENAME
903DATE_WHEN_CONFIGURED
904CONFIGURE_COMMAND_LINE
905CUSTOM_MAKE_DIR
906target_alias
907host_alias
908build_alias
909LIBS
910ECHO_T
911ECHO_N
912ECHO_C
913DEFS
914mandir
915localedir
916libdir
917psdir
918pdfdir
919dvidir
920htmldir
921infodir
922docdir
923oldincludedir
924includedir
925localstatedir
926sharedstatedir
927sysconfdir
928datadir
929datarootdir
930libexecdir
931sbindir
932bindir
933program_transform_name
934prefix
935exec_prefix
936PACKAGE_URL
937PACKAGE_BUGREPORT
938PACKAGE_STRING
939PACKAGE_VERSION
940PACKAGE_TARNAME
941PACKAGE_NAME
942PATH_SEPARATOR
943SHELL'
944ac_subst_files=''
945ac_user_opts='
946enable_option_checking
947with_custom_make_dir
948with_target_bits
949with_sys_root
950with_tools_dir
951with_devkit
952with_jdk_variant
953with_jvm_variants
954enable_debug
955with_debug_level
956with_conf_name
957with_builddeps_conf
958with_builddeps_server
959with_builddeps_dir
960with_builddeps_group
961enable_openjdk_only
962enable_headful
963enable_hotspot_test_in_build
964with_cacerts_file
965with_boot_jdk
966with_boot_jdk_jvmargs
967with_add_source_root
968with_override_source_root
969with_adds_and_overrides
970with_override_langtools
971with_override_corba
972with_override_jaxp
973with_override_jaxws
974with_override_hotspot
975with_override_jdk
976with_msvcr_dll
977with_extra_cflags
978with_extra_cxxflags
979with_extra_ldflags
980enable_debug_symbols
981enable_zip_debug_info
982enable_macosx_runtime_support
983with_x
984with_cups
985with_cups_include
986with_freetype
987with_alsa
988with_alsa_include
989with_alsa_lib
990with_zlib
991enable_static_link_stdc__
992with_num_cores
993with_memory_size
994with_sjavac_server_java
995with_sjavac_server_cores
996enable_sjavac
997enable_precompiled_headers
998enable_ccache
999with_ccache_dir
1000'
1001      ac_precious_vars='build_alias
1002host_alias
1003target_alias
1004PKG_CONFIG
1005CC
1006CFLAGS
1007LDFLAGS
1008LIBS
1009CPPFLAGS
1010CXX
1011CXXFLAGS
1012CCC
1013OBJC
1014OBJCFLAGS
1015CPP
1016CXXCPP
1017XMKMF
1018FREETYPE2_CFLAGS
1019FREETYPE2_LIBS
1020ALSA_CFLAGS
1021ALSA_LIBS'
1022
1023
1024# Initialize some variables set by options.
1025ac_init_help=
1026ac_init_version=false
1027ac_unrecognized_opts=
1028ac_unrecognized_sep=
1029# The variables have the same names as the options, with
1030# dashes changed to underlines.
1031cache_file=/dev/null
1032exec_prefix=NONE
1033no_create=
1034no_recursion=
1035prefix=NONE
1036program_prefix=NONE
1037program_suffix=NONE
1038program_transform_name=s,x,x,
1039silent=
1040site=
1041srcdir=
1042verbose=
1043x_includes=NONE
1044x_libraries=NONE
1045
1046# Installation directory options.
1047# These are left unexpanded so users can "make install exec_prefix=/foo"
1048# and all the variables that are supposed to be based on exec_prefix
1049# by default will actually change.
1050# Use braces instead of parens because sh, perl, etc. also accept them.
1051# (The list follows the same order as the GNU Coding Standards.)
1052bindir='${exec_prefix}/bin'
1053sbindir='${exec_prefix}/sbin'
1054libexecdir='${exec_prefix}/libexec'
1055datarootdir='${prefix}/share'
1056datadir='${datarootdir}'
1057sysconfdir='${prefix}/etc'
1058sharedstatedir='${prefix}/com'
1059localstatedir='${prefix}/var'
1060includedir='${prefix}/include'
1061oldincludedir='/usr/include'
1062docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1063infodir='${datarootdir}/info'
1064htmldir='${docdir}'
1065dvidir='${docdir}'
1066pdfdir='${docdir}'
1067psdir='${docdir}'
1068libdir='${exec_prefix}/lib'
1069localedir='${datarootdir}/locale'
1070mandir='${datarootdir}/man'
1071
1072ac_prev=
1073ac_dashdash=
1074for ac_option
1075do
1076  # If the previous option needs an argument, assign it.
1077  if test -n "$ac_prev"; then
1078    eval $ac_prev=\$ac_option
1079    ac_prev=
1080    continue
1081  fi
1082
1083  case $ac_option in
1084  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1085  *=)   ac_optarg= ;;
1086  *)    ac_optarg=yes ;;
1087  esac
1088
1089  # Accept the important Cygnus configure options, so we can diagnose typos.
1090
1091  case $ac_dashdash$ac_option in
1092  --)
1093    ac_dashdash=yes ;;
1094
1095  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1096    ac_prev=bindir ;;
1097  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1098    bindir=$ac_optarg ;;
1099
1100  -build | --build | --buil | --bui | --bu)
1101    ac_prev=build_alias ;;
1102  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1103    build_alias=$ac_optarg ;;
1104
1105  -cache-file | --cache-file | --cache-fil | --cache-fi \
1106  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1107    ac_prev=cache_file ;;
1108  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1109  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1110    cache_file=$ac_optarg ;;
1111
1112  --config-cache | -C)
1113    cache_file=config.cache ;;
1114
1115  -datadir | --datadir | --datadi | --datad)
1116    ac_prev=datadir ;;
1117  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1118    datadir=$ac_optarg ;;
1119
1120  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1121  | --dataroo | --dataro | --datar)
1122    ac_prev=datarootdir ;;
1123  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1124  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1125    datarootdir=$ac_optarg ;;
1126
1127  -disable-* | --disable-*)
1128    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1129    # Reject names that are not valid shell variable names.
1130    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1131      as_fn_error $? "invalid feature name: $ac_useropt"
1132    ac_useropt_orig=$ac_useropt
1133    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1134    case $ac_user_opts in
1135      *"
1136"enable_$ac_useropt"
1137"*) ;;
1138      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1139	 ac_unrecognized_sep=', ';;
1140    esac
1141    eval enable_$ac_useropt=no ;;
1142
1143  -docdir | --docdir | --docdi | --doc | --do)
1144    ac_prev=docdir ;;
1145  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1146    docdir=$ac_optarg ;;
1147
1148  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1149    ac_prev=dvidir ;;
1150  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1151    dvidir=$ac_optarg ;;
1152
1153  -enable-* | --enable-*)
1154    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1155    # Reject names that are not valid shell variable names.
1156    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1157      as_fn_error $? "invalid feature name: $ac_useropt"
1158    ac_useropt_orig=$ac_useropt
1159    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160    case $ac_user_opts in
1161      *"
1162"enable_$ac_useropt"
1163"*) ;;
1164      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1165	 ac_unrecognized_sep=', ';;
1166    esac
1167    eval enable_$ac_useropt=\$ac_optarg ;;
1168
1169  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1170  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1171  | --exec | --exe | --ex)
1172    ac_prev=exec_prefix ;;
1173  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1174  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1175  | --exec=* | --exe=* | --ex=*)
1176    exec_prefix=$ac_optarg ;;
1177
1178  -gas | --gas | --ga | --g)
1179    # Obsolete; use --with-gas.
1180    with_gas=yes ;;
1181
1182  -help | --help | --hel | --he | -h)
1183    ac_init_help=long ;;
1184  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1185    ac_init_help=recursive ;;
1186  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1187    ac_init_help=short ;;
1188
1189  -host | --host | --hos | --ho)
1190    ac_prev=host_alias ;;
1191  -host=* | --host=* | --hos=* | --ho=*)
1192    host_alias=$ac_optarg ;;
1193
1194  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1195    ac_prev=htmldir ;;
1196  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1197  | --ht=*)
1198    htmldir=$ac_optarg ;;
1199
1200  -includedir | --includedir | --includedi | --included | --include \
1201  | --includ | --inclu | --incl | --inc)
1202    ac_prev=includedir ;;
1203  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1204  | --includ=* | --inclu=* | --incl=* | --inc=*)
1205    includedir=$ac_optarg ;;
1206
1207  -infodir | --infodir | --infodi | --infod | --info | --inf)
1208    ac_prev=infodir ;;
1209  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1210    infodir=$ac_optarg ;;
1211
1212  -libdir | --libdir | --libdi | --libd)
1213    ac_prev=libdir ;;
1214  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1215    libdir=$ac_optarg ;;
1216
1217  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1218  | --libexe | --libex | --libe)
1219    ac_prev=libexecdir ;;
1220  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1221  | --libexe=* | --libex=* | --libe=*)
1222    libexecdir=$ac_optarg ;;
1223
1224  -localedir | --localedir | --localedi | --localed | --locale)
1225    ac_prev=localedir ;;
1226  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1227    localedir=$ac_optarg ;;
1228
1229  -localstatedir | --localstatedir | --localstatedi | --localstated \
1230  | --localstate | --localstat | --localsta | --localst | --locals)
1231    ac_prev=localstatedir ;;
1232  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1233  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1234    localstatedir=$ac_optarg ;;
1235
1236  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1237    ac_prev=mandir ;;
1238  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1239    mandir=$ac_optarg ;;
1240
1241  -nfp | --nfp | --nf)
1242    # Obsolete; use --without-fp.
1243    with_fp=no ;;
1244
1245  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1246  | --no-cr | --no-c | -n)
1247    no_create=yes ;;
1248
1249  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1250  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1251    no_recursion=yes ;;
1252
1253  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1254  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1255  | --oldin | --oldi | --old | --ol | --o)
1256    ac_prev=oldincludedir ;;
1257  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1258  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1259  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1260    oldincludedir=$ac_optarg ;;
1261
1262  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1263    ac_prev=prefix ;;
1264  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1265    prefix=$ac_optarg ;;
1266
1267  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1268  | --program-pre | --program-pr | --program-p)
1269    ac_prev=program_prefix ;;
1270  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1271  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1272    program_prefix=$ac_optarg ;;
1273
1274  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1275  | --program-suf | --program-su | --program-s)
1276    ac_prev=program_suffix ;;
1277  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1278  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1279    program_suffix=$ac_optarg ;;
1280
1281  -program-transform-name | --program-transform-name \
1282  | --program-transform-nam | --program-transform-na \
1283  | --program-transform-n | --program-transform- \
1284  | --program-transform | --program-transfor \
1285  | --program-transfo | --program-transf \
1286  | --program-trans | --program-tran \
1287  | --progr-tra | --program-tr | --program-t)
1288    ac_prev=program_transform_name ;;
1289  -program-transform-name=* | --program-transform-name=* \
1290  | --program-transform-nam=* | --program-transform-na=* \
1291  | --program-transform-n=* | --program-transform-=* \
1292  | --program-transform=* | --program-transfor=* \
1293  | --program-transfo=* | --program-transf=* \
1294  | --program-trans=* | --program-tran=* \
1295  | --progr-tra=* | --program-tr=* | --program-t=*)
1296    program_transform_name=$ac_optarg ;;
1297
1298  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1299    ac_prev=pdfdir ;;
1300  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1301    pdfdir=$ac_optarg ;;
1302
1303  -psdir | --psdir | --psdi | --psd | --ps)
1304    ac_prev=psdir ;;
1305  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1306    psdir=$ac_optarg ;;
1307
1308  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1309  | -silent | --silent | --silen | --sile | --sil)
1310    silent=yes ;;
1311
1312  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1313    ac_prev=sbindir ;;
1314  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1315  | --sbi=* | --sb=*)
1316    sbindir=$ac_optarg ;;
1317
1318  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1319  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1320  | --sharedst | --shareds | --shared | --share | --shar \
1321  | --sha | --sh)
1322    ac_prev=sharedstatedir ;;
1323  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1324  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1325  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1326  | --sha=* | --sh=*)
1327    sharedstatedir=$ac_optarg ;;
1328
1329  -site | --site | --sit)
1330    ac_prev=site ;;
1331  -site=* | --site=* | --sit=*)
1332    site=$ac_optarg ;;
1333
1334  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1335    ac_prev=srcdir ;;
1336  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1337    srcdir=$ac_optarg ;;
1338
1339  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1340  | --syscon | --sysco | --sysc | --sys | --sy)
1341    ac_prev=sysconfdir ;;
1342  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1343  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1344    sysconfdir=$ac_optarg ;;
1345
1346  -target | --target | --targe | --targ | --tar | --ta | --t)
1347    ac_prev=target_alias ;;
1348  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1349    target_alias=$ac_optarg ;;
1350
1351  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1352    verbose=yes ;;
1353
1354  -version | --version | --versio | --versi | --vers | -V)
1355    ac_init_version=: ;;
1356
1357  -with-* | --with-*)
1358    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1359    # Reject names that are not valid shell variable names.
1360    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1361      as_fn_error $? "invalid package name: $ac_useropt"
1362    ac_useropt_orig=$ac_useropt
1363    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1364    case $ac_user_opts in
1365      *"
1366"with_$ac_useropt"
1367"*) ;;
1368      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1369	 ac_unrecognized_sep=', ';;
1370    esac
1371    eval with_$ac_useropt=\$ac_optarg ;;
1372
1373  -without-* | --without-*)
1374    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1375    # Reject names that are not valid shell variable names.
1376    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1377      as_fn_error $? "invalid package name: $ac_useropt"
1378    ac_useropt_orig=$ac_useropt
1379    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1380    case $ac_user_opts in
1381      *"
1382"with_$ac_useropt"
1383"*) ;;
1384      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1385	 ac_unrecognized_sep=', ';;
1386    esac
1387    eval with_$ac_useropt=no ;;
1388
1389  --x)
1390    # Obsolete; use --with-x.
1391    with_x=yes ;;
1392
1393  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1394  | --x-incl | --x-inc | --x-in | --x-i)
1395    ac_prev=x_includes ;;
1396  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1397  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1398    x_includes=$ac_optarg ;;
1399
1400  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1401  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1402    ac_prev=x_libraries ;;
1403  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1404  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1405    x_libraries=$ac_optarg ;;
1406
1407  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1408Try \`$0 --help' for more information"
1409    ;;
1410
1411  *=*)
1412    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1413    # Reject names that are not valid shell variable names.
1414    case $ac_envvar in #(
1415      '' | [0-9]* | *[!_$as_cr_alnum]* )
1416      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1417    esac
1418    eval $ac_envvar=\$ac_optarg
1419    export $ac_envvar ;;
1420
1421  *)
1422    # FIXME: should be removed in autoconf 3.0.
1423    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1424    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1425      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1426    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1427    ;;
1428
1429  esac
1430done
1431
1432if test -n "$ac_prev"; then
1433  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1434  as_fn_error $? "missing argument to $ac_option"
1435fi
1436
1437if test -n "$ac_unrecognized_opts"; then
1438  case $enable_option_checking in
1439    no) ;;
1440    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1441    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1442  esac
1443fi
1444
1445# Check all directory arguments for consistency.
1446for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1447		datadir sysconfdir sharedstatedir localstatedir includedir \
1448		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1449		libdir localedir mandir
1450do
1451  eval ac_val=\$$ac_var
1452  # Remove trailing slashes.
1453  case $ac_val in
1454    */ )
1455      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1456      eval $ac_var=\$ac_val;;
1457  esac
1458  # Be sure to have absolute directory names.
1459  case $ac_val in
1460    [\\/$]* | ?:[\\/]* )  continue;;
1461    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1462  esac
1463  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1464done
1465
1466# There might be people who depend on the old broken behavior: `$host'
1467# used to hold the argument of --host etc.
1468# FIXME: To remove some day.
1469build=$build_alias
1470host=$host_alias
1471target=$target_alias
1472
1473# FIXME: To remove some day.
1474if test "x$host_alias" != x; then
1475  if test "x$build_alias" = x; then
1476    cross_compiling=maybe
1477    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1478    If a cross compiler is detected then cross compile mode will be used" >&2
1479  elif test "x$build_alias" != "x$host_alias"; then
1480    cross_compiling=yes
1481  fi
1482fi
1483
1484ac_tool_prefix=
1485test -n "$host_alias" && ac_tool_prefix=$host_alias-
1486
1487test "$silent" = yes && exec 6>/dev/null
1488
1489
1490ac_pwd=`pwd` && test -n "$ac_pwd" &&
1491ac_ls_di=`ls -di .` &&
1492ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1493  as_fn_error $? "working directory cannot be determined"
1494test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1495  as_fn_error $? "pwd does not report name of working directory"
1496
1497
1498# Find the source files, if location was not specified.
1499if test -z "$srcdir"; then
1500  ac_srcdir_defaulted=yes
1501  # Try the directory containing this script, then the parent directory.
1502  ac_confdir=`$as_dirname -- "$as_myself" ||
1503$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1504	 X"$as_myself" : 'X\(//\)[^/]' \| \
1505	 X"$as_myself" : 'X\(//\)$' \| \
1506	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1507$as_echo X"$as_myself" |
1508    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1509	    s//\1/
1510	    q
1511	  }
1512	  /^X\(\/\/\)[^/].*/{
1513	    s//\1/
1514	    q
1515	  }
1516	  /^X\(\/\/\)$/{
1517	    s//\1/
1518	    q
1519	  }
1520	  /^X\(\/\).*/{
1521	    s//\1/
1522	    q
1523	  }
1524	  s/.*/./; q'`
1525  srcdir=$ac_confdir
1526  if test ! -r "$srcdir/$ac_unique_file"; then
1527    srcdir=..
1528  fi
1529else
1530  ac_srcdir_defaulted=no
1531fi
1532if test ! -r "$srcdir/$ac_unique_file"; then
1533  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1534  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1535fi
1536ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1537ac_abs_confdir=`(
1538	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1539	pwd)`
1540# When building in place, set srcdir=.
1541if test "$ac_abs_confdir" = "$ac_pwd"; then
1542  srcdir=.
1543fi
1544# Remove unnecessary trailing slashes from srcdir.
1545# Double slashes in file names in object file debugging info
1546# mess up M-x gdb in Emacs.
1547case $srcdir in
1548*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1549esac
1550for ac_var in $ac_precious_vars; do
1551  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1552  eval ac_env_${ac_var}_value=\$${ac_var}
1553  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1554  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1555done
1556
1557#
1558# Report the --help message.
1559#
1560if test "$ac_init_help" = "long"; then
1561  # Omit some internal or obsolete options to make the list less imposing.
1562  # This message is too long to be a string in the A/UX 3.1 sh.
1563  cat <<_ACEOF
1564\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1565
1566Usage: $0 [OPTION]... [VAR=VALUE]...
1567
1568To assign environment variables (e.g., CC, CFLAGS...), specify them as
1569VAR=VALUE.  See below for descriptions of some of the useful variables.
1570
1571Defaults for the options are specified in brackets.
1572
1573Configuration:
1574  -h, --help              display this help and exit
1575      --help=short        display options specific to this package
1576      --help=recursive    display the short help of all the included packages
1577  -V, --version           display version information and exit
1578  -q, --quiet, --silent   do not print \`checking ...' messages
1579      --cache-file=FILE   cache test results in FILE [disabled]
1580  -C, --config-cache      alias for \`--cache-file=config.cache'
1581  -n, --no-create         do not create output files
1582      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1583
1584Installation directories:
1585  --prefix=PREFIX         install architecture-independent files in PREFIX
1586                          [$ac_default_prefix]
1587  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1588                          [PREFIX]
1589
1590By default, \`make install' will install all the files in
1591\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1592an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1593for instance \`--prefix=\$HOME'.
1594
1595For better control, use the options below.
1596
1597Fine tuning of the installation directories:
1598  --bindir=DIR            user executables [EPREFIX/bin]
1599  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1600  --libexecdir=DIR        program executables [EPREFIX/libexec]
1601  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1602  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1603  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1604  --libdir=DIR            object code libraries [EPREFIX/lib]
1605  --includedir=DIR        C header files [PREFIX/include]
1606  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1607  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1608  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1609  --infodir=DIR           info documentation [DATAROOTDIR/info]
1610  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1611  --mandir=DIR            man documentation [DATAROOTDIR/man]
1612  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1613  --htmldir=DIR           html documentation [DOCDIR]
1614  --dvidir=DIR            dvi documentation [DOCDIR]
1615  --pdfdir=DIR            pdf documentation [DOCDIR]
1616  --psdir=DIR             ps documentation [DOCDIR]
1617_ACEOF
1618
1619  cat <<\_ACEOF
1620
1621X features:
1622  --x-includes=DIR    X include files are in DIR
1623  --x-libraries=DIR   X library files are in DIR
1624
1625System types:
1626  --build=BUILD     configure for building on BUILD [guessed]
1627  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1628  --target=TARGET   configure for building compilers for TARGET [HOST]
1629_ACEOF
1630fi
1631
1632if test -n "$ac_init_help"; then
1633  case $ac_init_help in
1634     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1635   esac
1636  cat <<\_ACEOF
1637
1638Optional Features:
1639  --disable-option-checking  ignore unrecognized --enable/--with options
1640  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1641  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1642  --enable-debug          set the debug level to fastdebug (shorthand for
1643                          --with-debug-level=fastdebug) [disabled]
1644  --enable-openjdk-only   supress building closed source even if present
1645                          [disabled]
1646  --disable-headful       disable building headful support (graphical UI
1647                          support) [enabled]
1648  --enable-hotspot-test-in-build
1649                          run the Queens test after Hotspot build [disabled]
1650  --disable-debug-symbols disable generation of debug symbols [enabled]
1651  --disable-zip-debug-info
1652                          disable zipping of debug-info files [enabled]
1653  --disable-macosx-runtime-support
1654                          disable the use of MacOSX Java runtime support
1655                          framework [enabled]
1656  --disable-static-link-stdc++
1657                          disable static linking of the C++ runtime on Linux
1658                          [enabled]
1659  --enable-sjavac         use sjavac to do fast incremental compiles
1660                          [disabled]
1661  --disable-precompiled-headers
1662                          disable using precompiled headers when compiling C++
1663                          [enabled]
1664  --disable-ccache        disable using ccache to speed up recompilations
1665                          [enabled]
1666
1667Optional Packages:
1668  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1669  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1670  --with-custom-make-dir  use this directory for custom build/make files
1671  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1672                          support it), e.g. --with-target-bits=32 [guessed]
1673  --with-sys-root         pass this sys-root to the compilers and tools (for
1674                          cross-compiling)
1675  --with-tools-dir        search this directory for compilers and tools (for
1676                          cross-compiling)
1677  --with-devkit           use this directory as base for tools-dir and
1678                          sys-root (for cross-compiling)
1679  --with-jdk-variant      JDK variant to build (normal) [normal]
1680  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1681                          client, kernel, zero, zeroshark) [server]
1682  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1683                          [release]
1684  --with-conf-name        use this as the name of the configuration [generated
1685                          from important configuration options]
1686  --with-builddeps-conf   use this configuration file for the builddeps
1687  --with-builddeps-server download and use build dependencies from this server
1688                          url
1689  --with-builddeps-dir    store downloaded build dependencies here
1690                          [/localhome/builddeps]
1691  --with-builddeps-group  chgrp the downloaded build dependencies to this
1692                          group
1693  --with-cacerts-file     specify alternative cacerts file
1694  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1695  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1696                          invocations of the Boot JDK, overriding the default
1697                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1698                          -enableassertions"
1699  --with-add-source-root  for each and every source directory, look in this
1700                          additional source root for the same directory; if it
1701                          exists and have files in it, include it in the build
1702  --with-override-source-root
1703                          for each and every source directory, look in this
1704                          override source root for the same directory; if it
1705                          exists, use that directory instead and ignore the
1706                          directory in the original source root
1707  --with-adds-and-overrides
1708                          use the subdirs 'adds' and 'overrides' in the
1709                          specified directory as add-source-root and
1710                          override-source-root
1711  --with-override-langtools
1712                          use this langtools dir for the build
1713  --with-override-corba   use this corba dir for the build
1714  --with-override-jaxp    use this jaxp dir for the build
1715  --with-override-jaxws   use this jaxws dir for the build
1716  --with-override-hotspot use this hotspot dir for the build
1717  --with-override-jdk     use this jdk dir for the build
1718  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1719                          only) [probed]
1720  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1721  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1722  --with-extra-ldflags    extra flags to be used when linking jdk
1723  --with-x                use the X Window System
1724  --with-cups             specify prefix directory for the cups package
1725                          (expecting the headers under PATH/include)
1726  --with-cups-include     specify directory for the cups include files
1727  --with-freetype         specify prefix directory for the freetype2 package
1728                          (expecting the libraries under PATH/lib and the
1729                          headers under PATH/include)
1730  --with-alsa             specify prefix directory for the alsa package
1731                          (expecting the libraries under PATH/lib and the
1732                          headers under PATH/include)
1733  --with-alsa-include     specify directory for the alsa include files
1734  --with-alsa-lib         specify directory for the alsa library
1735  --with-zlib             use zlib from build system or OpenJDK source
1736                          (system, bundled) [bundled]
1737  --with-num-cores        number of cores in the build system, e.g.
1738                          --with-num-cores=8 [probed]
1739  --with-memory-size      memory (in MB) available in the build system, e.g.
1740                          --with-memory-size=1024 [probed]
1741  --with-sjavac-server-java
1742                          use this java binary for running the sjavac
1743                          background server [Boot JDK java]
1744  --with-sjavac-server-cores
1745                          use at most this number of concurrent threads on the
1746                          sjavac server [probed]
1747  --with-ccache-dir       where to store ccache files [~/.ccache]
1748
1749Some influential environment variables:
1750  PKG_CONFIG  path to pkg-config utility
1751  CC          C compiler command
1752  CFLAGS      C compiler flags
1753  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1754              nonstandard directory <lib dir>
1755  LIBS        libraries to pass to the linker, e.g. -l<library>
1756  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1757              you have headers in a nonstandard directory <include dir>
1758  CXX         C++ compiler command
1759  CXXFLAGS    C++ compiler flags
1760  OBJC        Objective C compiler command
1761  OBJCFLAGS   Objective C compiler flags
1762  CPP         C preprocessor
1763  CXXCPP      C++ preprocessor
1764  XMKMF       Path to xmkmf, Makefile generator for X Window System
1765  FREETYPE2_CFLAGS
1766              C compiler flags for FREETYPE2, overriding pkg-config
1767  FREETYPE2_LIBS
1768              linker flags for FREETYPE2, overriding pkg-config
1769  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1770  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1771
1772Use these variables to override the choices made by `configure' or to help
1773it to find libraries and programs with nonstandard names/locations.
1774
1775Report bugs to <build-dev@openjdk.java.net>.
1776OpenJDK home page: <http://openjdk.java.net>.
1777_ACEOF
1778ac_status=$?
1779fi
1780
1781if test "$ac_init_help" = "recursive"; then
1782  # If there are subdirs, report their specific --help.
1783  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1784    test -d "$ac_dir" ||
1785      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1786      continue
1787    ac_builddir=.
1788
1789case "$ac_dir" in
1790.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1791*)
1792  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1793  # A ".." for each directory in $ac_dir_suffix.
1794  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1795  case $ac_top_builddir_sub in
1796  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1797  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1798  esac ;;
1799esac
1800ac_abs_top_builddir=$ac_pwd
1801ac_abs_builddir=$ac_pwd$ac_dir_suffix
1802# for backward compatibility:
1803ac_top_builddir=$ac_top_build_prefix
1804
1805case $srcdir in
1806  .)  # We are building in place.
1807    ac_srcdir=.
1808    ac_top_srcdir=$ac_top_builddir_sub
1809    ac_abs_top_srcdir=$ac_pwd ;;
1810  [\\/]* | ?:[\\/]* )  # Absolute name.
1811    ac_srcdir=$srcdir$ac_dir_suffix;
1812    ac_top_srcdir=$srcdir
1813    ac_abs_top_srcdir=$srcdir ;;
1814  *) # Relative name.
1815    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1816    ac_top_srcdir=$ac_top_build_prefix$srcdir
1817    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1818esac
1819ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1820
1821    cd "$ac_dir" || { ac_status=$?; continue; }
1822    # Check for guested configure.
1823    if test -f "$ac_srcdir/configure.gnu"; then
1824      echo &&
1825      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1826    elif test -f "$ac_srcdir/configure"; then
1827      echo &&
1828      $SHELL "$ac_srcdir/configure" --help=recursive
1829    else
1830      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1831    fi || ac_status=$?
1832    cd "$ac_pwd" || { ac_status=$?; break; }
1833  done
1834fi
1835
1836test -n "$ac_init_help" && exit $ac_status
1837if $ac_init_version; then
1838  cat <<\_ACEOF
1839OpenJDK configure jdk8
1840generated by GNU Autoconf 2.67
1841
1842Copyright (C) 2010 Free Software Foundation, Inc.
1843This configure script is free software; the Free Software Foundation
1844gives unlimited permission to copy, distribute and modify it.
1845_ACEOF
1846  exit
1847fi
1848
1849## ------------------------ ##
1850## Autoconf initialization. ##
1851## ------------------------ ##
1852
1853# ac_fn_c_try_compile LINENO
1854# --------------------------
1855# Try to compile conftest.$ac_ext, and return whether this succeeded.
1856ac_fn_c_try_compile ()
1857{
1858  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859  rm -f conftest.$ac_objext
1860  if { { ac_try="$ac_compile"
1861case "(($ac_try" in
1862  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863  *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867  (eval "$ac_compile") 2>conftest.err
1868  ac_status=$?
1869  if test -s conftest.err; then
1870    grep -v '^ *+' conftest.err >conftest.er1
1871    cat conftest.er1 >&5
1872    mv -f conftest.er1 conftest.err
1873  fi
1874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1875  test $ac_status = 0; } && {
1876	 test -z "$ac_c_werror_flag" ||
1877	 test ! -s conftest.err
1878       } && test -s conftest.$ac_objext; then :
1879  ac_retval=0
1880else
1881  $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884	ac_retval=1
1885fi
1886  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1887  as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_compile
1890
1891# ac_fn_cxx_try_compile LINENO
1892# ----------------------------
1893# Try to compile conftest.$ac_ext, and return whether this succeeded.
1894ac_fn_cxx_try_compile ()
1895{
1896  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897  rm -f conftest.$ac_objext
1898  if { { ac_try="$ac_compile"
1899case "(($ac_try" in
1900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1901  *) ac_try_echo=$ac_try;;
1902esac
1903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1904$as_echo "$ac_try_echo"; } >&5
1905  (eval "$ac_compile") 2>conftest.err
1906  ac_status=$?
1907  if test -s conftest.err; then
1908    grep -v '^ *+' conftest.err >conftest.er1
1909    cat conftest.er1 >&5
1910    mv -f conftest.er1 conftest.err
1911  fi
1912  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1913  test $ac_status = 0; } && {
1914	 test -z "$ac_cxx_werror_flag" ||
1915	 test ! -s conftest.err
1916       } && test -s conftest.$ac_objext; then :
1917  ac_retval=0
1918else
1919  $as_echo "$as_me: failed program was:" >&5
1920sed 's/^/| /' conftest.$ac_ext >&5
1921
1922	ac_retval=1
1923fi
1924  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1925  as_fn_set_status $ac_retval
1926
1927} # ac_fn_cxx_try_compile
1928
1929# ac_fn_objc_try_compile LINENO
1930# -----------------------------
1931# Try to compile conftest.$ac_ext, and return whether this succeeded.
1932ac_fn_objc_try_compile ()
1933{
1934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935  rm -f conftest.$ac_objext
1936  if { { ac_try="$ac_compile"
1937case "(($ac_try" in
1938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1939  *) ac_try_echo=$ac_try;;
1940esac
1941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1942$as_echo "$ac_try_echo"; } >&5
1943  (eval "$ac_compile") 2>conftest.err
1944  ac_status=$?
1945  if test -s conftest.err; then
1946    grep -v '^ *+' conftest.err >conftest.er1
1947    cat conftest.er1 >&5
1948    mv -f conftest.er1 conftest.err
1949  fi
1950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1951  test $ac_status = 0; } && {
1952	 test -z "$ac_objc_werror_flag" ||
1953	 test ! -s conftest.err
1954       } && test -s conftest.$ac_objext; then :
1955  ac_retval=0
1956else
1957  $as_echo "$as_me: failed program was:" >&5
1958sed 's/^/| /' conftest.$ac_ext >&5
1959
1960	ac_retval=1
1961fi
1962  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1963  as_fn_set_status $ac_retval
1964
1965} # ac_fn_objc_try_compile
1966
1967# ac_fn_c_try_cpp LINENO
1968# ----------------------
1969# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1970ac_fn_c_try_cpp ()
1971{
1972  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973  if { { ac_try="$ac_cpp conftest.$ac_ext"
1974case "(($ac_try" in
1975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976  *) ac_try_echo=$ac_try;;
1977esac
1978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979$as_echo "$ac_try_echo"; } >&5
1980  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1981  ac_status=$?
1982  if test -s conftest.err; then
1983    grep -v '^ *+' conftest.err >conftest.er1
1984    cat conftest.er1 >&5
1985    mv -f conftest.er1 conftest.err
1986  fi
1987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988  test $ac_status = 0; } > conftest.i && {
1989	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1990	 test ! -s conftest.err
1991       }; then :
1992  ac_retval=0
1993else
1994  $as_echo "$as_me: failed program was:" >&5
1995sed 's/^/| /' conftest.$ac_ext >&5
1996
1997    ac_retval=1
1998fi
1999  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000  as_fn_set_status $ac_retval
2001
2002} # ac_fn_c_try_cpp
2003
2004# ac_fn_cxx_try_cpp LINENO
2005# ------------------------
2006# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2007ac_fn_cxx_try_cpp ()
2008{
2009  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010  if { { ac_try="$ac_cpp conftest.$ac_ext"
2011case "(($ac_try" in
2012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013  *) ac_try_echo=$ac_try;;
2014esac
2015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016$as_echo "$ac_try_echo"; } >&5
2017  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2018  ac_status=$?
2019  if test -s conftest.err; then
2020    grep -v '^ *+' conftest.err >conftest.er1
2021    cat conftest.er1 >&5
2022    mv -f conftest.er1 conftest.err
2023  fi
2024  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2025  test $ac_status = 0; } > conftest.i && {
2026	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2027	 test ! -s conftest.err
2028       }; then :
2029  ac_retval=0
2030else
2031  $as_echo "$as_me: failed program was:" >&5
2032sed 's/^/| /' conftest.$ac_ext >&5
2033
2034    ac_retval=1
2035fi
2036  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2037  as_fn_set_status $ac_retval
2038
2039} # ac_fn_cxx_try_cpp
2040
2041# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2042# ---------------------------------------------------------
2043# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2044# the include files in INCLUDES and setting the cache variable VAR
2045# accordingly.
2046ac_fn_cxx_check_header_mongrel ()
2047{
2048  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2049  if eval "test \"\${$3+set}\"" = set; then :
2050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2051$as_echo_n "checking for $2... " >&6; }
2052if eval "test \"\${$3+set}\"" = set; then :
2053  $as_echo_n "(cached) " >&6
2054fi
2055eval ac_res=\$$3
2056	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2057$as_echo "$ac_res" >&6; }
2058else
2059  # Is the header compilable?
2060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2061$as_echo_n "checking $2 usability... " >&6; }
2062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h.  */
2064$4
2065#include <$2>
2066_ACEOF
2067if ac_fn_cxx_try_compile "$LINENO"; then :
2068  ac_header_compiler=yes
2069else
2070  ac_header_compiler=no
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2074$as_echo "$ac_header_compiler" >&6; }
2075
2076# Is the header present?
2077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2078$as_echo_n "checking $2 presence... " >&6; }
2079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h.  */
2081#include <$2>
2082_ACEOF
2083if ac_fn_cxx_try_cpp "$LINENO"; then :
2084  ac_header_preproc=yes
2085else
2086  ac_header_preproc=no
2087fi
2088rm -f conftest.err conftest.i conftest.$ac_ext
2089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2090$as_echo "$ac_header_preproc" >&6; }
2091
2092# So?  What about this header?
2093case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2094  yes:no: )
2095    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2096$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2098$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2099    ;;
2100  no:yes:* )
2101    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2102$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2103    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2104$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2105    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2106$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2107    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2108$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2109    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2110$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2111( $as_echo "## ----------------------------------------- ##
2112## Report this to build-dev@openjdk.java.net ##
2113## ----------------------------------------- ##"
2114     ) | sed "s/^/$as_me: WARNING:     /" >&2
2115    ;;
2116esac
2117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2118$as_echo_n "checking for $2... " >&6; }
2119if eval "test \"\${$3+set}\"" = set; then :
2120  $as_echo_n "(cached) " >&6
2121else
2122  eval "$3=\$ac_header_compiler"
2123fi
2124eval ac_res=\$$3
2125	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2126$as_echo "$ac_res" >&6; }
2127fi
2128  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2129
2130} # ac_fn_cxx_check_header_mongrel
2131
2132# ac_fn_cxx_try_run LINENO
2133# ------------------------
2134# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2135# that executables *can* be run.
2136ac_fn_cxx_try_run ()
2137{
2138  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2139  if { { ac_try="$ac_link"
2140case "(($ac_try" in
2141  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2142  *) ac_try_echo=$ac_try;;
2143esac
2144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2145$as_echo "$ac_try_echo"; } >&5
2146  (eval "$ac_link") 2>&5
2147  ac_status=$?
2148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2149  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2150  { { case "(($ac_try" in
2151  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2152  *) ac_try_echo=$ac_try;;
2153esac
2154eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2155$as_echo "$ac_try_echo"; } >&5
2156  (eval "$ac_try") 2>&5
2157  ac_status=$?
2158  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2159  test $ac_status = 0; }; }; then :
2160  ac_retval=0
2161else
2162  $as_echo "$as_me: program exited with status $ac_status" >&5
2163       $as_echo "$as_me: failed program was:" >&5
2164sed 's/^/| /' conftest.$ac_ext >&5
2165
2166       ac_retval=$ac_status
2167fi
2168  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2169  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2170  as_fn_set_status $ac_retval
2171
2172} # ac_fn_cxx_try_run
2173
2174# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2175# ---------------------------------------------------------
2176# Tests whether HEADER exists and can be compiled using the include files in
2177# INCLUDES, setting the cache variable VAR accordingly.
2178ac_fn_cxx_check_header_compile ()
2179{
2180  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2182$as_echo_n "checking for $2... " >&6; }
2183if eval "test \"\${$3+set}\"" = set; then :
2184  $as_echo_n "(cached) " >&6
2185else
2186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h.  */
2188$4
2189#include <$2>
2190_ACEOF
2191if ac_fn_cxx_try_compile "$LINENO"; then :
2192  eval "$3=yes"
2193else
2194  eval "$3=no"
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197fi
2198eval ac_res=\$$3
2199	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2200$as_echo "$ac_res" >&6; }
2201  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2202
2203} # ac_fn_cxx_check_header_compile
2204
2205# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2206# ----------------------------------------------
2207# Tries to find the compile-time value of EXPR in a program that includes
2208# INCLUDES, setting VAR accordingly. Returns whether the value could be
2209# computed
2210ac_fn_cxx_compute_int ()
2211{
2212  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213  if test "$cross_compiling" = yes; then
2214    # Depending upon the size, compute the lo and hi bounds.
2215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h.  */
2217$4
2218int
2219main ()
2220{
2221static int test_array [1 - 2 * !(($2) >= 0)];
2222test_array [0] = 0
2223
2224  ;
2225  return 0;
2226}
2227_ACEOF
2228if ac_fn_cxx_try_compile "$LINENO"; then :
2229  ac_lo=0 ac_mid=0
2230  while :; do
2231    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h.  */
2233$4
2234int
2235main ()
2236{
2237static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2238test_array [0] = 0
2239
2240  ;
2241  return 0;
2242}
2243_ACEOF
2244if ac_fn_cxx_try_compile "$LINENO"; then :
2245  ac_hi=$ac_mid; break
2246else
2247  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2248			if test $ac_lo -le $ac_mid; then
2249			  ac_lo= ac_hi=
2250			  break
2251			fi
2252			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2253fi
2254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255  done
2256else
2257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258/* end confdefs.h.  */
2259$4
2260int
2261main ()
2262{
2263static int test_array [1 - 2 * !(($2) < 0)];
2264test_array [0] = 0
2265
2266  ;
2267  return 0;
2268}
2269_ACEOF
2270if ac_fn_cxx_try_compile "$LINENO"; then :
2271  ac_hi=-1 ac_mid=-1
2272  while :; do
2273    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276int
2277main ()
2278{
2279static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2280test_array [0] = 0
2281
2282  ;
2283  return 0;
2284}
2285_ACEOF
2286if ac_fn_cxx_try_compile "$LINENO"; then :
2287  ac_lo=$ac_mid; break
2288else
2289  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2290			if test $ac_mid -le $ac_hi; then
2291			  ac_lo= ac_hi=
2292			  break
2293			fi
2294			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297  done
2298else
2299  ac_lo= ac_hi=
2300fi
2301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302fi
2303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304# Binary search between lo and hi bounds.
2305while test "x$ac_lo" != "x$ac_hi"; do
2306  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h.  */
2309$4
2310int
2311main ()
2312{
2313static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2314test_array [0] = 0
2315
2316  ;
2317  return 0;
2318}
2319_ACEOF
2320if ac_fn_cxx_try_compile "$LINENO"; then :
2321  ac_hi=$ac_mid
2322else
2323  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326done
2327case $ac_lo in #((
2328?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2329'') ac_retval=1 ;;
2330esac
2331  else
2332    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h.  */
2334$4
2335static long int longval () { return $2; }
2336static unsigned long int ulongval () { return $2; }
2337#include <stdio.h>
2338#include <stdlib.h>
2339int
2340main ()
2341{
2342
2343  FILE *f = fopen ("conftest.val", "w");
2344  if (! f)
2345    return 1;
2346  if (($2) < 0)
2347    {
2348      long int i = longval ();
2349      if (i != ($2))
2350	return 1;
2351      fprintf (f, "%ld", i);
2352    }
2353  else
2354    {
2355      unsigned long int i = ulongval ();
2356      if (i != ($2))
2357	return 1;
2358      fprintf (f, "%lu", i);
2359    }
2360  /* Do not output a trailing newline, as this causes \r\n confusion
2361     on some platforms.  */
2362  return ferror (f) || fclose (f) != 0;
2363
2364  ;
2365  return 0;
2366}
2367_ACEOF
2368if ac_fn_cxx_try_run "$LINENO"; then :
2369  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2370else
2371  ac_retval=1
2372fi
2373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2374  conftest.$ac_objext conftest.beam conftest.$ac_ext
2375rm -f conftest.val
2376
2377  fi
2378  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2379  as_fn_set_status $ac_retval
2380
2381} # ac_fn_cxx_compute_int
2382
2383# ac_fn_cxx_try_link LINENO
2384# -------------------------
2385# Try to link conftest.$ac_ext, and return whether this succeeded.
2386ac_fn_cxx_try_link ()
2387{
2388  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2389  rm -f conftest.$ac_objext conftest$ac_exeext
2390  if { { ac_try="$ac_link"
2391case "(($ac_try" in
2392  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2393  *) ac_try_echo=$ac_try;;
2394esac
2395eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2396$as_echo "$ac_try_echo"; } >&5
2397  (eval "$ac_link") 2>conftest.err
2398  ac_status=$?
2399  if test -s conftest.err; then
2400    grep -v '^ *+' conftest.err >conftest.er1
2401    cat conftest.er1 >&5
2402    mv -f conftest.er1 conftest.err
2403  fi
2404  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2405  test $ac_status = 0; } && {
2406	 test -z "$ac_cxx_werror_flag" ||
2407	 test ! -s conftest.err
2408       } && test -s conftest$ac_exeext && {
2409	 test "$cross_compiling" = yes ||
2410	 $as_test_x conftest$ac_exeext
2411       }; then :
2412  ac_retval=0
2413else
2414  $as_echo "$as_me: failed program was:" >&5
2415sed 's/^/| /' conftest.$ac_ext >&5
2416
2417	ac_retval=1
2418fi
2419  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2420  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2421  # interfere with the next link command; also delete a directory that is
2422  # left behind by Apple's compiler.  We do this before executing the actions.
2423  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2424  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2425  as_fn_set_status $ac_retval
2426
2427} # ac_fn_cxx_try_link
2428
2429# ac_fn_cxx_check_func LINENO FUNC VAR
2430# ------------------------------------
2431# Tests whether FUNC exists, setting the cache variable VAR accordingly
2432ac_fn_cxx_check_func ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2436$as_echo_n "checking for $2... " >&6; }
2437if eval "test \"\${$3+set}\"" = set; then :
2438  $as_echo_n "(cached) " >&6
2439else
2440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h.  */
2442/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2443   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2444#define $2 innocuous_$2
2445
2446/* System header to define __stub macros and hopefully few prototypes,
2447    which can conflict with char $2 (); below.
2448    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2449    <limits.h> exists even on freestanding compilers.  */
2450
2451#ifdef __STDC__
2452# include <limits.h>
2453#else
2454# include <assert.h>
2455#endif
2456
2457#undef $2
2458
2459/* Override any GCC internal prototype to avoid an error.
2460   Use char because int might match the return type of a GCC
2461   builtin and then its argument prototype would still apply.  */
2462#ifdef __cplusplus
2463extern "C"
2464#endif
2465char $2 ();
2466/* The GNU C library defines this for functions which it implements
2467    to always fail with ENOSYS.  Some functions are actually named
2468    something starting with __ and the normal name is an alias.  */
2469#if defined __stub_$2 || defined __stub___$2
2470choke me
2471#endif
2472
2473int
2474main ()
2475{
2476return $2 ();
2477  ;
2478  return 0;
2479}
2480_ACEOF
2481if ac_fn_cxx_try_link "$LINENO"; then :
2482  eval "$3=yes"
2483else
2484  eval "$3=no"
2485fi
2486rm -f core conftest.err conftest.$ac_objext \
2487    conftest$ac_exeext conftest.$ac_ext
2488fi
2489eval ac_res=\$$3
2490	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2491$as_echo "$ac_res" >&6; }
2492  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2493
2494} # ac_fn_cxx_check_func
2495
2496# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2497# -------------------------------------------------------
2498# Tests whether HEADER exists and can be compiled using the include files in
2499# INCLUDES, setting the cache variable VAR accordingly.
2500ac_fn_c_check_header_compile ()
2501{
2502  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2504$as_echo_n "checking for $2... " >&6; }
2505if eval "test \"\${$3+set}\"" = set; then :
2506  $as_echo_n "(cached) " >&6
2507else
2508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509/* end confdefs.h.  */
2510$4
2511#include <$2>
2512_ACEOF
2513if ac_fn_c_try_compile "$LINENO"; then :
2514  eval "$3=yes"
2515else
2516  eval "$3=no"
2517fi
2518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2519fi
2520eval ac_res=\$$3
2521	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2522$as_echo "$ac_res" >&6; }
2523  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2524
2525} # ac_fn_c_check_header_compile
2526cat >config.log <<_ACEOF
2527This file contains any messages produced by compilers while
2528running configure, to aid debugging if configure makes a mistake.
2529
2530It was created by OpenJDK $as_me jdk8, which was
2531generated by GNU Autoconf 2.67.  Invocation command line was
2532
2533  $ $0 $@
2534
2535_ACEOF
2536exec 5>>config.log
2537{
2538cat <<_ASUNAME
2539## --------- ##
2540## Platform. ##
2541## --------- ##
2542
2543hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2544uname -m = `(uname -m) 2>/dev/null || echo unknown`
2545uname -r = `(uname -r) 2>/dev/null || echo unknown`
2546uname -s = `(uname -s) 2>/dev/null || echo unknown`
2547uname -v = `(uname -v) 2>/dev/null || echo unknown`
2548
2549/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2550/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2551
2552/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2553/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2554/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2555/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2556/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2557/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2558/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2559
2560_ASUNAME
2561
2562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2563for as_dir in $PATH
2564do
2565  IFS=$as_save_IFS
2566  test -z "$as_dir" && as_dir=.
2567    $as_echo "PATH: $as_dir"
2568  done
2569IFS=$as_save_IFS
2570
2571} >&5
2572
2573cat >&5 <<_ACEOF
2574
2575
2576## ----------- ##
2577## Core tests. ##
2578## ----------- ##
2579
2580_ACEOF
2581
2582
2583# Keep a trace of the command line.
2584# Strip out --no-create and --no-recursion so they do not pile up.
2585# Strip out --silent because we don't want to record it for future runs.
2586# Also quote any args containing shell meta-characters.
2587# Make two passes to allow for proper duplicate-argument suppression.
2588ac_configure_args=
2589ac_configure_args0=
2590ac_configure_args1=
2591ac_must_keep_next=false
2592for ac_pass in 1 2
2593do
2594  for ac_arg
2595  do
2596    case $ac_arg in
2597    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2598    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2599    | -silent | --silent | --silen | --sile | --sil)
2600      continue ;;
2601    *\'*)
2602      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2603    esac
2604    case $ac_pass in
2605    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2606    2)
2607      as_fn_append ac_configure_args1 " '$ac_arg'"
2608      if test $ac_must_keep_next = true; then
2609	ac_must_keep_next=false # Got value, back to normal.
2610      else
2611	case $ac_arg in
2612	  *=* | --config-cache | -C | -disable-* | --disable-* \
2613	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2614	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2615	  | -with-* | --with-* | -without-* | --without-* | --x)
2616	    case "$ac_configure_args0 " in
2617	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2618	    esac
2619	    ;;
2620	  -* ) ac_must_keep_next=true ;;
2621	esac
2622      fi
2623      as_fn_append ac_configure_args " '$ac_arg'"
2624      ;;
2625    esac
2626  done
2627done
2628{ ac_configure_args0=; unset ac_configure_args0;}
2629{ ac_configure_args1=; unset ac_configure_args1;}
2630
2631# When interrupted or exit'd, cleanup temporary files, and complete
2632# config.log.  We remove comments because anyway the quotes in there
2633# would cause problems or look ugly.
2634# WARNING: Use '\'' to represent an apostrophe within the trap.
2635# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2636trap 'exit_status=$?
2637  # Save into config.log some information that might help in debugging.
2638  {
2639    echo
2640
2641    $as_echo "## ---------------- ##
2642## Cache variables. ##
2643## ---------------- ##"
2644    echo
2645    # The following way of writing the cache mishandles newlines in values,
2646(
2647  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2648    eval ac_val=\$$ac_var
2649    case $ac_val in #(
2650    *${as_nl}*)
2651      case $ac_var in #(
2652      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2653$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2654      esac
2655      case $ac_var in #(
2656      _ | IFS | as_nl) ;; #(
2657      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2658      *) { eval $ac_var=; unset $ac_var;} ;;
2659      esac ;;
2660    esac
2661  done
2662  (set) 2>&1 |
2663    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2664    *${as_nl}ac_space=\ *)
2665      sed -n \
2666	"s/'\''/'\''\\\\'\'''\''/g;
2667	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2668      ;; #(
2669    *)
2670      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2671      ;;
2672    esac |
2673    sort
2674)
2675    echo
2676
2677    $as_echo "## ----------------- ##
2678## Output variables. ##
2679## ----------------- ##"
2680    echo
2681    for ac_var in $ac_subst_vars
2682    do
2683      eval ac_val=\$$ac_var
2684      case $ac_val in
2685      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2686      esac
2687      $as_echo "$ac_var='\''$ac_val'\''"
2688    done | sort
2689    echo
2690
2691    if test -n "$ac_subst_files"; then
2692      $as_echo "## ------------------- ##
2693## File substitutions. ##
2694## ------------------- ##"
2695      echo
2696      for ac_var in $ac_subst_files
2697      do
2698	eval ac_val=\$$ac_var
2699	case $ac_val in
2700	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2701	esac
2702	$as_echo "$ac_var='\''$ac_val'\''"
2703      done | sort
2704      echo
2705    fi
2706
2707    if test -s confdefs.h; then
2708      $as_echo "## ----------- ##
2709## confdefs.h. ##
2710## ----------- ##"
2711      echo
2712      cat confdefs.h
2713      echo
2714    fi
2715    test "$ac_signal" != 0 &&
2716      $as_echo "$as_me: caught signal $ac_signal"
2717    $as_echo "$as_me: exit $exit_status"
2718  } >&5
2719  rm -f core *.core core.conftest.* &&
2720    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2721    exit $exit_status
2722' 0
2723for ac_signal in 1 2 13 15; do
2724  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2725done
2726ac_signal=0
2727
2728# confdefs.h avoids OS command line length limits that DEFS can exceed.
2729rm -f -r conftest* confdefs.h
2730
2731$as_echo "/* confdefs.h */" > confdefs.h
2732
2733# Predefined preprocessor variables.
2734
2735cat >>confdefs.h <<_ACEOF
2736#define PACKAGE_NAME "$PACKAGE_NAME"
2737_ACEOF
2738
2739cat >>confdefs.h <<_ACEOF
2740#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2741_ACEOF
2742
2743cat >>confdefs.h <<_ACEOF
2744#define PACKAGE_VERSION "$PACKAGE_VERSION"
2745_ACEOF
2746
2747cat >>confdefs.h <<_ACEOF
2748#define PACKAGE_STRING "$PACKAGE_STRING"
2749_ACEOF
2750
2751cat >>confdefs.h <<_ACEOF
2752#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2753_ACEOF
2754
2755cat >>confdefs.h <<_ACEOF
2756#define PACKAGE_URL "$PACKAGE_URL"
2757_ACEOF
2758
2759
2760# Let the site file select an alternate cache file if it wants to.
2761# Prefer an explicitly selected file to automatically selected ones.
2762ac_site_file1=NONE
2763ac_site_file2=NONE
2764if test -n "$CONFIG_SITE"; then
2765  # We do not want a PATH search for config.site.
2766  case $CONFIG_SITE in #((
2767    -*)  ac_site_file1=./$CONFIG_SITE;;
2768    */*) ac_site_file1=$CONFIG_SITE;;
2769    *)   ac_site_file1=./$CONFIG_SITE;;
2770  esac
2771elif test "x$prefix" != xNONE; then
2772  ac_site_file1=$prefix/share/config.site
2773  ac_site_file2=$prefix/etc/config.site
2774else
2775  ac_site_file1=$ac_default_prefix/share/config.site
2776  ac_site_file2=$ac_default_prefix/etc/config.site
2777fi
2778for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2779do
2780  test "x$ac_site_file" = xNONE && continue
2781  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2782    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2783$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2784    sed 's/^/| /' "$ac_site_file" >&5
2785    . "$ac_site_file" \
2786      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2788as_fn_error $? "failed to load site script $ac_site_file
2789See \`config.log' for more details" "$LINENO" 5 ; }
2790  fi
2791done
2792
2793if test -r "$cache_file"; then
2794  # Some versions of bash will fail to source /dev/null (special files
2795  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2796  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2797    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2798$as_echo "$as_me: loading cache $cache_file" >&6;}
2799    case $cache_file in
2800      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2801      *)                      . "./$cache_file";;
2802    esac
2803  fi
2804else
2805  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2806$as_echo "$as_me: creating cache $cache_file" >&6;}
2807  >$cache_file
2808fi
2809
2810# Check that the precious variables saved in the cache have kept the same
2811# value.
2812ac_cache_corrupted=false
2813for ac_var in $ac_precious_vars; do
2814  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2815  eval ac_new_set=\$ac_env_${ac_var}_set
2816  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2817  eval ac_new_val=\$ac_env_${ac_var}_value
2818  case $ac_old_set,$ac_new_set in
2819    set,)
2820      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2821$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2822      ac_cache_corrupted=: ;;
2823    ,set)
2824      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2825$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2826      ac_cache_corrupted=: ;;
2827    ,);;
2828    *)
2829      if test "x$ac_old_val" != "x$ac_new_val"; then
2830	# differences in whitespace do not lead to failure.
2831	ac_old_val_w=`echo x $ac_old_val`
2832	ac_new_val_w=`echo x $ac_new_val`
2833	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2834	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2835$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2836	  ac_cache_corrupted=:
2837	else
2838	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2839$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2840	  eval $ac_var=\$ac_old_val
2841	fi
2842	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2843$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2844	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2845$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2846      fi;;
2847  esac
2848  # Pass precious variables to config.status.
2849  if test "$ac_new_set" = set; then
2850    case $ac_new_val in
2851    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2852    *) ac_arg=$ac_var=$ac_new_val ;;
2853    esac
2854    case " $ac_configure_args " in
2855      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2856      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2857    esac
2858  fi
2859done
2860if $ac_cache_corrupted; then
2861  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2863  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2864$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2865  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2866fi
2867## -------------------- ##
2868## Main body of script. ##
2869## -------------------- ##
2870
2871ac_ext=c
2872ac_cpp='$CPP $CPPFLAGS'
2873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2875ac_compiler_gnu=$ac_cv_c_compiler_gnu
2876
2877
2878
2879ac_aux_dir=
2880for ac_dir in build-aux "$srcdir"/build-aux; do
2881  if test -f "$ac_dir/install-sh"; then
2882    ac_aux_dir=$ac_dir
2883    ac_install_sh="$ac_aux_dir/install-sh -c"
2884    break
2885  elif test -f "$ac_dir/install.sh"; then
2886    ac_aux_dir=$ac_dir
2887    ac_install_sh="$ac_aux_dir/install.sh -c"
2888    break
2889  elif test -f "$ac_dir/shtool"; then
2890    ac_aux_dir=$ac_dir
2891    ac_install_sh="$ac_aux_dir/shtool install -c"
2892    break
2893  fi
2894done
2895if test -z "$ac_aux_dir"; then
2896  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2897fi
2898
2899# These three variables are undocumented and unsupported,
2900# and are intended to be withdrawn in a future Autoconf release.
2901# They can cause serious problems if a builder's source tree is in a directory
2902# whose full name contains unusual characters.
2903ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2904ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2905ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2906
2907
2908# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2909#
2910# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2911#
2912# This program is free software; you can redistribute it and/or modify
2913# it under the terms of the GNU General Public License as published by
2914# the Free Software Foundation; either version 2 of the License, or
2915# (at your option) any later version.
2916#
2917# This program is distributed in the hope that it will be useful, but
2918# WITHOUT ANY WARRANTY; without even the implied warranty of
2919# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2920# General Public License for more details.
2921#
2922# You should have received a copy of the GNU General Public License
2923# along with this program; if not, write to the Free Software
2924# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2925#
2926# As a special exception to the GNU General Public License, if you
2927# distribute this file as part of a program that contains a
2928# configuration script generated by Autoconf, you may include it under
2929# the same distribution terms that you use for the rest of that program.
2930
2931# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2932# ----------------------------------
2933# PKG_PROG_PKG_CONFIG
2934
2935# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2936#
2937# Check to see whether a particular set of modules exists.  Similar
2938# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2939#
2940#
2941# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2942# this or PKG_CHECK_MODULES is called, or make sure to call
2943# PKG_CHECK_EXISTS manually
2944# --------------------------------------------------------------
2945
2946
2947
2948# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2949# ---------------------------------------------
2950# _PKG_CONFIG
2951
2952# _PKG_SHORT_ERRORS_SUPPORTED
2953# -----------------------------
2954# _PKG_SHORT_ERRORS_SUPPORTED
2955
2956
2957# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2958# [ACTION-IF-NOT-FOUND])
2959#
2960#
2961# Note that if there is a possibility the first call to
2962# PKG_CHECK_MODULES might not happen, you should be sure to include an
2963# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2964#
2965#
2966# --------------------------------------------------------------
2967# PKG_CHECK_MODULES
2968
2969
2970# Include these first...
2971#
2972# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2973# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2974#
2975# This code is free software; you can redistribute it and/or modify it
2976# under the terms of the GNU General Public License version 2 only, as
2977# published by the Free Software Foundation.  Oracle designates this
2978# particular file as subject to the "Classpath" exception as provided
2979# by Oracle in the LICENSE file that accompanied this code.
2980#
2981# This code is distributed in the hope that it will be useful, but WITHOUT
2982# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2983# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2984# version 2 for more details (a copy is included in the LICENSE file that
2985# accompanied this code).
2986#
2987# You should have received a copy of the GNU General Public License version
2988# 2 along with this work; if not, write to the Free Software Foundation,
2989# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2990#
2991# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2992# or visit www.oracle.com if you need additional information or have any
2993# questions.
2994#
2995
2996
2997
2998# This will make sure the given variable points to a full and proper
2999# path. This means:
3000# 1) There will be no spaces in the path. On posix platforms,
3001#    spaces in the path will result in an error. On Windows,
3002#    the path will be rewritten using short-style to be space-free.
3003# 2) The path will be absolute, and it will be in unix-style (on
3004#     cygwin).
3005# $1: The name of the variable to fix
3006
3007
3008# This will make sure the given variable points to a executable
3009# with a full and proper path. This means:
3010# 1) There will be no spaces in the path. On posix platforms,
3011#    spaces in the path will result in an error. On Windows,
3012#    the path will be rewritten using short-style to be space-free.
3013# 2) The path will be absolute, and it will be in unix-style (on
3014#     cygwin).
3015# Any arguments given to the executable is preserved.
3016# If the input variable does not have a directory specification, then
3017# it need to be in the PATH.
3018# $1: The name of the variable to fix
3019
3020
3021
3022
3023
3024
3025# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3026# $1: variable to check
3027# $2: executable name to print in warning (optional)
3028
3029
3030# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3031# Arguments as AC_PATH_PROG:
3032# $1: variable to set
3033# $2: executable name to look for
3034
3035
3036# Setup the most fundamental tools that relies on not much else to set up,
3037# but is used by much of the early bootstrap code.
3038
3039
3040# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3041
3042
3043
3044
3045
3046
3047
3048#%%% Simple tools %%%
3049
3050# Check if we have found a usable version of make
3051# $1: the path to a potential make binary (or empty)
3052# $2: the description on how we found this
3053
3054
3055# Goes looking for a usable version of GNU make.
3056
3057
3058
3059
3060
3061
3062# Check if build directory is on local disk. If not possible to determine,
3063# we prefer to claim it's local.
3064# Argument 1: directory to test
3065# Argument 2: what to do if it is on local disk
3066# Argument 3: what to do otherwise (remote disk or failure)
3067
3068
3069
3070
3071#
3072# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3073# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3074#
3075# This code is free software; you can redistribute it and/or modify it
3076# under the terms of the GNU General Public License version 2 only, as
3077# published by the Free Software Foundation.  Oracle designates this
3078# particular file as subject to the "Classpath" exception as provided
3079# by Oracle in the LICENSE file that accompanied this code.
3080#
3081# This code is distributed in the hope that it will be useful, but WITHOUT
3082# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3083# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3084# version 2 for more details (a copy is included in the LICENSE file that
3085# accompanied this code).
3086#
3087# You should have received a copy of the GNU General Public License version
3088# 2 along with this work; if not, write to the Free Software Foundation,
3089# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3090#
3091# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3092# or visit www.oracle.com if you need additional information or have any
3093# questions.
3094#
3095
3096
3097
3098
3099
3100# Helper function which possibly converts a path using DOS-style short mode.
3101# If so, the updated path is stored in $new_path.
3102# $1: The path to check
3103
3104
3105# Helper function which possibly converts a path using DOS-style short mode.
3106# If so, the updated path is stored in $new_path.
3107# $1: The path to check
3108
3109
3110# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3111# and could probably be heavily simplified. However, all changes in this
3112# area tend to need lot of testing in different scenarios, and in lack of
3113# proper unit testing, cleaning this up has not been deemed worth the effort
3114# at the moment.
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3125
3126
3127
3128
3129#
3130# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3131# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3132#
3133# This code is free software; you can redistribute it and/or modify it
3134# under the terms of the GNU General Public License version 2 only, as
3135# published by the Free Software Foundation.  Oracle designates this
3136# particular file as subject to the "Classpath" exception as provided
3137# by Oracle in the LICENSE file that accompanied this code.
3138#
3139# This code is distributed in the hope that it will be useful, but WITHOUT
3140# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3141# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3142# version 2 for more details (a copy is included in the LICENSE file that
3143# accompanied this code).
3144#
3145# You should have received a copy of the GNU General Public License version
3146# 2 along with this work; if not, write to the Free Software Foundation,
3147# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3148#
3149# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3150# or visit www.oracle.com if you need additional information or have any
3151# questions.
3152#
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164# ... then the rest
3165#
3166# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3167# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3168#
3169# This code is free software; you can redistribute it and/or modify it
3170# under the terms of the GNU General Public License version 2 only, as
3171# published by the Free Software Foundation.  Oracle designates this
3172# particular file as subject to the "Classpath" exception as provided
3173# by Oracle in the LICENSE file that accompanied this code.
3174#
3175# This code is distributed in the hope that it will be useful, but WITHOUT
3176# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3177# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3178# version 2 for more details (a copy is included in the LICENSE file that
3179# accompanied this code).
3180#
3181# You should have received a copy of the GNU General Public License version
3182# 2 along with this work; if not, write to the Free Software Foundation,
3183# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3184#
3185# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3186# or visit www.oracle.com if you need additional information or have any
3187# questions.
3188#
3189
3190# Execute the check given as argument, and verify the result
3191# If the Boot JDK was previously found, do nothing
3192# $1 A command line (typically autoconf macro) to execute
3193
3194
3195# Test: Is bootjdk explicitely set by command line arguments?
3196
3197
3198# Test: Is bootjdk available from builddeps?
3199
3200
3201# Test: Is $JAVA_HOME set?
3202
3203
3204# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3205
3206
3207# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3208
3209
3210# Look for a jdk in the given path. If there are multiple, try to select the newest.
3211# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3212# $1 = Path to directory containing jdk installations.
3213# $2 = String to append to the found JDK directory to get the proper JDK home
3214
3215
3216# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3217# environmental variable as base for where to look.
3218# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3219
3220
3221# Test: Is there a JDK installed in default, well-known locations?
3222
3223
3224# Check that a command-line tool in the Boot JDK is correct
3225# $1 = name of variable to assign
3226# $2 = name of binary
3227
3228
3229###############################################################################
3230#
3231# We need a Boot JDK to bootstrap the build.
3232#
3233
3234
3235
3236
3237
3238#
3239# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3240# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3241#
3242# This code is free software; you can redistribute it and/or modify it
3243# under the terms of the GNU General Public License version 2 only, as
3244# published by the Free Software Foundation.  Oracle designates this
3245# particular file as subject to the "Classpath" exception as provided
3246# by Oracle in the LICENSE file that accompanied this code.
3247#
3248# This code is distributed in the hope that it will be useful, but WITHOUT
3249# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3250# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3251# version 2 for more details (a copy is included in the LICENSE file that
3252# accompanied this code).
3253#
3254# You should have received a copy of the GNU General Public License version
3255# 2 along with this work; if not, write to the Free Software Foundation,
3256# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3257#
3258# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3259# or visit www.oracle.com if you need additional information or have any
3260# questions.
3261#
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280#
3281# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3282# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3283#
3284# This code is free software; you can redistribute it and/or modify it
3285# under the terms of the GNU General Public License version 2 only, as
3286# published by the Free Software Foundation.  Oracle designates this
3287# particular file as subject to the "Classpath" exception as provided
3288# by Oracle in the LICENSE file that accompanied this code.
3289#
3290# This code is distributed in the hope that it will be useful, but WITHOUT
3291# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3292# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3293# version 2 for more details (a copy is included in the LICENSE file that
3294# accompanied this code).
3295#
3296# You should have received a copy of the GNU General Public License version
3297# 2 along with this work; if not, write to the Free Software Foundation,
3298# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3299#
3300# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3301# or visit www.oracle.com if you need additional information or have any
3302# questions.
3303#
3304
3305
3306
3307
3308
3309cygwin_help() {
3310    case $1 in
3311    unzip)
3312        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3313    zip)
3314        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3315    make)
3316        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3317    * )
3318       break ;;
3319    esac
3320}
3321
3322apt_help() {
3323    case $1 in
3324    devkit)
3325        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3326    openjdk)
3327        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3328    alsa)
3329        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3330    cups)
3331        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3332    freetype2)
3333        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3334    pulse)
3335        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3336    x11)
3337        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3338    ccache)
3339        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3340    * )
3341       break ;;
3342    esac
3343}
3344
3345yum_help() {
3346    case $1 in
3347    devkit)
3348        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3349    openjdk)
3350        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3351    alsa)
3352        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3353    cups)
3354        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3355    freetype2)
3356        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3357    pulse)
3358        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3359    x11)
3360        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3361    ccache)
3362        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3363    * )
3364       break ;;
3365    esac
3366}
3367
3368port_help() {
3369    PKGHANDLER_COMMAND=""
3370}
3371
3372pkgutil_help() {
3373    PKGHANDLER_COMMAND=""
3374}
3375
3376pkgadd_help() {
3377    PKGHANDLER_COMMAND=""
3378}
3379
3380
3381
3382#
3383# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3384# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3385#
3386# This code is free software; you can redistribute it and/or modify it
3387# under the terms of the GNU General Public License version 2 only, as
3388# published by the Free Software Foundation.  Oracle designates this
3389# particular file as subject to the "Classpath" exception as provided
3390# by Oracle in the LICENSE file that accompanied this code.
3391#
3392# This code is distributed in the hope that it will be useful, but WITHOUT
3393# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3394# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3395# version 2 for more details (a copy is included in the LICENSE file that
3396# accompanied this code).
3397#
3398# You should have received a copy of the GNU General Public License version
3399# 2 along with this work; if not, write to the Free Software Foundation,
3400# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3401#
3402# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3403# or visit www.oracle.com if you need additional information or have any
3404# questions.
3405#
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421# Support for customization of the build process. Some build files
3422# will include counterparts from this location, if they exist. This allows
3423# for a degree of customization of the build targets and the rules/recipes
3424# to create them
3425
3426# Check whether --with-custom-make-dir was given.
3427if test "${with_custom_make_dir+set}" = set; then :
3428  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3429fi
3430
3431
3432
3433#
3434# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3435# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3436#
3437# This code is free software; you can redistribute it and/or modify it
3438# under the terms of the GNU General Public License version 2 only, as
3439# published by the Free Software Foundation.  Oracle designates this
3440# particular file as subject to the "Classpath" exception as provided
3441# by Oracle in the LICENSE file that accompanied this code.
3442#
3443# This code is distributed in the hope that it will be useful, but WITHOUT
3444# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3445# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3446# version 2 for more details (a copy is included in the LICENSE file that
3447# accompanied this code).
3448#
3449# You should have received a copy of the GNU General Public License version
3450# 2 along with this work; if not, write to the Free Software Foundation,
3451# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3452#
3453# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3454# or visit www.oracle.com if you need additional information or have any
3455# questions.
3456#
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472#
3473# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475#
3476# This code is free software; you can redistribute it and/or modify it
3477# under the terms of the GNU General Public License version 2 only, as
3478# published by the Free Software Foundation.  Oracle designates this
3479# particular file as subject to the "Classpath" exception as provided
3480# by Oracle in the LICENSE file that accompanied this code.
3481#
3482# This code is distributed in the hope that it will be useful, but WITHOUT
3483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485# version 2 for more details (a copy is included in the LICENSE file that
3486# accompanied this code).
3487#
3488# You should have received a copy of the GNU General Public License version
3489# 2 along with this work; if not, write to the Free Software Foundation,
3490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491#
3492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493# or visit www.oracle.com if you need additional information or have any
3494# questions.
3495#
3496
3497# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3498# Converts autoconf style CPU name to OpenJDK style, into
3499# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3500
3501
3502# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3503# Converts autoconf style OS name to OpenJDK style, into
3504# VAR_OS and VAR_OS_API.
3505
3506
3507# Expects $host_os $host_cpu $build_os and $build_cpu
3508# and $with_target_bits to have been setup!
3509#
3510# Translate the standard triplet(quadruplet) definition
3511# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3512# OPENJDK_BUILD_OS, etc.
3513
3514
3515# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3516# accordingly. Must be done after setting up build and target system, but before
3517# doing anything else with these values.
3518
3519
3520    # Setup the legacy variables, for controlling the old makefiles.
3521    #
3522
3523
3524
3525
3526#%%% Build and target systems %%%
3527
3528
3529
3530
3531# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3532# Add -mX to various FLAGS variables.
3533
3534
3535
3536
3537
3538
3539#
3540# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3542#
3543# This code is free software; you can redistribute it and/or modify it
3544# under the terms of the GNU General Public License version 2 only, as
3545# published by the Free Software Foundation.  Oracle designates this
3546# particular file as subject to the "Classpath" exception as provided
3547# by Oracle in the LICENSE file that accompanied this code.
3548#
3549# This code is distributed in the hope that it will be useful, but WITHOUT
3550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3552# version 2 for more details (a copy is included in the LICENSE file that
3553# accompanied this code).
3554#
3555# You should have received a copy of the GNU General Public License version
3556# 2 along with this work; if not, write to the Free Software Foundation,
3557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3558#
3559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3560# or visit www.oracle.com if you need additional information or have any
3561# questions.
3562#
3563
3564
3565
3566
3567
3568
3569
3570
3571#
3572# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3573# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574#
3575# This code is free software; you can redistribute it and/or modify it
3576# under the terms of the GNU General Public License version 2 only, as
3577# published by the Free Software Foundation.  Oracle designates this
3578# particular file as subject to the "Classpath" exception as provided
3579# by Oracle in the LICENSE file that accompanied this code.
3580#
3581# This code is distributed in the hope that it will be useful, but WITHOUT
3582# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584# version 2 for more details (a copy is included in the LICENSE file that
3585# accompanied this code).
3586#
3587# You should have received a copy of the GNU General Public License version
3588# 2 along with this work; if not, write to the Free Software Foundation,
3589# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590#
3591# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592# or visit www.oracle.com if you need additional information or have any
3593# questions.
3594#
3595
3596# $1 = compiler to test (CC or CXX)
3597# $2 = human readable name of compiler (C or C++)
3598
3599
3600
3601
3602
3603# $1 = compiler to test (CC or CXX)
3604# $2 = human readable name of compiler (C or C++)
3605# $3 = list of compiler names to search for
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643
3644
3645
3646
3647
3648
3649# Check if the VS env variables were setup prior to running configure.
3650# If not, then find vcvarsall.bat and run it automatically, and integrate
3651# the set env variables into the spec file.
3652
3653
3654
3655
3656
3657
3658# This line needs to be here, verbatim, after all includes and the dummy hook
3659# definitions. It is replaced with custom functionality when building
3660# custom sources.
3661#CUSTOM_AUTOCONF_INCLUDE
3662
3663# Do not change or remove the following line, it is needed for consistency checks:
3664DATE_WHEN_GENERATED=1351257228
3665
3666###############################################################################
3667#
3668# Initialization / Boot-strapping
3669#
3670# The bootstrapping process needs to solve the "chicken or the egg" problem,
3671# thus it jumps back and forth, each time gaining something needed later on.
3672#
3673###############################################################################
3674
3675# Basic initialization that must happen first of all
3676
3677# Save the original command line. This is passed to us by the wrapper configure script.
3678
3679DATE_WHEN_CONFIGURED=`LANG=C date`
3680
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3682$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3683{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3684$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3685
3686
3687
3688# Start with tools that do not need have cross compilation support
3689# and can be expected to be found in the default PATH. These tools are
3690# used by configure. Nor are these tools expected to be found in the
3691# devkit from the builddeps server either, since they are
3692# needed to download the devkit.
3693
3694# First are all the simple required tools.
3695
3696    for ac_prog in basename
3697do
3698  # Extract the first word of "$ac_prog", so it can be a program name with args.
3699set dummy $ac_prog; ac_word=$2
3700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3701$as_echo_n "checking for $ac_word... " >&6; }
3702if test "${ac_cv_path_BASENAME+set}" = set; then :
3703  $as_echo_n "(cached) " >&6
3704else
3705  case $BASENAME in
3706  [\\/]* | ?:[\\/]*)
3707  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3708  ;;
3709  *)
3710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711for as_dir in $PATH
3712do
3713  IFS=$as_save_IFS
3714  test -z "$as_dir" && as_dir=.
3715    for ac_exec_ext in '' $ac_executable_extensions; do
3716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3717    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3719    break 2
3720  fi
3721done
3722  done
3723IFS=$as_save_IFS
3724
3725  ;;
3726esac
3727fi
3728BASENAME=$ac_cv_path_BASENAME
3729if test -n "$BASENAME"; then
3730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3731$as_echo "$BASENAME" >&6; }
3732else
3733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3734$as_echo "no" >&6; }
3735fi
3736
3737
3738  test -n "$BASENAME" && break
3739done
3740
3741
3742    if test "x$BASENAME" = x; then
3743        if test "xbasename" = x; then
3744          PROG_NAME=basename
3745        else
3746          PROG_NAME=basename
3747        fi
3748        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3749$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3750        as_fn_error $? "Cannot continue" "$LINENO" 5
3751    fi
3752
3753
3754
3755    for ac_prog in bash
3756do
3757  # Extract the first word of "$ac_prog", so it can be a program name with args.
3758set dummy $ac_prog; ac_word=$2
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3760$as_echo_n "checking for $ac_word... " >&6; }
3761if test "${ac_cv_path_BASH+set}" = set; then :
3762  $as_echo_n "(cached) " >&6
3763else
3764  case $BASH in
3765  [\\/]* | ?:[\\/]*)
3766  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3767  ;;
3768  *)
3769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772  IFS=$as_save_IFS
3773  test -z "$as_dir" && as_dir=.
3774    for ac_exec_ext in '' $ac_executable_extensions; do
3775  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3776    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3778    break 2
3779  fi
3780done
3781  done
3782IFS=$as_save_IFS
3783
3784  ;;
3785esac
3786fi
3787BASH=$ac_cv_path_BASH
3788if test -n "$BASH"; then
3789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3790$as_echo "$BASH" >&6; }
3791else
3792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
3794fi
3795
3796
3797  test -n "$BASH" && break
3798done
3799
3800
3801    if test "x$BASH" = x; then
3802        if test "xbash" = x; then
3803          PROG_NAME=bash
3804        else
3805          PROG_NAME=bash
3806        fi
3807        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3808$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3809        as_fn_error $? "Cannot continue" "$LINENO" 5
3810    fi
3811
3812
3813
3814    for ac_prog in cat
3815do
3816  # Extract the first word of "$ac_prog", so it can be a program name with args.
3817set dummy $ac_prog; ac_word=$2
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
3820if test "${ac_cv_path_CAT+set}" = set; then :
3821  $as_echo_n "(cached) " >&6
3822else
3823  case $CAT in
3824  [\\/]* | ?:[\\/]*)
3825  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3826  ;;
3827  *)
3828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829for as_dir in $PATH
3830do
3831  IFS=$as_save_IFS
3832  test -z "$as_dir" && as_dir=.
3833    for ac_exec_ext in '' $ac_executable_extensions; do
3834  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3835    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837    break 2
3838  fi
3839done
3840  done
3841IFS=$as_save_IFS
3842
3843  ;;
3844esac
3845fi
3846CAT=$ac_cv_path_CAT
3847if test -n "$CAT"; then
3848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3849$as_echo "$CAT" >&6; }
3850else
3851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
3853fi
3854
3855
3856  test -n "$CAT" && break
3857done
3858
3859
3860    if test "x$CAT" = x; then
3861        if test "xcat" = x; then
3862          PROG_NAME=cat
3863        else
3864          PROG_NAME=cat
3865        fi
3866        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3867$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3868        as_fn_error $? "Cannot continue" "$LINENO" 5
3869    fi
3870
3871
3872
3873    for ac_prog in chmod
3874do
3875  # Extract the first word of "$ac_prog", so it can be a program name with args.
3876set dummy $ac_prog; ac_word=$2
3877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3878$as_echo_n "checking for $ac_word... " >&6; }
3879if test "${ac_cv_path_CHMOD+set}" = set; then :
3880  $as_echo_n "(cached) " >&6
3881else
3882  case $CHMOD in
3883  [\\/]* | ?:[\\/]*)
3884  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3885  ;;
3886  *)
3887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3888for as_dir in $PATH
3889do
3890  IFS=$as_save_IFS
3891  test -z "$as_dir" && as_dir=.
3892    for ac_exec_ext in '' $ac_executable_extensions; do
3893  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3894    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3896    break 2
3897  fi
3898done
3899  done
3900IFS=$as_save_IFS
3901
3902  ;;
3903esac
3904fi
3905CHMOD=$ac_cv_path_CHMOD
3906if test -n "$CHMOD"; then
3907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3908$as_echo "$CHMOD" >&6; }
3909else
3910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3911$as_echo "no" >&6; }
3912fi
3913
3914
3915  test -n "$CHMOD" && break
3916done
3917
3918
3919    if test "x$CHMOD" = x; then
3920        if test "xchmod" = x; then
3921          PROG_NAME=chmod
3922        else
3923          PROG_NAME=chmod
3924        fi
3925        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3926$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3927        as_fn_error $? "Cannot continue" "$LINENO" 5
3928    fi
3929
3930
3931
3932    for ac_prog in cmp
3933do
3934  # Extract the first word of "$ac_prog", so it can be a program name with args.
3935set dummy $ac_prog; ac_word=$2
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3937$as_echo_n "checking for $ac_word... " >&6; }
3938if test "${ac_cv_path_CMP+set}" = set; then :
3939  $as_echo_n "(cached) " >&6
3940else
3941  case $CMP in
3942  [\\/]* | ?:[\\/]*)
3943  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3944  ;;
3945  *)
3946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3947for as_dir in $PATH
3948do
3949  IFS=$as_save_IFS
3950  test -z "$as_dir" && as_dir=.
3951    for ac_exec_ext in '' $ac_executable_extensions; do
3952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3953    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3955    break 2
3956  fi
3957done
3958  done
3959IFS=$as_save_IFS
3960
3961  ;;
3962esac
3963fi
3964CMP=$ac_cv_path_CMP
3965if test -n "$CMP"; then
3966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3967$as_echo "$CMP" >&6; }
3968else
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3970$as_echo "no" >&6; }
3971fi
3972
3973
3974  test -n "$CMP" && break
3975done
3976
3977
3978    if test "x$CMP" = x; then
3979        if test "xcmp" = x; then
3980          PROG_NAME=cmp
3981        else
3982          PROG_NAME=cmp
3983        fi
3984        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3985$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3986        as_fn_error $? "Cannot continue" "$LINENO" 5
3987    fi
3988
3989
3990
3991    for ac_prog in cp
3992do
3993  # Extract the first word of "$ac_prog", so it can be a program name with args.
3994set dummy $ac_prog; ac_word=$2
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3996$as_echo_n "checking for $ac_word... " >&6; }
3997if test "${ac_cv_path_CP+set}" = set; then :
3998  $as_echo_n "(cached) " >&6
3999else
4000  case $CP in
4001  [\\/]* | ?:[\\/]*)
4002  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4003  ;;
4004  *)
4005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4006for as_dir in $PATH
4007do
4008  IFS=$as_save_IFS
4009  test -z "$as_dir" && as_dir=.
4010    for ac_exec_ext in '' $ac_executable_extensions; do
4011  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4012    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4014    break 2
4015  fi
4016done
4017  done
4018IFS=$as_save_IFS
4019
4020  ;;
4021esac
4022fi
4023CP=$ac_cv_path_CP
4024if test -n "$CP"; then
4025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4026$as_echo "$CP" >&6; }
4027else
4028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4029$as_echo "no" >&6; }
4030fi
4031
4032
4033  test -n "$CP" && break
4034done
4035
4036
4037    if test "x$CP" = x; then
4038        if test "xcp" = x; then
4039          PROG_NAME=cp
4040        else
4041          PROG_NAME=cp
4042        fi
4043        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4044$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4045        as_fn_error $? "Cannot continue" "$LINENO" 5
4046    fi
4047
4048
4049
4050    for ac_prog in cut
4051do
4052  # Extract the first word of "$ac_prog", so it can be a program name with args.
4053set dummy $ac_prog; ac_word=$2
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4055$as_echo_n "checking for $ac_word... " >&6; }
4056if test "${ac_cv_path_CUT+set}" = set; then :
4057  $as_echo_n "(cached) " >&6
4058else
4059  case $CUT in
4060  [\\/]* | ?:[\\/]*)
4061  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4062  ;;
4063  *)
4064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4065for as_dir in $PATH
4066do
4067  IFS=$as_save_IFS
4068  test -z "$as_dir" && as_dir=.
4069    for ac_exec_ext in '' $ac_executable_extensions; do
4070  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4071    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4073    break 2
4074  fi
4075done
4076  done
4077IFS=$as_save_IFS
4078
4079  ;;
4080esac
4081fi
4082CUT=$ac_cv_path_CUT
4083if test -n "$CUT"; then
4084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4085$as_echo "$CUT" >&6; }
4086else
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4088$as_echo "no" >&6; }
4089fi
4090
4091
4092  test -n "$CUT" && break
4093done
4094
4095
4096    if test "x$CUT" = x; then
4097        if test "xcut" = x; then
4098          PROG_NAME=cut
4099        else
4100          PROG_NAME=cut
4101        fi
4102        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4103$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4104        as_fn_error $? "Cannot continue" "$LINENO" 5
4105    fi
4106
4107
4108
4109    for ac_prog in date
4110do
4111  # Extract the first word of "$ac_prog", so it can be a program name with args.
4112set dummy $ac_prog; ac_word=$2
4113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4114$as_echo_n "checking for $ac_word... " >&6; }
4115if test "${ac_cv_path_DATE+set}" = set; then :
4116  $as_echo_n "(cached) " >&6
4117else
4118  case $DATE in
4119  [\\/]* | ?:[\\/]*)
4120  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4121  ;;
4122  *)
4123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4124for as_dir in $PATH
4125do
4126  IFS=$as_save_IFS
4127  test -z "$as_dir" && as_dir=.
4128    for ac_exec_ext in '' $ac_executable_extensions; do
4129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4130    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4132    break 2
4133  fi
4134done
4135  done
4136IFS=$as_save_IFS
4137
4138  ;;
4139esac
4140fi
4141DATE=$ac_cv_path_DATE
4142if test -n "$DATE"; then
4143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4144$as_echo "$DATE" >&6; }
4145else
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4147$as_echo "no" >&6; }
4148fi
4149
4150
4151  test -n "$DATE" && break
4152done
4153
4154
4155    if test "x$DATE" = x; then
4156        if test "xdate" = x; then
4157          PROG_NAME=date
4158        else
4159          PROG_NAME=date
4160        fi
4161        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4162$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4163        as_fn_error $? "Cannot continue" "$LINENO" 5
4164    fi
4165
4166
4167
4168    for ac_prog in gdiff diff
4169do
4170  # Extract the first word of "$ac_prog", so it can be a program name with args.
4171set dummy $ac_prog; ac_word=$2
4172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4173$as_echo_n "checking for $ac_word... " >&6; }
4174if test "${ac_cv_path_DIFF+set}" = set; then :
4175  $as_echo_n "(cached) " >&6
4176else
4177  case $DIFF in
4178  [\\/]* | ?:[\\/]*)
4179  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4180  ;;
4181  *)
4182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4183for as_dir in $PATH
4184do
4185  IFS=$as_save_IFS
4186  test -z "$as_dir" && as_dir=.
4187    for ac_exec_ext in '' $ac_executable_extensions; do
4188  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4189    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4191    break 2
4192  fi
4193done
4194  done
4195IFS=$as_save_IFS
4196
4197  ;;
4198esac
4199fi
4200DIFF=$ac_cv_path_DIFF
4201if test -n "$DIFF"; then
4202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4203$as_echo "$DIFF" >&6; }
4204else
4205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4206$as_echo "no" >&6; }
4207fi
4208
4209
4210  test -n "$DIFF" && break
4211done
4212
4213
4214    if test "x$DIFF" = x; then
4215        if test "xgdiff diff" = x; then
4216          PROG_NAME=diff
4217        else
4218          PROG_NAME=gdiff diff
4219        fi
4220        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4221$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4222        as_fn_error $? "Cannot continue" "$LINENO" 5
4223    fi
4224
4225
4226
4227    for ac_prog in dirname
4228do
4229  # Extract the first word of "$ac_prog", so it can be a program name with args.
4230set dummy $ac_prog; ac_word=$2
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4232$as_echo_n "checking for $ac_word... " >&6; }
4233if test "${ac_cv_path_DIRNAME+set}" = set; then :
4234  $as_echo_n "(cached) " >&6
4235else
4236  case $DIRNAME in
4237  [\\/]* | ?:[\\/]*)
4238  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4239  ;;
4240  *)
4241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4242for as_dir in $PATH
4243do
4244  IFS=$as_save_IFS
4245  test -z "$as_dir" && as_dir=.
4246    for ac_exec_ext in '' $ac_executable_extensions; do
4247  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4248    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4250    break 2
4251  fi
4252done
4253  done
4254IFS=$as_save_IFS
4255
4256  ;;
4257esac
4258fi
4259DIRNAME=$ac_cv_path_DIRNAME
4260if test -n "$DIRNAME"; then
4261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4262$as_echo "$DIRNAME" >&6; }
4263else
4264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4265$as_echo "no" >&6; }
4266fi
4267
4268
4269  test -n "$DIRNAME" && break
4270done
4271
4272
4273    if test "x$DIRNAME" = x; then
4274        if test "xdirname" = x; then
4275          PROG_NAME=dirname
4276        else
4277          PROG_NAME=dirname
4278        fi
4279        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4280$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4281        as_fn_error $? "Cannot continue" "$LINENO" 5
4282    fi
4283
4284
4285
4286    for ac_prog in echo
4287do
4288  # Extract the first word of "$ac_prog", so it can be a program name with args.
4289set dummy $ac_prog; ac_word=$2
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4291$as_echo_n "checking for $ac_word... " >&6; }
4292if test "${ac_cv_path_ECHO+set}" = set; then :
4293  $as_echo_n "(cached) " >&6
4294else
4295  case $ECHO in
4296  [\\/]* | ?:[\\/]*)
4297  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4298  ;;
4299  *)
4300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4301for as_dir in $PATH
4302do
4303  IFS=$as_save_IFS
4304  test -z "$as_dir" && as_dir=.
4305    for ac_exec_ext in '' $ac_executable_extensions; do
4306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4307    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4309    break 2
4310  fi
4311done
4312  done
4313IFS=$as_save_IFS
4314
4315  ;;
4316esac
4317fi
4318ECHO=$ac_cv_path_ECHO
4319if test -n "$ECHO"; then
4320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4321$as_echo "$ECHO" >&6; }
4322else
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4324$as_echo "no" >&6; }
4325fi
4326
4327
4328  test -n "$ECHO" && break
4329done
4330
4331
4332    if test "x$ECHO" = x; then
4333        if test "xecho" = x; then
4334          PROG_NAME=echo
4335        else
4336          PROG_NAME=echo
4337        fi
4338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4340        as_fn_error $? "Cannot continue" "$LINENO" 5
4341    fi
4342
4343
4344
4345    for ac_prog in expr
4346do
4347  # Extract the first word of "$ac_prog", so it can be a program name with args.
4348set dummy $ac_prog; ac_word=$2
4349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4350$as_echo_n "checking for $ac_word... " >&6; }
4351if test "${ac_cv_path_EXPR+set}" = set; then :
4352  $as_echo_n "(cached) " >&6
4353else
4354  case $EXPR in
4355  [\\/]* | ?:[\\/]*)
4356  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4357  ;;
4358  *)
4359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4360for as_dir in $PATH
4361do
4362  IFS=$as_save_IFS
4363  test -z "$as_dir" && as_dir=.
4364    for ac_exec_ext in '' $ac_executable_extensions; do
4365  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4366    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4368    break 2
4369  fi
4370done
4371  done
4372IFS=$as_save_IFS
4373
4374  ;;
4375esac
4376fi
4377EXPR=$ac_cv_path_EXPR
4378if test -n "$EXPR"; then
4379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4380$as_echo "$EXPR" >&6; }
4381else
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4383$as_echo "no" >&6; }
4384fi
4385
4386
4387  test -n "$EXPR" && break
4388done
4389
4390
4391    if test "x$EXPR" = x; then
4392        if test "xexpr" = x; then
4393          PROG_NAME=expr
4394        else
4395          PROG_NAME=expr
4396        fi
4397        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4398$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4399        as_fn_error $? "Cannot continue" "$LINENO" 5
4400    fi
4401
4402
4403
4404    for ac_prog in file
4405do
4406  # Extract the first word of "$ac_prog", so it can be a program name with args.
4407set dummy $ac_prog; ac_word=$2
4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4409$as_echo_n "checking for $ac_word... " >&6; }
4410if test "${ac_cv_path_FILE+set}" = set; then :
4411  $as_echo_n "(cached) " >&6
4412else
4413  case $FILE in
4414  [\\/]* | ?:[\\/]*)
4415  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4416  ;;
4417  *)
4418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4419for as_dir in $PATH
4420do
4421  IFS=$as_save_IFS
4422  test -z "$as_dir" && as_dir=.
4423    for ac_exec_ext in '' $ac_executable_extensions; do
4424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4425    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4427    break 2
4428  fi
4429done
4430  done
4431IFS=$as_save_IFS
4432
4433  ;;
4434esac
4435fi
4436FILE=$ac_cv_path_FILE
4437if test -n "$FILE"; then
4438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4439$as_echo "$FILE" >&6; }
4440else
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4442$as_echo "no" >&6; }
4443fi
4444
4445
4446  test -n "$FILE" && break
4447done
4448
4449
4450    if test "x$FILE" = x; then
4451        if test "xfile" = x; then
4452          PROG_NAME=file
4453        else
4454          PROG_NAME=file
4455        fi
4456        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4457$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4458        as_fn_error $? "Cannot continue" "$LINENO" 5
4459    fi
4460
4461
4462
4463    for ac_prog in find
4464do
4465  # Extract the first word of "$ac_prog", so it can be a program name with args.
4466set dummy $ac_prog; ac_word=$2
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468$as_echo_n "checking for $ac_word... " >&6; }
4469if test "${ac_cv_path_FIND+set}" = set; then :
4470  $as_echo_n "(cached) " >&6
4471else
4472  case $FIND in
4473  [\\/]* | ?:[\\/]*)
4474  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4475  ;;
4476  *)
4477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4478for as_dir in $PATH
4479do
4480  IFS=$as_save_IFS
4481  test -z "$as_dir" && as_dir=.
4482    for ac_exec_ext in '' $ac_executable_extensions; do
4483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4484    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4486    break 2
4487  fi
4488done
4489  done
4490IFS=$as_save_IFS
4491
4492  ;;
4493esac
4494fi
4495FIND=$ac_cv_path_FIND
4496if test -n "$FIND"; then
4497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4498$as_echo "$FIND" >&6; }
4499else
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4501$as_echo "no" >&6; }
4502fi
4503
4504
4505  test -n "$FIND" && break
4506done
4507
4508
4509    if test "x$FIND" = x; then
4510        if test "xfind" = x; then
4511          PROG_NAME=find
4512        else
4513          PROG_NAME=find
4514        fi
4515        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4516$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4517        as_fn_error $? "Cannot continue" "$LINENO" 5
4518    fi
4519
4520
4521
4522    for ac_prog in head
4523do
4524  # Extract the first word of "$ac_prog", so it can be a program name with args.
4525set dummy $ac_prog; ac_word=$2
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527$as_echo_n "checking for $ac_word... " >&6; }
4528if test "${ac_cv_path_HEAD+set}" = set; then :
4529  $as_echo_n "(cached) " >&6
4530else
4531  case $HEAD in
4532  [\\/]* | ?:[\\/]*)
4533  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4534  ;;
4535  *)
4536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in $PATH
4538do
4539  IFS=$as_save_IFS
4540  test -z "$as_dir" && as_dir=.
4541    for ac_exec_ext in '' $ac_executable_extensions; do
4542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4543    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4545    break 2
4546  fi
4547done
4548  done
4549IFS=$as_save_IFS
4550
4551  ;;
4552esac
4553fi
4554HEAD=$ac_cv_path_HEAD
4555if test -n "$HEAD"; then
4556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4557$as_echo "$HEAD" >&6; }
4558else
4559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
4561fi
4562
4563
4564  test -n "$HEAD" && break
4565done
4566
4567
4568    if test "x$HEAD" = x; then
4569        if test "xhead" = x; then
4570          PROG_NAME=head
4571        else
4572          PROG_NAME=head
4573        fi
4574        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4575$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4576        as_fn_error $? "Cannot continue" "$LINENO" 5
4577    fi
4578
4579
4580
4581    for ac_prog in ln
4582do
4583  # Extract the first word of "$ac_prog", so it can be a program name with args.
4584set dummy $ac_prog; ac_word=$2
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if test "${ac_cv_path_LN+set}" = set; then :
4588  $as_echo_n "(cached) " >&6
4589else
4590  case $LN in
4591  [\\/]* | ?:[\\/]*)
4592  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4593  ;;
4594  *)
4595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598  IFS=$as_save_IFS
4599  test -z "$as_dir" && as_dir=.
4600    for ac_exec_ext in '' $ac_executable_extensions; do
4601  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4602    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604    break 2
4605  fi
4606done
4607  done
4608IFS=$as_save_IFS
4609
4610  ;;
4611esac
4612fi
4613LN=$ac_cv_path_LN
4614if test -n "$LN"; then
4615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4616$as_echo "$LN" >&6; }
4617else
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
4620fi
4621
4622
4623  test -n "$LN" && break
4624done
4625
4626
4627    if test "x$LN" = x; then
4628        if test "xln" = x; then
4629          PROG_NAME=ln
4630        else
4631          PROG_NAME=ln
4632        fi
4633        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4634$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4635        as_fn_error $? "Cannot continue" "$LINENO" 5
4636    fi
4637
4638
4639
4640    for ac_prog in ls
4641do
4642  # Extract the first word of "$ac_prog", so it can be a program name with args.
4643set dummy $ac_prog; ac_word=$2
4644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645$as_echo_n "checking for $ac_word... " >&6; }
4646if test "${ac_cv_path_LS+set}" = set; then :
4647  $as_echo_n "(cached) " >&6
4648else
4649  case $LS in
4650  [\\/]* | ?:[\\/]*)
4651  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4652  ;;
4653  *)
4654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in $PATH
4656do
4657  IFS=$as_save_IFS
4658  test -z "$as_dir" && as_dir=.
4659    for ac_exec_ext in '' $ac_executable_extensions; do
4660  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4661    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4663    break 2
4664  fi
4665done
4666  done
4667IFS=$as_save_IFS
4668
4669  ;;
4670esac
4671fi
4672LS=$ac_cv_path_LS
4673if test -n "$LS"; then
4674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4675$as_echo "$LS" >&6; }
4676else
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4678$as_echo "no" >&6; }
4679fi
4680
4681
4682  test -n "$LS" && break
4683done
4684
4685
4686    if test "x$LS" = x; then
4687        if test "xls" = x; then
4688          PROG_NAME=ls
4689        else
4690          PROG_NAME=ls
4691        fi
4692        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4693$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4694        as_fn_error $? "Cannot continue" "$LINENO" 5
4695    fi
4696
4697
4698
4699    for ac_prog in mkdir
4700do
4701  # Extract the first word of "$ac_prog", so it can be a program name with args.
4702set dummy $ac_prog; ac_word=$2
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4704$as_echo_n "checking for $ac_word... " >&6; }
4705if test "${ac_cv_path_MKDIR+set}" = set; then :
4706  $as_echo_n "(cached) " >&6
4707else
4708  case $MKDIR in
4709  [\\/]* | ?:[\\/]*)
4710  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4711  ;;
4712  *)
4713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4714for as_dir in $PATH
4715do
4716  IFS=$as_save_IFS
4717  test -z "$as_dir" && as_dir=.
4718    for ac_exec_ext in '' $ac_executable_extensions; do
4719  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4720    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4722    break 2
4723  fi
4724done
4725  done
4726IFS=$as_save_IFS
4727
4728  ;;
4729esac
4730fi
4731MKDIR=$ac_cv_path_MKDIR
4732if test -n "$MKDIR"; then
4733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4734$as_echo "$MKDIR" >&6; }
4735else
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4737$as_echo "no" >&6; }
4738fi
4739
4740
4741  test -n "$MKDIR" && break
4742done
4743
4744
4745    if test "x$MKDIR" = x; then
4746        if test "xmkdir" = x; then
4747          PROG_NAME=mkdir
4748        else
4749          PROG_NAME=mkdir
4750        fi
4751        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4752$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4753        as_fn_error $? "Cannot continue" "$LINENO" 5
4754    fi
4755
4756
4757
4758    for ac_prog in mktemp
4759do
4760  # Extract the first word of "$ac_prog", so it can be a program name with args.
4761set dummy $ac_prog; ac_word=$2
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4763$as_echo_n "checking for $ac_word... " >&6; }
4764if test "${ac_cv_path_MKTEMP+set}" = set; then :
4765  $as_echo_n "(cached) " >&6
4766else
4767  case $MKTEMP in
4768  [\\/]* | ?:[\\/]*)
4769  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4770  ;;
4771  *)
4772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773for as_dir in $PATH
4774do
4775  IFS=$as_save_IFS
4776  test -z "$as_dir" && as_dir=.
4777    for ac_exec_ext in '' $ac_executable_extensions; do
4778  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4779    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781    break 2
4782  fi
4783done
4784  done
4785IFS=$as_save_IFS
4786
4787  ;;
4788esac
4789fi
4790MKTEMP=$ac_cv_path_MKTEMP
4791if test -n "$MKTEMP"; then
4792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4793$as_echo "$MKTEMP" >&6; }
4794else
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796$as_echo "no" >&6; }
4797fi
4798
4799
4800  test -n "$MKTEMP" && break
4801done
4802
4803
4804    if test "x$MKTEMP" = x; then
4805        if test "xmktemp" = x; then
4806          PROG_NAME=mktemp
4807        else
4808          PROG_NAME=mktemp
4809        fi
4810        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4811$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4812        as_fn_error $? "Cannot continue" "$LINENO" 5
4813    fi
4814
4815
4816
4817    for ac_prog in mv
4818do
4819  # Extract the first word of "$ac_prog", so it can be a program name with args.
4820set dummy $ac_prog; ac_word=$2
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
4823if test "${ac_cv_path_MV+set}" = set; then :
4824  $as_echo_n "(cached) " >&6
4825else
4826  case $MV in
4827  [\\/]* | ?:[\\/]*)
4828  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4829  ;;
4830  *)
4831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in $PATH
4833do
4834  IFS=$as_save_IFS
4835  test -z "$as_dir" && as_dir=.
4836    for ac_exec_ext in '' $ac_executable_extensions; do
4837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4838    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4840    break 2
4841  fi
4842done
4843  done
4844IFS=$as_save_IFS
4845
4846  ;;
4847esac
4848fi
4849MV=$ac_cv_path_MV
4850if test -n "$MV"; then
4851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4852$as_echo "$MV" >&6; }
4853else
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
4858
4859  test -n "$MV" && break
4860done
4861
4862
4863    if test "x$MV" = x; then
4864        if test "xmv" = x; then
4865          PROG_NAME=mv
4866        else
4867          PROG_NAME=mv
4868        fi
4869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4870$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4871        as_fn_error $? "Cannot continue" "$LINENO" 5
4872    fi
4873
4874
4875
4876    for ac_prog in printf
4877do
4878  # Extract the first word of "$ac_prog", so it can be a program name with args.
4879set dummy $ac_prog; ac_word=$2
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881$as_echo_n "checking for $ac_word... " >&6; }
4882if test "${ac_cv_path_PRINTF+set}" = set; then :
4883  $as_echo_n "(cached) " >&6
4884else
4885  case $PRINTF in
4886  [\\/]* | ?:[\\/]*)
4887  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4888  ;;
4889  *)
4890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4891for as_dir in $PATH
4892do
4893  IFS=$as_save_IFS
4894  test -z "$as_dir" && as_dir=.
4895    for ac_exec_ext in '' $ac_executable_extensions; do
4896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4897    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4899    break 2
4900  fi
4901done
4902  done
4903IFS=$as_save_IFS
4904
4905  ;;
4906esac
4907fi
4908PRINTF=$ac_cv_path_PRINTF
4909if test -n "$PRINTF"; then
4910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4911$as_echo "$PRINTF" >&6; }
4912else
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4914$as_echo "no" >&6; }
4915fi
4916
4917
4918  test -n "$PRINTF" && break
4919done
4920
4921
4922    if test "x$PRINTF" = x; then
4923        if test "xprintf" = x; then
4924          PROG_NAME=printf
4925        else
4926          PROG_NAME=printf
4927        fi
4928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4929$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4930        as_fn_error $? "Cannot continue" "$LINENO" 5
4931    fi
4932
4933
4934
4935    for ac_prog in pwd
4936do
4937  # Extract the first word of "$ac_prog", so it can be a program name with args.
4938set dummy $ac_prog; ac_word=$2
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
4941if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4942  $as_echo_n "(cached) " >&6
4943else
4944  case $THEPWDCMD in
4945  [\\/]* | ?:[\\/]*)
4946  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4947  ;;
4948  *)
4949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950for as_dir in $PATH
4951do
4952  IFS=$as_save_IFS
4953  test -z "$as_dir" && as_dir=.
4954    for ac_exec_ext in '' $ac_executable_extensions; do
4955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4956    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4958    break 2
4959  fi
4960done
4961  done
4962IFS=$as_save_IFS
4963
4964  ;;
4965esac
4966fi
4967THEPWDCMD=$ac_cv_path_THEPWDCMD
4968if test -n "$THEPWDCMD"; then
4969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4970$as_echo "$THEPWDCMD" >&6; }
4971else
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973$as_echo "no" >&6; }
4974fi
4975
4976
4977  test -n "$THEPWDCMD" && break
4978done
4979
4980
4981    if test "x$THEPWDCMD" = x; then
4982        if test "xpwd" = x; then
4983          PROG_NAME=thepwdcmd
4984        else
4985          PROG_NAME=pwd
4986        fi
4987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4989        as_fn_error $? "Cannot continue" "$LINENO" 5
4990    fi
4991
4992
4993
4994    for ac_prog in rm
4995do
4996  # Extract the first word of "$ac_prog", so it can be a program name with args.
4997set dummy $ac_prog; ac_word=$2
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4999$as_echo_n "checking for $ac_word... " >&6; }
5000if test "${ac_cv_path_RM+set}" = set; then :
5001  $as_echo_n "(cached) " >&6
5002else
5003  case $RM in
5004  [\\/]* | ?:[\\/]*)
5005  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5006  ;;
5007  *)
5008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5009for as_dir in $PATH
5010do
5011  IFS=$as_save_IFS
5012  test -z "$as_dir" && as_dir=.
5013    for ac_exec_ext in '' $ac_executable_extensions; do
5014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5015    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5017    break 2
5018  fi
5019done
5020  done
5021IFS=$as_save_IFS
5022
5023  ;;
5024esac
5025fi
5026RM=$ac_cv_path_RM
5027if test -n "$RM"; then
5028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5029$as_echo "$RM" >&6; }
5030else
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
5033fi
5034
5035
5036  test -n "$RM" && break
5037done
5038
5039
5040    if test "x$RM" = x; then
5041        if test "xrm" = x; then
5042          PROG_NAME=rm
5043        else
5044          PROG_NAME=rm
5045        fi
5046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5048        as_fn_error $? "Cannot continue" "$LINENO" 5
5049    fi
5050
5051
5052
5053    for ac_prog in sh
5054do
5055  # Extract the first word of "$ac_prog", so it can be a program name with args.
5056set dummy $ac_prog; ac_word=$2
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5058$as_echo_n "checking for $ac_word... " >&6; }
5059if test "${ac_cv_path_SH+set}" = set; then :
5060  $as_echo_n "(cached) " >&6
5061else
5062  case $SH in
5063  [\\/]* | ?:[\\/]*)
5064  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5065  ;;
5066  *)
5067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5068for as_dir in $PATH
5069do
5070  IFS=$as_save_IFS
5071  test -z "$as_dir" && as_dir=.
5072    for ac_exec_ext in '' $ac_executable_extensions; do
5073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5074    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5076    break 2
5077  fi
5078done
5079  done
5080IFS=$as_save_IFS
5081
5082  ;;
5083esac
5084fi
5085SH=$ac_cv_path_SH
5086if test -n "$SH"; then
5087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5088$as_echo "$SH" >&6; }
5089else
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
5092fi
5093
5094
5095  test -n "$SH" && break
5096done
5097
5098
5099    if test "x$SH" = x; then
5100        if test "xsh" = x; then
5101          PROG_NAME=sh
5102        else
5103          PROG_NAME=sh
5104        fi
5105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5106$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5107        as_fn_error $? "Cannot continue" "$LINENO" 5
5108    fi
5109
5110
5111
5112    for ac_prog in sort
5113do
5114  # Extract the first word of "$ac_prog", so it can be a program name with args.
5115set dummy $ac_prog; ac_word=$2
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
5118if test "${ac_cv_path_SORT+set}" = set; then :
5119  $as_echo_n "(cached) " >&6
5120else
5121  case $SORT in
5122  [\\/]* | ?:[\\/]*)
5123  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5124  ;;
5125  *)
5126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5127for as_dir in $PATH
5128do
5129  IFS=$as_save_IFS
5130  test -z "$as_dir" && as_dir=.
5131    for ac_exec_ext in '' $ac_executable_extensions; do
5132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5133    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5135    break 2
5136  fi
5137done
5138  done
5139IFS=$as_save_IFS
5140
5141  ;;
5142esac
5143fi
5144SORT=$ac_cv_path_SORT
5145if test -n "$SORT"; then
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5147$as_echo "$SORT" >&6; }
5148else
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150$as_echo "no" >&6; }
5151fi
5152
5153
5154  test -n "$SORT" && break
5155done
5156
5157
5158    if test "x$SORT" = x; then
5159        if test "xsort" = x; then
5160          PROG_NAME=sort
5161        else
5162          PROG_NAME=sort
5163        fi
5164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5165$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5166        as_fn_error $? "Cannot continue" "$LINENO" 5
5167    fi
5168
5169
5170
5171    for ac_prog in tail
5172do
5173  # Extract the first word of "$ac_prog", so it can be a program name with args.
5174set dummy $ac_prog; ac_word=$2
5175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5176$as_echo_n "checking for $ac_word... " >&6; }
5177if test "${ac_cv_path_TAIL+set}" = set; then :
5178  $as_echo_n "(cached) " >&6
5179else
5180  case $TAIL in
5181  [\\/]* | ?:[\\/]*)
5182  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5183  ;;
5184  *)
5185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5186for as_dir in $PATH
5187do
5188  IFS=$as_save_IFS
5189  test -z "$as_dir" && as_dir=.
5190    for ac_exec_ext in '' $ac_executable_extensions; do
5191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5192    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5194    break 2
5195  fi
5196done
5197  done
5198IFS=$as_save_IFS
5199
5200  ;;
5201esac
5202fi
5203TAIL=$ac_cv_path_TAIL
5204if test -n "$TAIL"; then
5205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5206$as_echo "$TAIL" >&6; }
5207else
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5209$as_echo "no" >&6; }
5210fi
5211
5212
5213  test -n "$TAIL" && break
5214done
5215
5216
5217    if test "x$TAIL" = x; then
5218        if test "xtail" = x; then
5219          PROG_NAME=tail
5220        else
5221          PROG_NAME=tail
5222        fi
5223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5224$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5225        as_fn_error $? "Cannot continue" "$LINENO" 5
5226    fi
5227
5228
5229
5230    for ac_prog in tar
5231do
5232  # Extract the first word of "$ac_prog", so it can be a program name with args.
5233set dummy $ac_prog; ac_word=$2
5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5235$as_echo_n "checking for $ac_word... " >&6; }
5236if test "${ac_cv_path_TAR+set}" = set; then :
5237  $as_echo_n "(cached) " >&6
5238else
5239  case $TAR in
5240  [\\/]* | ?:[\\/]*)
5241  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5242  ;;
5243  *)
5244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247  IFS=$as_save_IFS
5248  test -z "$as_dir" && as_dir=.
5249    for ac_exec_ext in '' $ac_executable_extensions; do
5250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5251    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5253    break 2
5254  fi
5255done
5256  done
5257IFS=$as_save_IFS
5258
5259  ;;
5260esac
5261fi
5262TAR=$ac_cv_path_TAR
5263if test -n "$TAR"; then
5264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5265$as_echo "$TAR" >&6; }
5266else
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
5269fi
5270
5271
5272  test -n "$TAR" && break
5273done
5274
5275
5276    if test "x$TAR" = x; then
5277        if test "xtar" = x; then
5278          PROG_NAME=tar
5279        else
5280          PROG_NAME=tar
5281        fi
5282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5283$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5284        as_fn_error $? "Cannot continue" "$LINENO" 5
5285    fi
5286
5287
5288
5289    for ac_prog in tee
5290do
5291  # Extract the first word of "$ac_prog", so it can be a program name with args.
5292set dummy $ac_prog; ac_word=$2
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294$as_echo_n "checking for $ac_word... " >&6; }
5295if test "${ac_cv_path_TEE+set}" = set; then :
5296  $as_echo_n "(cached) " >&6
5297else
5298  case $TEE in
5299  [\\/]* | ?:[\\/]*)
5300  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5301  ;;
5302  *)
5303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH
5305do
5306  IFS=$as_save_IFS
5307  test -z "$as_dir" && as_dir=.
5308    for ac_exec_ext in '' $ac_executable_extensions; do
5309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5310    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312    break 2
5313  fi
5314done
5315  done
5316IFS=$as_save_IFS
5317
5318  ;;
5319esac
5320fi
5321TEE=$ac_cv_path_TEE
5322if test -n "$TEE"; then
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5324$as_echo "$TEE" >&6; }
5325else
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
5328fi
5329
5330
5331  test -n "$TEE" && break
5332done
5333
5334
5335    if test "x$TEE" = x; then
5336        if test "xtee" = x; then
5337          PROG_NAME=tee
5338        else
5339          PROG_NAME=tee
5340        fi
5341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5343        as_fn_error $? "Cannot continue" "$LINENO" 5
5344    fi
5345
5346
5347
5348    for ac_prog in touch
5349do
5350  # Extract the first word of "$ac_prog", so it can be a program name with args.
5351set dummy $ac_prog; ac_word=$2
5352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5353$as_echo_n "checking for $ac_word... " >&6; }
5354if test "${ac_cv_path_TOUCH+set}" = set; then :
5355  $as_echo_n "(cached) " >&6
5356else
5357  case $TOUCH in
5358  [\\/]* | ?:[\\/]*)
5359  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5360  ;;
5361  *)
5362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5363for as_dir in $PATH
5364do
5365  IFS=$as_save_IFS
5366  test -z "$as_dir" && as_dir=.
5367    for ac_exec_ext in '' $ac_executable_extensions; do
5368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5369    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5371    break 2
5372  fi
5373done
5374  done
5375IFS=$as_save_IFS
5376
5377  ;;
5378esac
5379fi
5380TOUCH=$ac_cv_path_TOUCH
5381if test -n "$TOUCH"; then
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5383$as_echo "$TOUCH" >&6; }
5384else
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }
5387fi
5388
5389
5390  test -n "$TOUCH" && break
5391done
5392
5393
5394    if test "x$TOUCH" = x; then
5395        if test "xtouch" = x; then
5396          PROG_NAME=touch
5397        else
5398          PROG_NAME=touch
5399        fi
5400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5402        as_fn_error $? "Cannot continue" "$LINENO" 5
5403    fi
5404
5405
5406
5407    for ac_prog in tr
5408do
5409  # Extract the first word of "$ac_prog", so it can be a program name with args.
5410set dummy $ac_prog; ac_word=$2
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5412$as_echo_n "checking for $ac_word... " >&6; }
5413if test "${ac_cv_path_TR+set}" = set; then :
5414  $as_echo_n "(cached) " >&6
5415else
5416  case $TR in
5417  [\\/]* | ?:[\\/]*)
5418  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5419  ;;
5420  *)
5421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5422for as_dir in $PATH
5423do
5424  IFS=$as_save_IFS
5425  test -z "$as_dir" && as_dir=.
5426    for ac_exec_ext in '' $ac_executable_extensions; do
5427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5428    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5430    break 2
5431  fi
5432done
5433  done
5434IFS=$as_save_IFS
5435
5436  ;;
5437esac
5438fi
5439TR=$ac_cv_path_TR
5440if test -n "$TR"; then
5441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5442$as_echo "$TR" >&6; }
5443else
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5445$as_echo "no" >&6; }
5446fi
5447
5448
5449  test -n "$TR" && break
5450done
5451
5452
5453    if test "x$TR" = x; then
5454        if test "xtr" = x; then
5455          PROG_NAME=tr
5456        else
5457          PROG_NAME=tr
5458        fi
5459        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5461        as_fn_error $? "Cannot continue" "$LINENO" 5
5462    fi
5463
5464
5465
5466    for ac_prog in uname
5467do
5468  # Extract the first word of "$ac_prog", so it can be a program name with args.
5469set dummy $ac_prog; ac_word=$2
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5471$as_echo_n "checking for $ac_word... " >&6; }
5472if test "${ac_cv_path_UNAME+set}" = set; then :
5473  $as_echo_n "(cached) " >&6
5474else
5475  case $UNAME in
5476  [\\/]* | ?:[\\/]*)
5477  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5478  ;;
5479  *)
5480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5481for as_dir in $PATH
5482do
5483  IFS=$as_save_IFS
5484  test -z "$as_dir" && as_dir=.
5485    for ac_exec_ext in '' $ac_executable_extensions; do
5486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5487    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5489    break 2
5490  fi
5491done
5492  done
5493IFS=$as_save_IFS
5494
5495  ;;
5496esac
5497fi
5498UNAME=$ac_cv_path_UNAME
5499if test -n "$UNAME"; then
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5501$as_echo "$UNAME" >&6; }
5502else
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5504$as_echo "no" >&6; }
5505fi
5506
5507
5508  test -n "$UNAME" && break
5509done
5510
5511
5512    if test "x$UNAME" = x; then
5513        if test "xuname" = x; then
5514          PROG_NAME=uname
5515        else
5516          PROG_NAME=uname
5517        fi
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5519$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5520        as_fn_error $? "Cannot continue" "$LINENO" 5
5521    fi
5522
5523
5524
5525    for ac_prog in uniq
5526do
5527  # Extract the first word of "$ac_prog", so it can be a program name with args.
5528set dummy $ac_prog; ac_word=$2
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530$as_echo_n "checking for $ac_word... " >&6; }
5531if test "${ac_cv_path_UNIQ+set}" = set; then :
5532  $as_echo_n "(cached) " >&6
5533else
5534  case $UNIQ in
5535  [\\/]* | ?:[\\/]*)
5536  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5537  ;;
5538  *)
5539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5540for as_dir in $PATH
5541do
5542  IFS=$as_save_IFS
5543  test -z "$as_dir" && as_dir=.
5544    for ac_exec_ext in '' $ac_executable_extensions; do
5545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5546    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5548    break 2
5549  fi
5550done
5551  done
5552IFS=$as_save_IFS
5553
5554  ;;
5555esac
5556fi
5557UNIQ=$ac_cv_path_UNIQ
5558if test -n "$UNIQ"; then
5559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5560$as_echo "$UNIQ" >&6; }
5561else
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
5564fi
5565
5566
5567  test -n "$UNIQ" && break
5568done
5569
5570
5571    if test "x$UNIQ" = x; then
5572        if test "xuniq" = x; then
5573          PROG_NAME=uniq
5574        else
5575          PROG_NAME=uniq
5576        fi
5577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5578$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5579        as_fn_error $? "Cannot continue" "$LINENO" 5
5580    fi
5581
5582
5583
5584    for ac_prog in wc
5585do
5586  # Extract the first word of "$ac_prog", so it can be a program name with args.
5587set dummy $ac_prog; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if test "${ac_cv_path_WC+set}" = set; then :
5591  $as_echo_n "(cached) " >&6
5592else
5593  case $WC in
5594  [\\/]* | ?:[\\/]*)
5595  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5596  ;;
5597  *)
5598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601  IFS=$as_save_IFS
5602  test -z "$as_dir" && as_dir=.
5603    for ac_exec_ext in '' $ac_executable_extensions; do
5604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5605    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5607    break 2
5608  fi
5609done
5610  done
5611IFS=$as_save_IFS
5612
5613  ;;
5614esac
5615fi
5616WC=$ac_cv_path_WC
5617if test -n "$WC"; then
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5619$as_echo "$WC" >&6; }
5620else
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623fi
5624
5625
5626  test -n "$WC" && break
5627done
5628
5629
5630    if test "x$WC" = x; then
5631        if test "xwc" = x; then
5632          PROG_NAME=wc
5633        else
5634          PROG_NAME=wc
5635        fi
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5637$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5638        as_fn_error $? "Cannot continue" "$LINENO" 5
5639    fi
5640
5641
5642
5643    for ac_prog in which
5644do
5645  # Extract the first word of "$ac_prog", so it can be a program name with args.
5646set dummy $ac_prog; ac_word=$2
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648$as_echo_n "checking for $ac_word... " >&6; }
5649if test "${ac_cv_path_WHICH+set}" = set; then :
5650  $as_echo_n "(cached) " >&6
5651else
5652  case $WHICH in
5653  [\\/]* | ?:[\\/]*)
5654  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5655  ;;
5656  *)
5657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658for as_dir in $PATH
5659do
5660  IFS=$as_save_IFS
5661  test -z "$as_dir" && as_dir=.
5662    for ac_exec_ext in '' $ac_executable_extensions; do
5663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5664    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666    break 2
5667  fi
5668done
5669  done
5670IFS=$as_save_IFS
5671
5672  ;;
5673esac
5674fi
5675WHICH=$ac_cv_path_WHICH
5676if test -n "$WHICH"; then
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5678$as_echo "$WHICH" >&6; }
5679else
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681$as_echo "no" >&6; }
5682fi
5683
5684
5685  test -n "$WHICH" && break
5686done
5687
5688
5689    if test "x$WHICH" = x; then
5690        if test "xwhich" = x; then
5691          PROG_NAME=which
5692        else
5693          PROG_NAME=which
5694        fi
5695        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5696$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5697        as_fn_error $? "Cannot continue" "$LINENO" 5
5698    fi
5699
5700
5701
5702    for ac_prog in xargs
5703do
5704  # Extract the first word of "$ac_prog", so it can be a program name with args.
5705set dummy $ac_prog; ac_word=$2
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
5708if test "${ac_cv_path_XARGS+set}" = set; then :
5709  $as_echo_n "(cached) " >&6
5710else
5711  case $XARGS in
5712  [\\/]* | ?:[\\/]*)
5713  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5714  ;;
5715  *)
5716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5717for as_dir in $PATH
5718do
5719  IFS=$as_save_IFS
5720  test -z "$as_dir" && as_dir=.
5721    for ac_exec_ext in '' $ac_executable_extensions; do
5722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5723    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5725    break 2
5726  fi
5727done
5728  done
5729IFS=$as_save_IFS
5730
5731  ;;
5732esac
5733fi
5734XARGS=$ac_cv_path_XARGS
5735if test -n "$XARGS"; then
5736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5737$as_echo "$XARGS" >&6; }
5738else
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740$as_echo "no" >&6; }
5741fi
5742
5743
5744  test -n "$XARGS" && break
5745done
5746
5747
5748    if test "x$XARGS" = x; then
5749        if test "xxargs" = x; then
5750          PROG_NAME=xargs
5751        else
5752          PROG_NAME=xargs
5753        fi
5754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5755$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5756        as_fn_error $? "Cannot continue" "$LINENO" 5
5757    fi
5758
5759
5760
5761# Then required tools that require some special treatment.
5762for ac_prog in gawk mawk nawk awk
5763do
5764  # Extract the first word of "$ac_prog", so it can be a program name with args.
5765set dummy $ac_prog; ac_word=$2
5766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5767$as_echo_n "checking for $ac_word... " >&6; }
5768if test "${ac_cv_prog_AWK+set}" = set; then :
5769  $as_echo_n "(cached) " >&6
5770else
5771  if test -n "$AWK"; then
5772  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5773else
5774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5775for as_dir in $PATH
5776do
5777  IFS=$as_save_IFS
5778  test -z "$as_dir" && as_dir=.
5779    for ac_exec_ext in '' $ac_executable_extensions; do
5780  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5781    ac_cv_prog_AWK="$ac_prog"
5782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5783    break 2
5784  fi
5785done
5786  done
5787IFS=$as_save_IFS
5788
5789fi
5790fi
5791AWK=$ac_cv_prog_AWK
5792if test -n "$AWK"; then
5793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5794$as_echo "$AWK" >&6; }
5795else
5796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797$as_echo "no" >&6; }
5798fi
5799
5800
5801  test -n "$AWK" && break
5802done
5803
5804
5805    if test "x$AWK" = x; then
5806        if test "x" = x; then
5807          PROG_NAME=awk
5808        else
5809          PROG_NAME=
5810        fi
5811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5813        as_fn_error $? "Cannot continue" "$LINENO" 5
5814    fi
5815
5816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5817$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5818if test "${ac_cv_path_GREP+set}" = set; then :
5819  $as_echo_n "(cached) " >&6
5820else
5821  if test -z "$GREP"; then
5822  ac_path_GREP_found=false
5823  # Loop through the user's path and test for each of PROGNAME-LIST
5824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5825for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5826do
5827  IFS=$as_save_IFS
5828  test -z "$as_dir" && as_dir=.
5829    for ac_prog in grep ggrep; do
5830    for ac_exec_ext in '' $ac_executable_extensions; do
5831      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5832      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5833# Check for GNU ac_path_GREP and select it if it is found.
5834  # Check for GNU $ac_path_GREP
5835case `"$ac_path_GREP" --version 2>&1` in
5836*GNU*)
5837  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5838*)
5839  ac_count=0
5840  $as_echo_n 0123456789 >"conftest.in"
5841  while :
5842  do
5843    cat "conftest.in" "conftest.in" >"conftest.tmp"
5844    mv "conftest.tmp" "conftest.in"
5845    cp "conftest.in" "conftest.nl"
5846    $as_echo 'GREP' >> "conftest.nl"
5847    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5848    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5849    as_fn_arith $ac_count + 1 && ac_count=$as_val
5850    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5851      # Best one so far, save it but keep looking for a better one
5852      ac_cv_path_GREP="$ac_path_GREP"
5853      ac_path_GREP_max=$ac_count
5854    fi
5855    # 10*(2^10) chars as input seems more than enough
5856    test $ac_count -gt 10 && break
5857  done
5858  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5859esac
5860
5861      $ac_path_GREP_found && break 3
5862    done
5863  done
5864  done
5865IFS=$as_save_IFS
5866  if test -z "$ac_cv_path_GREP"; then
5867    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5868  fi
5869else
5870  ac_cv_path_GREP=$GREP
5871fi
5872
5873fi
5874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5875$as_echo "$ac_cv_path_GREP" >&6; }
5876 GREP="$ac_cv_path_GREP"
5877
5878
5879
5880    if test "x$GREP" = x; then
5881        if test "x" = x; then
5882          PROG_NAME=grep
5883        else
5884          PROG_NAME=
5885        fi
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5887$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5888        as_fn_error $? "Cannot continue" "$LINENO" 5
5889    fi
5890
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5892$as_echo_n "checking for egrep... " >&6; }
5893if test "${ac_cv_path_EGREP+set}" = set; then :
5894  $as_echo_n "(cached) " >&6
5895else
5896  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5897   then ac_cv_path_EGREP="$GREP -E"
5898   else
5899     if test -z "$EGREP"; then
5900  ac_path_EGREP_found=false
5901  # Loop through the user's path and test for each of PROGNAME-LIST
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_prog in egrep; do
5908    for ac_exec_ext in '' $ac_executable_extensions; do
5909      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5910      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5911# Check for GNU ac_path_EGREP and select it if it is found.
5912  # Check for GNU $ac_path_EGREP
5913case `"$ac_path_EGREP" --version 2>&1` in
5914*GNU*)
5915  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5916*)
5917  ac_count=0
5918  $as_echo_n 0123456789 >"conftest.in"
5919  while :
5920  do
5921    cat "conftest.in" "conftest.in" >"conftest.tmp"
5922    mv "conftest.tmp" "conftest.in"
5923    cp "conftest.in" "conftest.nl"
5924    $as_echo 'EGREP' >> "conftest.nl"
5925    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5926    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5927    as_fn_arith $ac_count + 1 && ac_count=$as_val
5928    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5929      # Best one so far, save it but keep looking for a better one
5930      ac_cv_path_EGREP="$ac_path_EGREP"
5931      ac_path_EGREP_max=$ac_count
5932    fi
5933    # 10*(2^10) chars as input seems more than enough
5934    test $ac_count -gt 10 && break
5935  done
5936  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5937esac
5938
5939      $ac_path_EGREP_found && break 3
5940    done
5941  done
5942  done
5943IFS=$as_save_IFS
5944  if test -z "$ac_cv_path_EGREP"; then
5945    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5946  fi
5947else
5948  ac_cv_path_EGREP=$EGREP
5949fi
5950
5951   fi
5952fi
5953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5954$as_echo "$ac_cv_path_EGREP" >&6; }
5955 EGREP="$ac_cv_path_EGREP"
5956
5957
5958
5959    if test "x$EGREP" = x; then
5960        if test "x" = x; then
5961          PROG_NAME=egrep
5962        else
5963          PROG_NAME=
5964        fi
5965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5967        as_fn_error $? "Cannot continue" "$LINENO" 5
5968    fi
5969
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5971$as_echo_n "checking for fgrep... " >&6; }
5972if test "${ac_cv_path_FGREP+set}" = set; then :
5973  $as_echo_n "(cached) " >&6
5974else
5975  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5976   then ac_cv_path_FGREP="$GREP -F"
5977   else
5978     if test -z "$FGREP"; then
5979  ac_path_FGREP_found=false
5980  # Loop through the user's path and test for each of PROGNAME-LIST
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_prog in fgrep; do
5987    for ac_exec_ext in '' $ac_executable_extensions; do
5988      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5989      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
5990# Check for GNU ac_path_FGREP and select it if it is found.
5991  # Check for GNU $ac_path_FGREP
5992case `"$ac_path_FGREP" --version 2>&1` in
5993*GNU*)
5994  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5995*)
5996  ac_count=0
5997  $as_echo_n 0123456789 >"conftest.in"
5998  while :
5999  do
6000    cat "conftest.in" "conftest.in" >"conftest.tmp"
6001    mv "conftest.tmp" "conftest.in"
6002    cp "conftest.in" "conftest.nl"
6003    $as_echo 'FGREP' >> "conftest.nl"
6004    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6005    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6006    as_fn_arith $ac_count + 1 && ac_count=$as_val
6007    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6008      # Best one so far, save it but keep looking for a better one
6009      ac_cv_path_FGREP="$ac_path_FGREP"
6010      ac_path_FGREP_max=$ac_count
6011    fi
6012    # 10*(2^10) chars as input seems more than enough
6013    test $ac_count -gt 10 && break
6014  done
6015  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6016esac
6017
6018      $ac_path_FGREP_found && break 3
6019    done
6020  done
6021  done
6022IFS=$as_save_IFS
6023  if test -z "$ac_cv_path_FGREP"; then
6024    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6025  fi
6026else
6027  ac_cv_path_FGREP=$FGREP
6028fi
6029
6030   fi
6031fi
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6033$as_echo "$ac_cv_path_FGREP" >&6; }
6034 FGREP="$ac_cv_path_FGREP"
6035
6036
6037
6038    if test "x$FGREP" = x; then
6039        if test "x" = x; then
6040          PROG_NAME=fgrep
6041        else
6042          PROG_NAME=
6043        fi
6044        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6045$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6046        as_fn_error $? "Cannot continue" "$LINENO" 5
6047    fi
6048
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6050$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6051if test "${ac_cv_path_SED+set}" = set; then :
6052  $as_echo_n "(cached) " >&6
6053else
6054            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6055     for ac_i in 1 2 3 4 5 6 7; do
6056       ac_script="$ac_script$as_nl$ac_script"
6057     done
6058     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6059     { ac_script=; unset ac_script;}
6060     if test -z "$SED"; then
6061  ac_path_SED_found=false
6062  # Loop through the user's path and test for each of PROGNAME-LIST
6063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064for as_dir in $PATH
6065do
6066  IFS=$as_save_IFS
6067  test -z "$as_dir" && as_dir=.
6068    for ac_prog in sed gsed; do
6069    for ac_exec_ext in '' $ac_executable_extensions; do
6070      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6071      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6072# Check for GNU ac_path_SED and select it if it is found.
6073  # Check for GNU $ac_path_SED
6074case `"$ac_path_SED" --version 2>&1` in
6075*GNU*)
6076  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6077*)
6078  ac_count=0
6079  $as_echo_n 0123456789 >"conftest.in"
6080  while :
6081  do
6082    cat "conftest.in" "conftest.in" >"conftest.tmp"
6083    mv "conftest.tmp" "conftest.in"
6084    cp "conftest.in" "conftest.nl"
6085    $as_echo '' >> "conftest.nl"
6086    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6087    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6088    as_fn_arith $ac_count + 1 && ac_count=$as_val
6089    if test $ac_count -gt ${ac_path_SED_max-0}; then
6090      # Best one so far, save it but keep looking for a better one
6091      ac_cv_path_SED="$ac_path_SED"
6092      ac_path_SED_max=$ac_count
6093    fi
6094    # 10*(2^10) chars as input seems more than enough
6095    test $ac_count -gt 10 && break
6096  done
6097  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6098esac
6099
6100      $ac_path_SED_found && break 3
6101    done
6102  done
6103  done
6104IFS=$as_save_IFS
6105  if test -z "$ac_cv_path_SED"; then
6106    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6107  fi
6108else
6109  ac_cv_path_SED=$SED
6110fi
6111
6112fi
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6114$as_echo "$ac_cv_path_SED" >&6; }
6115 SED="$ac_cv_path_SED"
6116  rm -f conftest.sed
6117
6118
6119    if test "x$SED" = x; then
6120        if test "x" = x; then
6121          PROG_NAME=sed
6122        else
6123          PROG_NAME=
6124        fi
6125        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6126$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6127        as_fn_error $? "Cannot continue" "$LINENO" 5
6128    fi
6129
6130
6131for ac_prog in nawk gawk awk
6132do
6133  # Extract the first word of "$ac_prog", so it can be a program name with args.
6134set dummy $ac_prog; ac_word=$2
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
6137if test "${ac_cv_path_NAWK+set}" = set; then :
6138  $as_echo_n "(cached) " >&6
6139else
6140  case $NAWK in
6141  [\\/]* | ?:[\\/]*)
6142  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6143  ;;
6144  *)
6145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6146for as_dir in $PATH
6147do
6148  IFS=$as_save_IFS
6149  test -z "$as_dir" && as_dir=.
6150    for ac_exec_ext in '' $ac_executable_extensions; do
6151  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6152    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6154    break 2
6155  fi
6156done
6157  done
6158IFS=$as_save_IFS
6159
6160  ;;
6161esac
6162fi
6163NAWK=$ac_cv_path_NAWK
6164if test -n "$NAWK"; then
6165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6166$as_echo "$NAWK" >&6; }
6167else
6168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
6170fi
6171
6172
6173  test -n "$NAWK" && break
6174done
6175
6176
6177    if test "x$NAWK" = x; then
6178        if test "x" = x; then
6179          PROG_NAME=nawk
6180        else
6181          PROG_NAME=
6182        fi
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6184$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6185        as_fn_error $? "Cannot continue" "$LINENO" 5
6186    fi
6187
6188
6189# Always force rm.
6190RM="$RM -f"
6191
6192# These are not required on all platforms
6193# Extract the first word of "cygpath", so it can be a program name with args.
6194set dummy cygpath; ac_word=$2
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6196$as_echo_n "checking for $ac_word... " >&6; }
6197if test "${ac_cv_path_CYGPATH+set}" = set; then :
6198  $as_echo_n "(cached) " >&6
6199else
6200  case $CYGPATH in
6201  [\\/]* | ?:[\\/]*)
6202  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6203  ;;
6204  *)
6205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208  IFS=$as_save_IFS
6209  test -z "$as_dir" && as_dir=.
6210    for ac_exec_ext in '' $ac_executable_extensions; do
6211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6212    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214    break 2
6215  fi
6216done
6217  done
6218IFS=$as_save_IFS
6219
6220  ;;
6221esac
6222fi
6223CYGPATH=$ac_cv_path_CYGPATH
6224if test -n "$CYGPATH"; then
6225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6226$as_echo "$CYGPATH" >&6; }
6227else
6228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229$as_echo "no" >&6; }
6230fi
6231
6232
6233# Extract the first word of "readlink", so it can be a program name with args.
6234set dummy readlink; ac_word=$2
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6236$as_echo_n "checking for $ac_word... " >&6; }
6237if test "${ac_cv_path_READLINK+set}" = set; then :
6238  $as_echo_n "(cached) " >&6
6239else
6240  case $READLINK in
6241  [\\/]* | ?:[\\/]*)
6242  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6243  ;;
6244  *)
6245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248  IFS=$as_save_IFS
6249  test -z "$as_dir" && as_dir=.
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6252    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6254    break 2
6255  fi
6256done
6257  done
6258IFS=$as_save_IFS
6259
6260  ;;
6261esac
6262fi
6263READLINK=$ac_cv_path_READLINK
6264if test -n "$READLINK"; then
6265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6266$as_echo "$READLINK" >&6; }
6267else
6268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6269$as_echo "no" >&6; }
6270fi
6271
6272
6273# Extract the first word of "df", so it can be a program name with args.
6274set dummy df; ac_word=$2
6275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6276$as_echo_n "checking for $ac_word... " >&6; }
6277if test "${ac_cv_path_DF+set}" = set; then :
6278  $as_echo_n "(cached) " >&6
6279else
6280  case $DF in
6281  [\\/]* | ?:[\\/]*)
6282  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6283  ;;
6284  *)
6285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6286for as_dir in $PATH
6287do
6288  IFS=$as_save_IFS
6289  test -z "$as_dir" && as_dir=.
6290    for ac_exec_ext in '' $ac_executable_extensions; do
6291  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6292    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6294    break 2
6295  fi
6296done
6297  done
6298IFS=$as_save_IFS
6299
6300  ;;
6301esac
6302fi
6303DF=$ac_cv_path_DF
6304if test -n "$DF"; then
6305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6306$as_echo "$DF" >&6; }
6307else
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6309$as_echo "no" >&6; }
6310fi
6311
6312
6313# Extract the first word of "SetFile", so it can be a program name with args.
6314set dummy SetFile; ac_word=$2
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316$as_echo_n "checking for $ac_word... " >&6; }
6317if test "${ac_cv_path_SETFILE+set}" = set; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  case $SETFILE in
6321  [\\/]* | ?:[\\/]*)
6322  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6323  ;;
6324  *)
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334    break 2
6335  fi
6336done
6337  done
6338IFS=$as_save_IFS
6339
6340  ;;
6341esac
6342fi
6343SETFILE=$ac_cv_path_SETFILE
6344if test -n "$SETFILE"; then
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6346$as_echo "$SETFILE" >&6; }
6347else
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
6350fi
6351
6352
6353
6354
6355# Now we can determine OpenJDK build and target platforms. This is required to
6356# have early on.
6357# Make sure we can run config.sub.
6358$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6359  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6360
6361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6362$as_echo_n "checking build system type... " >&6; }
6363if test "${ac_cv_build+set}" = set; then :
6364  $as_echo_n "(cached) " >&6
6365else
6366  ac_build_alias=$build_alias
6367test "x$ac_build_alias" = x &&
6368  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6369test "x$ac_build_alias" = x &&
6370  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6371ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6372  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6373
6374fi
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6376$as_echo "$ac_cv_build" >&6; }
6377case $ac_cv_build in
6378*-*-*) ;;
6379*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6380esac
6381build=$ac_cv_build
6382ac_save_IFS=$IFS; IFS='-'
6383set x $ac_cv_build
6384shift
6385build_cpu=$1
6386build_vendor=$2
6387shift; shift
6388# Remember, the first character of IFS is used to create $*,
6389# except with old shells:
6390build_os=$*
6391IFS=$ac_save_IFS
6392case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6393
6394
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6396$as_echo_n "checking host system type... " >&6; }
6397if test "${ac_cv_host+set}" = set; then :
6398  $as_echo_n "(cached) " >&6
6399else
6400  if test "x$host_alias" = x; then
6401  ac_cv_host=$ac_cv_build
6402else
6403  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6404    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6405fi
6406
6407fi
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6409$as_echo "$ac_cv_host" >&6; }
6410case $ac_cv_host in
6411*-*-*) ;;
6412*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6413esac
6414host=$ac_cv_host
6415ac_save_IFS=$IFS; IFS='-'
6416set x $ac_cv_host
6417shift
6418host_cpu=$1
6419host_vendor=$2
6420shift; shift
6421# Remember, the first character of IFS is used to create $*,
6422# except with old shells:
6423host_os=$*
6424IFS=$ac_save_IFS
6425case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6426
6427
6428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6429$as_echo_n "checking target system type... " >&6; }
6430if test "${ac_cv_target+set}" = set; then :
6431  $as_echo_n "(cached) " >&6
6432else
6433  if test "x$target_alias" = x; then
6434  ac_cv_target=$ac_cv_host
6435else
6436  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6437    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6438fi
6439
6440fi
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6442$as_echo "$ac_cv_target" >&6; }
6443case $ac_cv_target in
6444*-*-*) ;;
6445*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6446esac
6447target=$ac_cv_target
6448ac_save_IFS=$IFS; IFS='-'
6449set x $ac_cv_target
6450shift
6451target_cpu=$1
6452target_vendor=$2
6453shift; shift
6454# Remember, the first character of IFS is used to create $*,
6455# except with old shells:
6456target_os=$*
6457IFS=$ac_save_IFS
6458case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6459
6460
6461# The aliases save the names the user supplied, while $host etc.
6462# will get canonicalized.
6463test -n "$target_alias" &&
6464  test "$program_prefix$program_suffix$program_transform_name" = \
6465    NONENONEs,x,x, &&
6466  program_prefix=${target_alias}-
6467
6468# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6469# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6470# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6471# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6472# to use the configure naming style.
6473
6474
6475
6476
6477
6478    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6479    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6480    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6481    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6482    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6483    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6484
6485
6486
6487    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6488
6489  case "$build_os" in
6490    *linux*)
6491      VAR_OS=linux
6492      VAR_OS_API=posix
6493      VAR_OS_ENV=linux
6494      ;;
6495    *solaris*)
6496      VAR_OS=solaris
6497      VAR_OS_API=posix
6498      VAR_OS_ENV=solaris
6499      ;;
6500    *darwin*)
6501      VAR_OS=macosx
6502      VAR_OS_API=posix
6503      VAR_OS_ENV=macosx
6504      ;;
6505    *bsd*)
6506      VAR_OS=bsd
6507      VAR_OS_API=posix
6508      VAR_OS_ENV=bsd
6509      ;;
6510    *cygwin*)
6511      VAR_OS=windows
6512      VAR_OS_API=winapi
6513      VAR_OS_ENV=windows.cygwin
6514      ;;
6515    *mingw*)
6516      VAR_OS=windows
6517      VAR_OS_API=winapi
6518      VAR_OS_ENV=windows.msys
6519      ;;
6520    *)
6521      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6522      ;;
6523  esac
6524
6525
6526  # First argument is the cpu name from the trip/quad
6527  case "$build_cpu" in
6528    x86_64)
6529      VAR_CPU=x86_64
6530      VAR_CPU_ARCH=x86
6531      VAR_CPU_BITS=64
6532      VAR_CPU_ENDIAN=little
6533      ;;
6534    i?86)
6535      VAR_CPU=x86
6536      VAR_CPU_ARCH=x86
6537      VAR_CPU_BITS=32
6538      VAR_CPU_ENDIAN=little
6539      ;;
6540    arm*)
6541      VAR_CPU=arm
6542      VAR_CPU_ARCH=arm
6543      VAR_CPU_BITS=32
6544      VAR_CPU_ENDIAN=little
6545      ;;
6546    powerpc)
6547      VAR_CPU=ppc
6548      VAR_CPU_ARCH=ppc
6549      VAR_CPU_BITS=32
6550      VAR_CPU_ENDIAN=big
6551       ;;
6552    powerpc64)
6553      VAR_CPU=ppc64
6554      VAR_CPU_ARCH=ppc
6555      VAR_CPU_BITS=64
6556      VAR_CPU_ENDIAN=big
6557       ;;
6558    sparc)
6559      VAR_CPU=sparc
6560      VAR_CPU_ARCH=sparc
6561      VAR_CPU_BITS=32
6562      VAR_CPU_ENDIAN=big
6563       ;;
6564    sparcv9)
6565      VAR_CPU=sparcv9
6566      VAR_CPU_ARCH=sparc
6567      VAR_CPU_BITS=64
6568      VAR_CPU_ENDIAN=big
6569       ;;
6570    *)
6571      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6572      ;;
6573  esac
6574
6575    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6576    OPENJDK_BUILD_OS="$VAR_OS"
6577    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6578    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6579    OPENJDK_BUILD_CPU="$VAR_CPU"
6580    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6581    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6582    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6583
6584
6585
6586
6587
6588
6589
6590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6591$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6593$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6594
6595    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6596
6597  case "$host_os" in
6598    *linux*)
6599      VAR_OS=linux
6600      VAR_OS_API=posix
6601      VAR_OS_ENV=linux
6602      ;;
6603    *solaris*)
6604      VAR_OS=solaris
6605      VAR_OS_API=posix
6606      VAR_OS_ENV=solaris
6607      ;;
6608    *darwin*)
6609      VAR_OS=macosx
6610      VAR_OS_API=posix
6611      VAR_OS_ENV=macosx
6612      ;;
6613    *bsd*)
6614      VAR_OS=bsd
6615      VAR_OS_API=posix
6616      VAR_OS_ENV=bsd
6617      ;;
6618    *cygwin*)
6619      VAR_OS=windows
6620      VAR_OS_API=winapi
6621      VAR_OS_ENV=windows.cygwin
6622      ;;
6623    *mingw*)
6624      VAR_OS=windows
6625      VAR_OS_API=winapi
6626      VAR_OS_ENV=windows.msys
6627      ;;
6628    *)
6629      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6630      ;;
6631  esac
6632
6633
6634  # First argument is the cpu name from the trip/quad
6635  case "$host_cpu" in
6636    x86_64)
6637      VAR_CPU=x86_64
6638      VAR_CPU_ARCH=x86
6639      VAR_CPU_BITS=64
6640      VAR_CPU_ENDIAN=little
6641      ;;
6642    i?86)
6643      VAR_CPU=x86
6644      VAR_CPU_ARCH=x86
6645      VAR_CPU_BITS=32
6646      VAR_CPU_ENDIAN=little
6647      ;;
6648    arm*)
6649      VAR_CPU=arm
6650      VAR_CPU_ARCH=arm
6651      VAR_CPU_BITS=32
6652      VAR_CPU_ENDIAN=little
6653      ;;
6654    powerpc)
6655      VAR_CPU=ppc
6656      VAR_CPU_ARCH=ppc
6657      VAR_CPU_BITS=32
6658      VAR_CPU_ENDIAN=big
6659       ;;
6660    powerpc64)
6661      VAR_CPU=ppc64
6662      VAR_CPU_ARCH=ppc
6663      VAR_CPU_BITS=64
6664      VAR_CPU_ENDIAN=big
6665       ;;
6666    sparc)
6667      VAR_CPU=sparc
6668      VAR_CPU_ARCH=sparc
6669      VAR_CPU_BITS=32
6670      VAR_CPU_ENDIAN=big
6671       ;;
6672    sparcv9)
6673      VAR_CPU=sparcv9
6674      VAR_CPU_ARCH=sparc
6675      VAR_CPU_BITS=64
6676      VAR_CPU_ENDIAN=big
6677       ;;
6678    *)
6679      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6680      ;;
6681  esac
6682
6683    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6684    OPENJDK_TARGET_OS="$VAR_OS"
6685    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6686    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6687    OPENJDK_TARGET_CPU="$VAR_CPU"
6688    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6689    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6690    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6691
6692
6693
6694
6695
6696
6697
6698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6699$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6701$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6702
6703
6704
6705# Check whether --with-target-bits was given.
6706if test "${with_target_bits+set}" = set; then :
6707  withval=$with_target_bits;
6708fi
6709
6710
6711  # We have three types of compiles:
6712  # native  == normal compilation, target system == build system
6713  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6714  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6715  #
6716  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6717    # We're doing a proper cross-compilation
6718    COMPILE_TYPE="cross"
6719  else
6720    COMPILE_TYPE="native"
6721  fi
6722
6723  if test "x$with_target_bits" != x; then
6724    if test "x$COMPILE_TYPE" = "xcross"; then
6725      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6726    fi
6727
6728    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6729      # A reduced build is requested
6730      COMPILE_TYPE="reduced"
6731      OPENJDK_TARGET_CPU_BITS=32
6732      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6733        OPENJDK_TARGET_CPU=x86
6734      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6735        OPENJDK_TARGET_CPU=sparc
6736      else
6737        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6738      fi
6739    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6740      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
6741    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6742      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6743$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6744    else
6745      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6746    fi
6747  fi
6748
6749
6750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6751$as_echo_n "checking compilation type... " >&6; }
6752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6753$as_echo "$COMPILE_TYPE" >&6; }
6754
6755
6756    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6757       REQUIRED_OS_NAME=SunOS
6758       REQUIRED_OS_VERSION=5.10
6759    fi
6760    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6761       REQUIRED_OS_NAME=Linux
6762       REQUIRED_OS_VERSION=2.6
6763    fi
6764    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6765        REQUIRED_OS_NAME=Windows
6766        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6767            REQUIRED_OS_VERSION=5.2
6768        else
6769            REQUIRED_OS_VERSION=5.1
6770        fi
6771    fi
6772    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6773        REQUIRED_OS_NAME=Darwin
6774        REQUIRED_OS_VERSION=11.2
6775    fi
6776
6777
6778
6779
6780
6781    # Also store the legacy naming of the cpu.
6782    # Ie i586 and amd64 instead of x86 and x86_64
6783    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6784    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6785      OPENJDK_TARGET_CPU_LEGACY="i586"
6786    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6787      # On all platforms except MacOSX replace x86_64 with amd64.
6788      OPENJDK_TARGET_CPU_LEGACY="amd64"
6789    fi
6790
6791
6792    # And the second legacy naming of the cpu.
6793    # Ie i386 and amd64 instead of x86 and x86_64.
6794    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6795    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6796      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6797    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6798      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6799    fi
6800
6801
6802    # This is the name of the cpu (but using i386 and amd64 instead of
6803    # x86 and x86_64, respectively), preceeded by a /, to be used when
6804    # locating libraries. On macosx, it's empty, though.
6805    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6806    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6807        OPENJDK_TARGET_CPU_LIBDIR=""
6808    fi
6809
6810
6811    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6812    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6813    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6814    OPENJDK_TARGET_CPU_ISADIR=""
6815    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6816      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6817          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6818      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6819          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6820      fi
6821    fi
6822
6823
6824    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6825    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6826    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6827      # On linux only, we replace x86 with i386.
6828      OPENJDK_TARGET_CPU_OSARCH="i386"
6829    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6830      # On all platforms except macosx, we replace x86_64 with amd64.
6831      OPENJDK_TARGET_CPU_OSARCH="amd64"
6832    fi
6833
6834
6835    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6836    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6837      OPENJDK_TARGET_CPU_JLI="i386"
6838    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6839      # On all platforms except macosx, we replace x86_64 with amd64.
6840      OPENJDK_TARGET_CPU_JLI="amd64"
6841    fi
6842    # Now setup the -D flags for building libjli.
6843    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6844    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6845      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6846        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6847      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6848        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6849      fi
6850    fi
6851
6852
6853    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6854    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6855        OPENJDK_TARGET_OS_API_DIR="solaris"
6856    fi
6857    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6858        OPENJDK_TARGET_OS_API_DIR="windows"
6859    fi
6860
6861
6862    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6863        A_LP64="LP64:="
6864        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6865        # unpack200.exe
6866        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6867            ADD_LP64="-D_LP64=1"
6868        fi
6869    fi
6870    LP64=$A_LP64
6871
6872
6873    if test "x$COMPILE_TYPE" = "xcross"; then
6874      # FIXME: ... or should this include reduced builds..?
6875      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6876    else
6877      DEFINE_CROSS_COMPILE_ARCH=""
6878    fi
6879
6880
6881
6882
6883# Continue setting up basic stuff. Most remaining code require fundamental tools.
6884
6885# Locate the directory of this script.
6886SCRIPT="$0"
6887
6888    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6889        # Follow a chain of symbolic links. Use readlink
6890        # where it exists, else fall back to horribly
6891        # complicated shell code.
6892        if test "x$READLINK_TESTED" != yes; then
6893            # On MacOSX there is a readlink tool with a different
6894            # purpose than the GNU readlink tool. Check the found readlink.
6895            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6896            if test "x$ISGNU" = x; then
6897                 # A readlink that we do not know how to use.
6898                 # Are there other non-GNU readlinks out there?
6899                 READLINK_TESTED=yes
6900                 READLINK=
6901            fi
6902        fi
6903
6904        if test "x$READLINK" != x; then
6905            SCRIPT=`$READLINK -f $SCRIPT`
6906        else
6907            STARTDIR=$PWD
6908            COUNTER=0
6909            DIR=`$DIRNAME $SCRIPT`
6910            FILE=`$BASENAME $SCRIPT`
6911            while test $COUNTER -lt 20; do
6912                ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6913                if test "x$ISLINK" == x; then
6914                    # This is not a symbolic link! We are done!
6915                    break
6916                fi
6917                # The link might be relative! We have to use cd to travel safely.
6918                cd $DIR
6919                # ... and we must get the to the absolute path, not one using symbolic links.
6920                cd `pwd -P`
6921                cd `$DIRNAME $ISLINK`
6922                DIR=`$THEPWDCMD`
6923                FILE=`$BASENAME $ISLINK`
6924                let COUNTER=COUNTER+1
6925            done
6926            cd $STARTDIR
6927            SCRIPT=$DIR/$FILE
6928        fi
6929    fi
6930
6931AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6932
6933# Where is the source? It is located two levels above the configure script.
6934CURDIR="$PWD"
6935cd "$AUTOCONF_DIR/../.."
6936SRC_ROOT="`pwd`"
6937
6938if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6939  PATH_SEP=";"
6940
6941  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6942  if test $SRC_ROOT_LENGTH -gt 100; then
6943      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6944  fi
6945
6946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6948$as_echo_n "checking cygwin release... " >&6; }
6949    CYGWIN_VERSION=`$UNAME -r`
6950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6951$as_echo "$CYGWIN_VERSION" >&6; }
6952    WINDOWS_ENV_VENDOR='cygwin'
6953    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6954
6955    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6956    if test "x$CYGWIN_VERSION_OK" = x; then
6957      { $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
6958$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;}
6959      as_fn_error $? "Cannot continue" "$LINENO" 5
6960    fi
6961    if test "x$CYGPATH" = x; then
6962        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6963    fi
6964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6965$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6966    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6967    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6968    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6969    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6971$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6972    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6973    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6974    if test "x$test_cygdrive_prefix" = x; then
6975        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6976    fi
6977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6979$as_echo_n "checking msys release... " >&6; }
6980    MSYS_VERSION=`$UNAME -r`
6981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6982$as_echo "$MSYS_VERSION" >&6; }
6983
6984    WINDOWS_ENV_VENDOR='msys'
6985    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6986
6987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
6988$as_echo_n "checking msys root directory as unix-style path... " >&6; }
6989    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6990    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
6991
6992  windows_path="$MSYS_ROOT_PATH"
6993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6994    unix_path=`$CYGPATH -u "$windows_path"`
6995    MSYS_ROOT_PATH="$unix_path"
6996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6998    MSYS_ROOT_PATH="$unix_path"
6999  fi
7000
7001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7002$as_echo "$MSYS_ROOT_PATH" >&6; }
7003    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7004  else
7005    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7006  fi
7007
7008  # Test if windows or unix (cygwin/msys) find is first in path.
7009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7010$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7011  FIND_BINARY_OUTPUT=`find --version 2>&1`
7012  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7014$as_echo "unix style" >&6; }
7015  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7017$as_echo "Windows" >&6; }
7018    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7019$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7020    { $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
7021$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7022    as_fn_error $? "Cannot continue" "$LINENO" 5
7023  else
7024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7025$as_echo "unknown" >&6; }
7026    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7027$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7028  fi
7029
7030else
7031  PATH_SEP=":"
7032fi
7033
7034
7035
7036cd "$CURDIR"
7037
7038
7039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7040
7041  # Input might be given as Windows format, start by converting to
7042  # unix format.
7043  path="$SRC_ROOT"
7044  new_path=`$CYGPATH -u "$path"`
7045
7046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7049  # "foo.exe" is OK but "foo" is an error.
7050  #
7051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7052  # It is also a way to make sure we got the proper file name for the real test later on.
7053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7054  if test "x$test_shortpath" = x; then
7055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7056$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7057    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7058  fi
7059
7060  # Call helper function which possibly converts this using DOS-style short mode.
7061  # If so, the updated path is stored in $new_path.
7062
7063  input_path="$new_path"
7064  # Check if we need to convert this using DOS-style short mode. If the path
7065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7066  # take no chances and rewrite it.
7067  # Note: m4 eats our [], so we need to use [ and ] instead.
7068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7069  if test "x$has_forbidden_chars" != x; then
7070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7074      # Going to short mode and back again did indeed matter. Since short mode is
7075      # case insensitive, let's make it lowercase to improve readability.
7076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7077      # Now convert it back to Unix-stile (cygpath)
7078      input_path=`$CYGPATH -u "$shortmode_path"`
7079      new_path="$input_path"
7080    fi
7081  fi
7082
7083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7084  if test "x$test_cygdrive_prefix" = x; then
7085    # As a simple fix, exclude /usr/bin since it's not a real path.
7086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7088      # a path prefixed by /cygdrive for fixpath to work.
7089      new_path="$CYGWIN_ROOT_PATH$input_path"
7090    fi
7091  fi
7092
7093
7094  if test "x$path" != "x$new_path"; then
7095    SRC_ROOT="$new_path"
7096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7097$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7098  fi
7099
7100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7101
7102  path="$SRC_ROOT"
7103  has_colon=`$ECHO $path | $GREP ^.:`
7104  new_path="$path"
7105  if test "x$has_colon" = x; then
7106    # Not in mixed or Windows style, start by that.
7107    new_path=`cmd //c echo $path`
7108  fi
7109
7110
7111  input_path="$new_path"
7112  # Check if we need to convert this using DOS-style short mode. If the path
7113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7114  # take no chances and rewrite it.
7115  # Note: m4 eats our [], so we need to use [ and ] instead.
7116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7117  if test "x$has_forbidden_chars" != x; then
7118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7120  fi
7121
7122
7123  windows_path="$new_path"
7124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7125    unix_path=`$CYGPATH -u "$windows_path"`
7126    new_path="$unix_path"
7127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7129    new_path="$unix_path"
7130  fi
7131
7132  if test "x$path" != "x$new_path"; then
7133    SRC_ROOT="$new_path"
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7135$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7136  fi
7137
7138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7140
7141  else
7142    # We're on a posix platform. Hooray! :)
7143    path="$SRC_ROOT"
7144
7145    if test ! -f "$path" && test ! -d "$path"; then
7146      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7147    fi
7148
7149    has_space=`$ECHO "$path" | $GREP " "`
7150    if test "x$has_space" != x; then
7151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7152$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7154    fi
7155  fi
7156
7157
7158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7159
7160  # Input might be given as Windows format, start by converting to
7161  # unix format.
7162  path="$CURDIR"
7163  new_path=`$CYGPATH -u "$path"`
7164
7165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7168  # "foo.exe" is OK but "foo" is an error.
7169  #
7170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7171  # It is also a way to make sure we got the proper file name for the real test later on.
7172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7173  if test "x$test_shortpath" = x; then
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7175$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7176    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7177  fi
7178
7179  # Call helper function which possibly converts this using DOS-style short mode.
7180  # If so, the updated path is stored in $new_path.
7181
7182  input_path="$new_path"
7183  # Check if we need to convert this using DOS-style short mode. If the path
7184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7185  # take no chances and rewrite it.
7186  # Note: m4 eats our [], so we need to use [ and ] instead.
7187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7188  if test "x$has_forbidden_chars" != x; then
7189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7193      # Going to short mode and back again did indeed matter. Since short mode is
7194      # case insensitive, let's make it lowercase to improve readability.
7195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7196      # Now convert it back to Unix-stile (cygpath)
7197      input_path=`$CYGPATH -u "$shortmode_path"`
7198      new_path="$input_path"
7199    fi
7200  fi
7201
7202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7203  if test "x$test_cygdrive_prefix" = x; then
7204    # As a simple fix, exclude /usr/bin since it's not a real path.
7205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7207      # a path prefixed by /cygdrive for fixpath to work.
7208      new_path="$CYGWIN_ROOT_PATH$input_path"
7209    fi
7210  fi
7211
7212
7213  if test "x$path" != "x$new_path"; then
7214    CURDIR="$new_path"
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7216$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7217  fi
7218
7219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7220
7221  path="$CURDIR"
7222  has_colon=`$ECHO $path | $GREP ^.:`
7223  new_path="$path"
7224  if test "x$has_colon" = x; then
7225    # Not in mixed or Windows style, start by that.
7226    new_path=`cmd //c echo $path`
7227  fi
7228
7229
7230  input_path="$new_path"
7231  # Check if we need to convert this using DOS-style short mode. If the path
7232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7233  # take no chances and rewrite it.
7234  # Note: m4 eats our [], so we need to use [ and ] instead.
7235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7236  if test "x$has_forbidden_chars" != x; then
7237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7239  fi
7240
7241
7242  windows_path="$new_path"
7243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7244    unix_path=`$CYGPATH -u "$windows_path"`
7245    new_path="$unix_path"
7246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7248    new_path="$unix_path"
7249  fi
7250
7251  if test "x$path" != "x$new_path"; then
7252    CURDIR="$new_path"
7253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7254$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7255  fi
7256
7257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7259
7260  else
7261    # We're on a posix platform. Hooray! :)
7262    path="$CURDIR"
7263
7264    if test ! -f "$path" && test ! -d "$path"; then
7265      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7266    fi
7267
7268    has_space=`$ECHO "$path" | $GREP " "`
7269    if test "x$has_space" != x; then
7270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7271$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7272      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7273    fi
7274  fi
7275
7276
7277if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7278    # Add extra search paths on solaris for utilities like ar and as etc...
7279    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7280fi
7281
7282# You can force the sys-root if the sys-root encoded into the cross compiler tools
7283# is not correct.
7284
7285# Check whether --with-sys-root was given.
7286if test "${with_sys_root+set}" = set; then :
7287  withval=$with_sys_root;
7288fi
7289
7290
7291if test "x$with_sys_root" != x; then
7292  SYS_ROOT=$with_sys_root
7293else
7294  SYS_ROOT=/
7295fi
7296
7297
7298
7299# Check whether --with-tools-dir was given.
7300if test "${with_tools_dir+set}" = set; then :
7301  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7302fi
7303
7304
7305
7306# Check whether --with-devkit was given.
7307if test "${with_devkit+set}" = set; then :
7308  withval=$with_devkit;
7309    if test "x$with_sys_root" != x; then
7310      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7311    fi
7312    if test "x$with_tools_dir" != x; then
7313      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7314    fi
7315    TOOLS_DIR=$with_devkit/bin
7316    SYS_ROOT=$with_devkit/$host_alias/libc
7317
7318fi
7319
7320
7321
7322
7323# Setup default logging of stdout and stderr to build.log in the output root.
7324BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7325BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7326BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7327
7328
7329
7330
7331
7332# These are needed to be able to create a configuration name (and thus the output directory)
7333
7334###############################################################################
7335#
7336# Check which variant of the JDK that we want to build.
7337# Currently we have:
7338#    normal:   standard edition
7339# but the custom make system may add other variants
7340#
7341# Effectively the JDK variant gives a name to a specific set of
7342# modules to compile into the JDK. In the future, these modules
7343# might even be Jigsaw modules.
7344#
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7346$as_echo_n "checking which variant of the JDK to build... " >&6; }
7347
7348# Check whether --with-jdk-variant was given.
7349if test "${with_jdk_variant+set}" = set; then :
7350  withval=$with_jdk_variant;
7351fi
7352
7353
7354if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7355    JDK_VARIANT="normal"
7356else
7357    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7358fi
7359
7360
7361
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7363$as_echo "$JDK_VARIANT" >&6; }
7364
7365
7366
7367###############################################################################
7368#
7369# Check which variants of the JVM that we want to build.
7370# Currently we have:
7371#    server: normal interpreter and a tiered C1/C2 compiler
7372#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7373#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7374#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7375#    zero: no machine code interpreter, no compiler
7376#    zeroshark: zero interpreter and shark/llvm compiler backend
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7378$as_echo_n "checking which variants of the JVM to build... " >&6; }
7379
7380# Check whether --with-jvm-variants was given.
7381if test "${with_jvm_variants+set}" = set; then :
7382  withval=$with_jvm_variants;
7383fi
7384
7385
7386if test "x$with_jvm_variants" = x; then
7387     with_jvm_variants="server"
7388fi
7389
7390JVM_VARIANTS=",$with_jvm_variants,"
7391TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7392
7393if test "x$TEST_VARIANTS" != "x,"; then
7394   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7395fi
7396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7397$as_echo "$with_jvm_variants" >&6; }
7398
7399JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7400JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7401JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7402JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7403JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7404
7405if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7406    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7407        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7408    fi
7409fi
7410if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7411    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7412        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7413    fi
7414fi
7415
7416# Replace the commas with AND for use in the build directory name.
7417ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7418COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7419if test "x$COUNT_VARIANTS" != "x,1"; then
7420    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7421else
7422    BUILDING_MULTIPLE_JVM_VARIANTS=no
7423fi
7424
7425
7426
7427
7428
7429
7430
7431
7432if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7433   MACOSX_UNIVERSAL="true"
7434fi
7435
7436
7437
7438
7439
7440###############################################################################
7441#
7442# Set the debug level
7443#    release: no debug information, all optimizations, no asserts.
7444#    fastdebug: debug information (-g), all optimizations, all asserts
7445#    slowdebug: debug information (-g), no optimizations, all asserts
7446#
7447DEBUG_LEVEL="release"
7448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7449$as_echo_n "checking which debug level to use... " >&6; }
7450# Check whether --enable-debug was given.
7451if test "${enable_debug+set}" = set; then :
7452  enableval=$enable_debug;
7453        ENABLE_DEBUG="${enableval}"
7454        DEBUG_LEVEL="fastdebug"
7455
7456else
7457  ENABLE_DEBUG="no"
7458fi
7459
7460
7461
7462# Check whether --with-debug-level was given.
7463if test "${with_debug_level+set}" = set; then :
7464  withval=$with_debug_level;
7465        DEBUG_LEVEL="${withval}"
7466        if test "x$ENABLE_DEBUG" = xyes; then
7467			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7468        fi
7469
7470fi
7471
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7473$as_echo "$DEBUG_LEVEL" >&6; }
7474
7475if test "x$DEBUG_LEVEL" != xrelease && \
7476   test "x$DEBUG_LEVEL" != xfastdebug && \
7477   test "x$DEBUG_LEVEL" != xslowdebug; then
7478   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7479fi
7480
7481
7482###############################################################################
7483#
7484# Setup legacy vars/targets and new vars to deal with different debug levels.
7485#
7486
7487case $DEBUG_LEVEL in
7488      release )
7489          VARIANT="OPT"
7490          FASTDEBUG="false"
7491          DEBUG_CLASSFILES="false"
7492          BUILD_VARIANT_RELEASE=""
7493          HOTSPOT_DEBUG_LEVEL="product"
7494          HOTSPOT_EXPORT="product"
7495           ;;
7496      fastdebug )
7497          VARIANT="DBG"
7498          FASTDEBUG="true"
7499          DEBUG_CLASSFILES="true"
7500          BUILD_VARIANT_RELEASE="-fastdebug"
7501          HOTSPOT_DEBUG_LEVEL="fastdebug"
7502          HOTSPOT_EXPORT="fastdebug"
7503           ;;
7504      slowdebug )
7505          VARIANT="DBG"
7506          FASTDEBUG="false"
7507          DEBUG_CLASSFILES="true"
7508          BUILD_VARIANT_RELEASE="-debug"
7509          HOTSPOT_DEBUG_LEVEL="jvmg"
7510          HOTSPOT_EXPORT="debug"
7511           ;;
7512esac
7513
7514#####
7515# Generate the legacy makefile targets for hotspot.
7516# The hotspot api for selecting the build artifacts, really, needs to be improved.
7517#
7518HOTSPOT_TARGET=""
7519
7520if test "x$JVM_VARIANT_SERVER" = xtrue; then
7521    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7522fi
7523
7524if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7525    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7526fi
7527
7528if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7529    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7530fi
7531
7532if test "x$JVM_VARIANT_ZERO" = xtrue; then
7533    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7534fi
7535
7536if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7537    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7538fi
7539
7540HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7541
7542# On Macosx universal binaries are produced, but they only contain
7543# 64 bit intel. This invalidates control of which jvms are built
7544# from configure, but only server is valid anyway. Fix this
7545# when hotspot makefiles are rewritten.
7546if test "x$MACOSX_UNIVERSAL" = xtrue; then
7547    HOTSPOT_TARGET=universal_product
7548fi
7549
7550#####
7551
7552
7553
7554
7555
7556
7557
7558
7559# With basic setup done, call the custom early hook.
7560
7561
7562# To properly create a configuration name, we need to have the OpenJDK target
7563# and options (variants and debug level) parsed.
7564
7565
7566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7567$as_echo_n "checking what configuration name to use... " >&6; }
7568
7569# Check whether --with-conf-name was given.
7570if test "${with_conf_name+set}" = set; then :
7571  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7572fi
7573
7574
7575# Test from where we are running configure, in or outside of src root.
7576if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7577    # We are running configure from the src root.
7578    # Create a default ./build/target-variant-debuglevel output root.
7579    if test "x${CONF_NAME}" = x; then
7580        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7581    fi
7582    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7583    $MKDIR -p "$OUTPUT_ROOT"
7584    if test ! -d "$OUTPUT_ROOT"; then
7585        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7586    fi
7587else
7588    # We are running configure from outside of the src dir.
7589    # Then use the current directory as output dir!
7590    # If configuration is situated in normal build directory, just use the build
7591    # directory name as configuration name, otherwise use the complete path.
7592    if test "x${CONF_NAME}" = x; then
7593        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7594    fi
7595    OUTPUT_ROOT="$CURDIR"
7596fi
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7598$as_echo "$CONF_NAME" >&6; }
7599
7600
7601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7602
7603  # Input might be given as Windows format, start by converting to
7604  # unix format.
7605  path="$OUTPUT_ROOT"
7606  new_path=`$CYGPATH -u "$path"`
7607
7608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7611  # "foo.exe" is OK but "foo" is an error.
7612  #
7613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7614  # It is also a way to make sure we got the proper file name for the real test later on.
7615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7616  if test "x$test_shortpath" = x; then
7617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7618$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7619    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7620  fi
7621
7622  # Call helper function which possibly converts this using DOS-style short mode.
7623  # If so, the updated path is stored in $new_path.
7624
7625  input_path="$new_path"
7626  # Check if we need to convert this using DOS-style short mode. If the path
7627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7628  # take no chances and rewrite it.
7629  # Note: m4 eats our [], so we need to use [ and ] instead.
7630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7631  if test "x$has_forbidden_chars" != x; then
7632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7636      # Going to short mode and back again did indeed matter. Since short mode is
7637      # case insensitive, let's make it lowercase to improve readability.
7638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7639      # Now convert it back to Unix-stile (cygpath)
7640      input_path=`$CYGPATH -u "$shortmode_path"`
7641      new_path="$input_path"
7642    fi
7643  fi
7644
7645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7646  if test "x$test_cygdrive_prefix" = x; then
7647    # As a simple fix, exclude /usr/bin since it's not a real path.
7648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7650      # a path prefixed by /cygdrive for fixpath to work.
7651      new_path="$CYGWIN_ROOT_PATH$input_path"
7652    fi
7653  fi
7654
7655
7656  if test "x$path" != "x$new_path"; then
7657    OUTPUT_ROOT="$new_path"
7658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7659$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7660  fi
7661
7662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7663
7664  path="$OUTPUT_ROOT"
7665  has_colon=`$ECHO $path | $GREP ^.:`
7666  new_path="$path"
7667  if test "x$has_colon" = x; then
7668    # Not in mixed or Windows style, start by that.
7669    new_path=`cmd //c echo $path`
7670  fi
7671
7672
7673  input_path="$new_path"
7674  # Check if we need to convert this using DOS-style short mode. If the path
7675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7676  # take no chances and rewrite it.
7677  # Note: m4 eats our [], so we need to use [ and ] instead.
7678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7679  if test "x$has_forbidden_chars" != x; then
7680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7682  fi
7683
7684
7685  windows_path="$new_path"
7686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7687    unix_path=`$CYGPATH -u "$windows_path"`
7688    new_path="$unix_path"
7689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7691    new_path="$unix_path"
7692  fi
7693
7694  if test "x$path" != "x$new_path"; then
7695    OUTPUT_ROOT="$new_path"
7696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7697$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7698  fi
7699
7700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7702
7703  else
7704    # We're on a posix platform. Hooray! :)
7705    path="$OUTPUT_ROOT"
7706
7707    if test ! -f "$path" && test ! -d "$path"; then
7708      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7709    fi
7710
7711    has_space=`$ECHO "$path" | $GREP " "`
7712    if test "x$has_space" != x; then
7713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7714$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7715      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7716    fi
7717  fi
7718
7719
7720SPEC=$OUTPUT_ROOT/spec.gmk
7721
7722CONF_NAME=$CONF_NAME
7723
7724OUTPUT_ROOT=$OUTPUT_ROOT
7725
7726
7727# Most of the probed defines are put into config.h
7728ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7729
7730# The spec.gmk file contains all variables for the make system.
7731ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7732
7733# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7734ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7735
7736# The bootcycle-spec.gmk file contains support for boot cycle builds.
7737ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7738
7739# The compare.sh is used to compare the build output to other builds.
7740ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7741
7742# Spec.sh is currently used by compare-objects.sh
7743ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7744
7745# The generated Makefile knows where the spec.gmk is and where the source is.
7746# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7747# which will look for generated configurations
7748ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7749
7750
7751# Save the arguments given to us
7752echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7753
7754
7755# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7756
7757    for ac_prog in apt-get yum port pkgutil pkgadd
7758do
7759  # Extract the first word of "$ac_prog", so it can be a program name with args.
7760set dummy $ac_prog; ac_word=$2
7761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7762$as_echo_n "checking for $ac_word... " >&6; }
7763if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7764  $as_echo_n "(cached) " >&6
7765else
7766  if test -n "$PKGHANDLER"; then
7767  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7768else
7769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772  IFS=$as_save_IFS
7773  test -z "$as_dir" && as_dir=.
7774    for ac_exec_ext in '' $ac_executable_extensions; do
7775  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7776    ac_cv_prog_PKGHANDLER="$ac_prog"
7777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778    break 2
7779  fi
7780done
7781  done
7782IFS=$as_save_IFS
7783
7784fi
7785fi
7786PKGHANDLER=$ac_cv_prog_PKGHANDLER
7787if test -n "$PKGHANDLER"; then
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7789$as_echo "$PKGHANDLER" >&6; }
7790else
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792$as_echo "no" >&6; }
7793fi
7794
7795
7796  test -n "$PKGHANDLER" && break
7797done
7798
7799
7800
7801# Setup tools that requires more complex handling, or that is not needed by the configure script.
7802
7803
7804  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7805  if test "x$MAKE" != x; then
7806    # User has supplied a make, test it.
7807    if test ! -f "$MAKE"; then
7808      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7809    fi
7810
7811  MAKE_CANDIDATE=""$MAKE""
7812  DESCRIPTION="user supplied MAKE=$MAKE"
7813  if test "x$MAKE_CANDIDATE" != x; then
7814    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7815$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7816    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7817    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7818    if test "x$IS_GNU_MAKE" = x; then
7819      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7820$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7821    else
7822      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7823      if test "x$IS_MODERN_MAKE" = x; then
7824        { $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
7825$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;}
7826      else
7827        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7828          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7829            MAKE_EXPECTED_ENV='cygwin'
7830          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7831            MAKE_EXPECTED_ENV='msys'
7832          else
7833            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7834          fi
7835          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7836          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7837        else
7838          # Not relevant for non-Windows
7839          IS_MAKE_CORRECT_ENV=true
7840        fi
7841        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7842          { $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
7843$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;}
7844        else
7845          FOUND_MAKE=$MAKE_CANDIDATE
7846
7847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7848
7849  # First separate the path from the arguments. This will split at the first
7850  # space.
7851  complete="$FOUND_MAKE"
7852  path="${complete%% *}"
7853  tmp="$complete EOL"
7854  arguments="${tmp#* }"
7855
7856  # Input might be given as Windows format, start by converting to
7857  # unix format.
7858  new_path=`$CYGPATH -u "$path"`
7859
7860  # Now try to locate executable using which
7861  new_path=`$WHICH "$new_path" 2> /dev/null`
7862  if test "x$new_path" = x; then
7863    # Oops. Which didn't find the executable.
7864    # The splitting of arguments from the executable at a space might have been incorrect,
7865    # since paths with space are more likely in Windows. Give it another try with the whole
7866    # argument.
7867    path="$complete"
7868    arguments="EOL"
7869    new_path=`$CYGPATH -u "$path"`
7870    new_path=`$WHICH "$new_path" 2> /dev/null`
7871    if test "x$new_path" = x; then
7872      # It's still not found. Now this is an unrecoverable error.
7873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7875      has_space=`$ECHO "$complete" | $GREP " "`
7876      if test "x$has_space" != x; then
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7879      fi
7880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7881    fi
7882  fi
7883
7884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7887  # "foo.exe" is OK but "foo" is an error.
7888  #
7889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7890  # It is also a way to make sure we got the proper file name for the real test later on.
7891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7892  if test "x$test_shortpath" = x; then
7893    # Short path failed, file does not exist as specified.
7894    # Try adding .exe or .cmd
7895    if test -f "${new_path}.exe"; then
7896       input_to_shortpath="${new_path}.exe"
7897    elif test -f "${new_path}.cmd"; then
7898       input_to_shortpath="${new_path}.cmd"
7899    else
7900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7905    fi
7906  else
7907    input_to_shortpath="$new_path"
7908  fi
7909
7910  # Call helper function which possibly converts this using DOS-style short mode.
7911  # If so, the updated path is stored in $new_path.
7912  new_path="$input_to_shortpath"
7913
7914  input_path="$input_to_shortpath"
7915  # Check if we need to convert this using DOS-style short mode. If the path
7916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7917  # take no chances and rewrite it.
7918  # Note: m4 eats our [], so we need to use [ and ] instead.
7919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7920  if test "x$has_forbidden_chars" != x; then
7921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7925      # Going to short mode and back again did indeed matter. Since short mode is
7926      # case insensitive, let's make it lowercase to improve readability.
7927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7928      # Now convert it back to Unix-stile (cygpath)
7929      input_path=`$CYGPATH -u "$shortmode_path"`
7930      new_path="$input_path"
7931    fi
7932  fi
7933
7934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7935  if test "x$test_cygdrive_prefix" = x; then
7936    # As a simple fix, exclude /usr/bin since it's not a real path.
7937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7939      # a path prefixed by /cygdrive for fixpath to work.
7940      new_path="$CYGWIN_ROOT_PATH$input_path"
7941    fi
7942  fi
7943
7944  # remove trailing .exe if any
7945  new_path="${new_path/%.exe/}"
7946
7947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7948
7949  # First separate the path from the arguments. This will split at the first
7950  # space.
7951  complete="$FOUND_MAKE"
7952  path="${complete%% *}"
7953  tmp="$complete EOL"
7954  arguments="${tmp#* }"
7955
7956  # Input might be given as Windows format, start by converting to
7957  # unix format.
7958  new_path="$path"
7959
7960  windows_path="$new_path"
7961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7962    unix_path=`$CYGPATH -u "$windows_path"`
7963    new_path="$unix_path"
7964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7966    new_path="$unix_path"
7967  fi
7968
7969
7970  # Now try to locate executable using which
7971  new_path=`$WHICH "$new_path" 2> /dev/null`
7972
7973  if test "x$new_path" = x; then
7974    # Oops. Which didn't find the executable.
7975    # The splitting of arguments from the executable at a space might have been incorrect,
7976    # since paths with space are more likely in Windows. Give it another try with the whole
7977    # argument.
7978    path="$complete"
7979    arguments="EOL"
7980    new_path="$path"
7981
7982  windows_path="$new_path"
7983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7984    unix_path=`$CYGPATH -u "$windows_path"`
7985    new_path="$unix_path"
7986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7988    new_path="$unix_path"
7989  fi
7990
7991
7992    new_path=`$WHICH "$new_path" 2> /dev/null`
7993
7994    if test "x$new_path" = x; then
7995      # It's still not found. Now this is an unrecoverable error.
7996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7997$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7998      has_space=`$ECHO "$complete" | $GREP " "`
7999      if test "x$has_space" != x; then
8000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8002      fi
8003      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8004    fi
8005  fi
8006
8007  # Now new_path has a complete unix path to the binary
8008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8009    # Keep paths in /bin as-is, but remove trailing .exe if any
8010    new_path="${new_path/%.exe/}"
8011    # Do not save /bin paths to all_fixpath_prefixes!
8012  else
8013    # Not in mixed or Windows style, start by that.
8014    new_path=`cmd //c echo $new_path`
8015
8016  input_path="$new_path"
8017  # Check if we need to convert this using DOS-style short mode. If the path
8018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8019  # take no chances and rewrite it.
8020  # Note: m4 eats our [], so we need to use [ and ] instead.
8021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8022  if test "x$has_forbidden_chars" != x; then
8023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8025  fi
8026
8027    # Output is in $new_path
8028
8029  windows_path="$new_path"
8030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8031    unix_path=`$CYGPATH -u "$windows_path"`
8032    new_path="$unix_path"
8033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8035    new_path="$unix_path"
8036  fi
8037
8038    # remove trailing .exe if any
8039    new_path="${new_path/%.exe/}"
8040
8041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8043  fi
8044
8045  else
8046    # We're on a posix platform. Hooray! :)
8047    # First separate the path from the arguments. This will split at the first
8048    # space.
8049    complete="$FOUND_MAKE"
8050    path="${complete%% *}"
8051    tmp="$complete EOL"
8052    arguments="${tmp#* }"
8053
8054    new_path=`$WHICH $path 2> /dev/null`
8055    if test "x$new_path" = x; then
8056      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8057      if test "x$is_absolute_path" != x; then
8058        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8059$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8060        new_path="$path"
8061      else
8062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8064        has_space=`$ECHO "$complete" | $GREP " "`
8065        if test "x$has_space" != x; then
8066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8068        fi
8069        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8070      fi
8071    fi
8072  fi
8073
8074  # Now join together the path and the arguments once again
8075  if test "x$arguments" != xEOL; then
8076      new_complete="$new_path ${arguments% *}"
8077  else
8078      new_complete="$new_path"
8079  fi
8080
8081  if test "x$complete" != "x$new_complete"; then
8082    FOUND_MAKE="$new_complete"
8083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8084$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8085  fi
8086
8087        fi
8088      fi
8089    fi
8090  fi
8091
8092    if test "x$FOUND_MAKE" = x; then
8093      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8094    fi
8095  else
8096    # Try our hardest to locate a correct version of GNU make
8097    for ac_prog in gmake
8098do
8099  # Extract the first word of "$ac_prog", so it can be a program name with args.
8100set dummy $ac_prog; ac_word=$2
8101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8102$as_echo_n "checking for $ac_word... " >&6; }
8103if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8104  $as_echo_n "(cached) " >&6
8105else
8106  case $CHECK_GMAKE in
8107  [\\/]* | ?:[\\/]*)
8108  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8109  ;;
8110  *)
8111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8112for as_dir in $PATH
8113do
8114  IFS=$as_save_IFS
8115  test -z "$as_dir" && as_dir=.
8116    for ac_exec_ext in '' $ac_executable_extensions; do
8117  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8118    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8120    break 2
8121  fi
8122done
8123  done
8124IFS=$as_save_IFS
8125
8126  ;;
8127esac
8128fi
8129CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8130if test -n "$CHECK_GMAKE"; then
8131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8132$as_echo "$CHECK_GMAKE" >&6; }
8133else
8134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8135$as_echo "no" >&6; }
8136fi
8137
8138
8139  test -n "$CHECK_GMAKE" && break
8140done
8141
8142
8143  MAKE_CANDIDATE=""$CHECK_GMAKE""
8144  DESCRIPTION="gmake in PATH"
8145  if test "x$MAKE_CANDIDATE" != x; then
8146    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8147$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8148    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8149    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8150    if test "x$IS_GNU_MAKE" = x; then
8151      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8152$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8153    else
8154      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8155      if test "x$IS_MODERN_MAKE" = x; then
8156        { $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
8157$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;}
8158      else
8159        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8160          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8161            MAKE_EXPECTED_ENV='cygwin'
8162          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8163            MAKE_EXPECTED_ENV='msys'
8164          else
8165            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8166          fi
8167          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8168          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8169        else
8170          # Not relevant for non-Windows
8171          IS_MAKE_CORRECT_ENV=true
8172        fi
8173        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8174          { $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
8175$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;}
8176        else
8177          FOUND_MAKE=$MAKE_CANDIDATE
8178
8179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8180
8181  # First separate the path from the arguments. This will split at the first
8182  # space.
8183  complete="$FOUND_MAKE"
8184  path="${complete%% *}"
8185  tmp="$complete EOL"
8186  arguments="${tmp#* }"
8187
8188  # Input might be given as Windows format, start by converting to
8189  # unix format.
8190  new_path=`$CYGPATH -u "$path"`
8191
8192  # Now try to locate executable using which
8193  new_path=`$WHICH "$new_path" 2> /dev/null`
8194  if test "x$new_path" = x; then
8195    # Oops. Which didn't find the executable.
8196    # The splitting of arguments from the executable at a space might have been incorrect,
8197    # since paths with space are more likely in Windows. Give it another try with the whole
8198    # argument.
8199    path="$complete"
8200    arguments="EOL"
8201    new_path=`$CYGPATH -u "$path"`
8202    new_path=`$WHICH "$new_path" 2> /dev/null`
8203    if test "x$new_path" = x; then
8204      # It's still not found. Now this is an unrecoverable error.
8205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8206$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8207      has_space=`$ECHO "$complete" | $GREP " "`
8208      if test "x$has_space" != x; then
8209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8211      fi
8212      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8213    fi
8214  fi
8215
8216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8219  # "foo.exe" is OK but "foo" is an error.
8220  #
8221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8222  # It is also a way to make sure we got the proper file name for the real test later on.
8223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8224  if test "x$test_shortpath" = x; then
8225    # Short path failed, file does not exist as specified.
8226    # Try adding .exe or .cmd
8227    if test -f "${new_path}.exe"; then
8228       input_to_shortpath="${new_path}.exe"
8229    elif test -f "${new_path}.cmd"; then
8230       input_to_shortpath="${new_path}.cmd"
8231    else
8232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8233$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8234      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8235$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8236      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8237    fi
8238  else
8239    input_to_shortpath="$new_path"
8240  fi
8241
8242  # Call helper function which possibly converts this using DOS-style short mode.
8243  # If so, the updated path is stored in $new_path.
8244  new_path="$input_to_shortpath"
8245
8246  input_path="$input_to_shortpath"
8247  # Check if we need to convert this using DOS-style short mode. If the path
8248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8249  # take no chances and rewrite it.
8250  # Note: m4 eats our [], so we need to use [ and ] instead.
8251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8252  if test "x$has_forbidden_chars" != x; then
8253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8257      # Going to short mode and back again did indeed matter. Since short mode is
8258      # case insensitive, let's make it lowercase to improve readability.
8259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8260      # Now convert it back to Unix-stile (cygpath)
8261      input_path=`$CYGPATH -u "$shortmode_path"`
8262      new_path="$input_path"
8263    fi
8264  fi
8265
8266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8267  if test "x$test_cygdrive_prefix" = x; then
8268    # As a simple fix, exclude /usr/bin since it's not a real path.
8269    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8271      # a path prefixed by /cygdrive for fixpath to work.
8272      new_path="$CYGWIN_ROOT_PATH$input_path"
8273    fi
8274  fi
8275
8276  # remove trailing .exe if any
8277  new_path="${new_path/%.exe/}"
8278
8279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8280
8281  # First separate the path from the arguments. This will split at the first
8282  # space.
8283  complete="$FOUND_MAKE"
8284  path="${complete%% *}"
8285  tmp="$complete EOL"
8286  arguments="${tmp#* }"
8287
8288  # Input might be given as Windows format, start by converting to
8289  # unix format.
8290  new_path="$path"
8291
8292  windows_path="$new_path"
8293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8294    unix_path=`$CYGPATH -u "$windows_path"`
8295    new_path="$unix_path"
8296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8298    new_path="$unix_path"
8299  fi
8300
8301
8302  # Now try to locate executable using which
8303  new_path=`$WHICH "$new_path" 2> /dev/null`
8304
8305  if test "x$new_path" = x; then
8306    # Oops. Which didn't find the executable.
8307    # The splitting of arguments from the executable at a space might have been incorrect,
8308    # since paths with space are more likely in Windows. Give it another try with the whole
8309    # argument.
8310    path="$complete"
8311    arguments="EOL"
8312    new_path="$path"
8313
8314  windows_path="$new_path"
8315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8316    unix_path=`$CYGPATH -u "$windows_path"`
8317    new_path="$unix_path"
8318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8320    new_path="$unix_path"
8321  fi
8322
8323
8324    new_path=`$WHICH "$new_path" 2> /dev/null`
8325
8326    if test "x$new_path" = x; then
8327      # It's still not found. Now this is an unrecoverable error.
8328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8329$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8330      has_space=`$ECHO "$complete" | $GREP " "`
8331      if test "x$has_space" != x; then
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8334      fi
8335      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8336    fi
8337  fi
8338
8339  # Now new_path has a complete unix path to the binary
8340  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8341    # Keep paths in /bin as-is, but remove trailing .exe if any
8342    new_path="${new_path/%.exe/}"
8343    # Do not save /bin paths to all_fixpath_prefixes!
8344  else
8345    # Not in mixed or Windows style, start by that.
8346    new_path=`cmd //c echo $new_path`
8347
8348  input_path="$new_path"
8349  # Check if we need to convert this using DOS-style short mode. If the path
8350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8351  # take no chances and rewrite it.
8352  # Note: m4 eats our [], so we need to use [ and ] instead.
8353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8354  if test "x$has_forbidden_chars" != x; then
8355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8357  fi
8358
8359    # Output is in $new_path
8360
8361  windows_path="$new_path"
8362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8363    unix_path=`$CYGPATH -u "$windows_path"`
8364    new_path="$unix_path"
8365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8367    new_path="$unix_path"
8368  fi
8369
8370    # remove trailing .exe if any
8371    new_path="${new_path/%.exe/}"
8372
8373    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8374    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8375  fi
8376
8377  else
8378    # We're on a posix platform. Hooray! :)
8379    # First separate the path from the arguments. This will split at the first
8380    # space.
8381    complete="$FOUND_MAKE"
8382    path="${complete%% *}"
8383    tmp="$complete EOL"
8384    arguments="${tmp#* }"
8385
8386    new_path=`$WHICH $path 2> /dev/null`
8387    if test "x$new_path" = x; then
8388      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8389      if test "x$is_absolute_path" != x; then
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8391$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8392        new_path="$path"
8393      else
8394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8396        has_space=`$ECHO "$complete" | $GREP " "`
8397        if test "x$has_space" != x; then
8398          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8400        fi
8401        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8402      fi
8403    fi
8404  fi
8405
8406  # Now join together the path and the arguments once again
8407  if test "x$arguments" != xEOL; then
8408      new_complete="$new_path ${arguments% *}"
8409  else
8410      new_complete="$new_path"
8411  fi
8412
8413  if test "x$complete" != "x$new_complete"; then
8414    FOUND_MAKE="$new_complete"
8415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8416$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8417  fi
8418
8419        fi
8420      fi
8421    fi
8422  fi
8423
8424
8425    if test "x$FOUND_MAKE" = x; then
8426      for ac_prog in make
8427do
8428  # Extract the first word of "$ac_prog", so it can be a program name with args.
8429set dummy $ac_prog; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $CHECK_MAKE in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8447    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8459if test -n "$CHECK_MAKE"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8461$as_echo "$CHECK_MAKE" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468  test -n "$CHECK_MAKE" && break
8469done
8470
8471
8472  MAKE_CANDIDATE=""$CHECK_MAKE""
8473  DESCRIPTION="make in PATH"
8474  if test "x$MAKE_CANDIDATE" != x; then
8475    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8476$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8477    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8478    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8479    if test "x$IS_GNU_MAKE" = x; then
8480      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8481$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8482    else
8483      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8484      if test "x$IS_MODERN_MAKE" = x; then
8485        { $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
8486$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;}
8487      else
8488        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8489          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8490            MAKE_EXPECTED_ENV='cygwin'
8491          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8492            MAKE_EXPECTED_ENV='msys'
8493          else
8494            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8495          fi
8496          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8497          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8498        else
8499          # Not relevant for non-Windows
8500          IS_MAKE_CORRECT_ENV=true
8501        fi
8502        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8503          { $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
8504$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;}
8505        else
8506          FOUND_MAKE=$MAKE_CANDIDATE
8507
8508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8509
8510  # First separate the path from the arguments. This will split at the first
8511  # space.
8512  complete="$FOUND_MAKE"
8513  path="${complete%% *}"
8514  tmp="$complete EOL"
8515  arguments="${tmp#* }"
8516
8517  # Input might be given as Windows format, start by converting to
8518  # unix format.
8519  new_path=`$CYGPATH -u "$path"`
8520
8521  # Now try to locate executable using which
8522  new_path=`$WHICH "$new_path" 2> /dev/null`
8523  if test "x$new_path" = x; then
8524    # Oops. Which didn't find the executable.
8525    # The splitting of arguments from the executable at a space might have been incorrect,
8526    # since paths with space are more likely in Windows. Give it another try with the whole
8527    # argument.
8528    path="$complete"
8529    arguments="EOL"
8530    new_path=`$CYGPATH -u "$path"`
8531    new_path=`$WHICH "$new_path" 2> /dev/null`
8532    if test "x$new_path" = x; then
8533      # It's still not found. Now this is an unrecoverable error.
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8536      has_space=`$ECHO "$complete" | $GREP " "`
8537      if test "x$has_space" != x; then
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8540      fi
8541      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8542    fi
8543  fi
8544
8545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8548  # "foo.exe" is OK but "foo" is an error.
8549  #
8550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8551  # It is also a way to make sure we got the proper file name for the real test later on.
8552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8553  if test "x$test_shortpath" = x; then
8554    # Short path failed, file does not exist as specified.
8555    # Try adding .exe or .cmd
8556    if test -f "${new_path}.exe"; then
8557       input_to_shortpath="${new_path}.exe"
8558    elif test -f "${new_path}.cmd"; then
8559       input_to_shortpath="${new_path}.cmd"
8560    else
8561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8562$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8565      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8566    fi
8567  else
8568    input_to_shortpath="$new_path"
8569  fi
8570
8571  # Call helper function which possibly converts this using DOS-style short mode.
8572  # If so, the updated path is stored in $new_path.
8573  new_path="$input_to_shortpath"
8574
8575  input_path="$input_to_shortpath"
8576  # Check if we need to convert this using DOS-style short mode. If the path
8577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8578  # take no chances and rewrite it.
8579  # Note: m4 eats our [], so we need to use [ and ] instead.
8580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8581  if test "x$has_forbidden_chars" != x; then
8582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8586      # Going to short mode and back again did indeed matter. Since short mode is
8587      # case insensitive, let's make it lowercase to improve readability.
8588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8589      # Now convert it back to Unix-stile (cygpath)
8590      input_path=`$CYGPATH -u "$shortmode_path"`
8591      new_path="$input_path"
8592    fi
8593  fi
8594
8595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8596  if test "x$test_cygdrive_prefix" = x; then
8597    # As a simple fix, exclude /usr/bin since it's not a real path.
8598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8600      # a path prefixed by /cygdrive for fixpath to work.
8601      new_path="$CYGWIN_ROOT_PATH$input_path"
8602    fi
8603  fi
8604
8605  # remove trailing .exe if any
8606  new_path="${new_path/%.exe/}"
8607
8608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8609
8610  # First separate the path from the arguments. This will split at the first
8611  # space.
8612  complete="$FOUND_MAKE"
8613  path="${complete%% *}"
8614  tmp="$complete EOL"
8615  arguments="${tmp#* }"
8616
8617  # Input might be given as Windows format, start by converting to
8618  # unix format.
8619  new_path="$path"
8620
8621  windows_path="$new_path"
8622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8623    unix_path=`$CYGPATH -u "$windows_path"`
8624    new_path="$unix_path"
8625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8627    new_path="$unix_path"
8628  fi
8629
8630
8631  # Now try to locate executable using which
8632  new_path=`$WHICH "$new_path" 2> /dev/null`
8633
8634  if test "x$new_path" = x; then
8635    # Oops. Which didn't find the executable.
8636    # The splitting of arguments from the executable at a space might have been incorrect,
8637    # since paths with space are more likely in Windows. Give it another try with the whole
8638    # argument.
8639    path="$complete"
8640    arguments="EOL"
8641    new_path="$path"
8642
8643  windows_path="$new_path"
8644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8645    unix_path=`$CYGPATH -u "$windows_path"`
8646    new_path="$unix_path"
8647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8649    new_path="$unix_path"
8650  fi
8651
8652
8653    new_path=`$WHICH "$new_path" 2> /dev/null`
8654
8655    if test "x$new_path" = x; then
8656      # It's still not found. Now this is an unrecoverable error.
8657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8658$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8659      has_space=`$ECHO "$complete" | $GREP " "`
8660      if test "x$has_space" != x; then
8661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8663      fi
8664      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8665    fi
8666  fi
8667
8668  # Now new_path has a complete unix path to the binary
8669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8670    # Keep paths in /bin as-is, but remove trailing .exe if any
8671    new_path="${new_path/%.exe/}"
8672    # Do not save /bin paths to all_fixpath_prefixes!
8673  else
8674    # Not in mixed or Windows style, start by that.
8675    new_path=`cmd //c echo $new_path`
8676
8677  input_path="$new_path"
8678  # Check if we need to convert this using DOS-style short mode. If the path
8679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8680  # take no chances and rewrite it.
8681  # Note: m4 eats our [], so we need to use [ and ] instead.
8682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8683  if test "x$has_forbidden_chars" != x; then
8684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8686  fi
8687
8688    # Output is in $new_path
8689
8690  windows_path="$new_path"
8691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8692    unix_path=`$CYGPATH -u "$windows_path"`
8693    new_path="$unix_path"
8694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8696    new_path="$unix_path"
8697  fi
8698
8699    # remove trailing .exe if any
8700    new_path="${new_path/%.exe/}"
8701
8702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8704  fi
8705
8706  else
8707    # We're on a posix platform. Hooray! :)
8708    # First separate the path from the arguments. This will split at the first
8709    # space.
8710    complete="$FOUND_MAKE"
8711    path="${complete%% *}"
8712    tmp="$complete EOL"
8713    arguments="${tmp#* }"
8714
8715    new_path=`$WHICH $path 2> /dev/null`
8716    if test "x$new_path" = x; then
8717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8718      if test "x$is_absolute_path" != x; then
8719        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8720$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8721        new_path="$path"
8722      else
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8725        has_space=`$ECHO "$complete" | $GREP " "`
8726        if test "x$has_space" != x; then
8727          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8728$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8729        fi
8730        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8731      fi
8732    fi
8733  fi
8734
8735  # Now join together the path and the arguments once again
8736  if test "x$arguments" != xEOL; then
8737      new_complete="$new_path ${arguments% *}"
8738  else
8739      new_complete="$new_path"
8740  fi
8741
8742  if test "x$complete" != "x$new_complete"; then
8743    FOUND_MAKE="$new_complete"
8744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8745$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8746  fi
8747
8748        fi
8749      fi
8750    fi
8751  fi
8752
8753    fi
8754
8755    if test "x$FOUND_MAKE" = x; then
8756      if test "x$TOOLS_DIR" != x; then
8757        # We have a tools-dir, check that as well before giving up.
8758        OLD_PATH=$PATH
8759        PATH=$TOOLS_DIR:$PATH
8760        for ac_prog in gmake
8761do
8762  # Extract the first word of "$ac_prog", so it can be a program name with args.
8763set dummy $ac_prog; ac_word=$2
8764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8765$as_echo_n "checking for $ac_word... " >&6; }
8766if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8767  $as_echo_n "(cached) " >&6
8768else
8769  case $CHECK_TOOLSDIR_GMAKE in
8770  [\\/]* | ?:[\\/]*)
8771  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8772  ;;
8773  *)
8774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8775for as_dir in $PATH
8776do
8777  IFS=$as_save_IFS
8778  test -z "$as_dir" && as_dir=.
8779    for ac_exec_ext in '' $ac_executable_extensions; do
8780  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8781    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8783    break 2
8784  fi
8785done
8786  done
8787IFS=$as_save_IFS
8788
8789  ;;
8790esac
8791fi
8792CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8793if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8795$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8796else
8797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798$as_echo "no" >&6; }
8799fi
8800
8801
8802  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8803done
8804
8805
8806  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8807  DESCRIPTION="gmake in tools-dir"
8808  if test "x$MAKE_CANDIDATE" != x; then
8809    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8810$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8811    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8812    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8813    if test "x$IS_GNU_MAKE" = x; then
8814      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8815$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8816    else
8817      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8818      if test "x$IS_MODERN_MAKE" = x; then
8819        { $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
8820$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;}
8821      else
8822        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8823          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8824            MAKE_EXPECTED_ENV='cygwin'
8825          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8826            MAKE_EXPECTED_ENV='msys'
8827          else
8828            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8829          fi
8830          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8831          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8832        else
8833          # Not relevant for non-Windows
8834          IS_MAKE_CORRECT_ENV=true
8835        fi
8836        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8837          { $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
8838$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;}
8839        else
8840          FOUND_MAKE=$MAKE_CANDIDATE
8841
8842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8843
8844  # First separate the path from the arguments. This will split at the first
8845  # space.
8846  complete="$FOUND_MAKE"
8847  path="${complete%% *}"
8848  tmp="$complete EOL"
8849  arguments="${tmp#* }"
8850
8851  # Input might be given as Windows format, start by converting to
8852  # unix format.
8853  new_path=`$CYGPATH -u "$path"`
8854
8855  # Now try to locate executable using which
8856  new_path=`$WHICH "$new_path" 2> /dev/null`
8857  if test "x$new_path" = x; then
8858    # Oops. Which didn't find the executable.
8859    # The splitting of arguments from the executable at a space might have been incorrect,
8860    # since paths with space are more likely in Windows. Give it another try with the whole
8861    # argument.
8862    path="$complete"
8863    arguments="EOL"
8864    new_path=`$CYGPATH -u "$path"`
8865    new_path=`$WHICH "$new_path" 2> /dev/null`
8866    if test "x$new_path" = x; then
8867      # It's still not found. Now this is an unrecoverable error.
8868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8870      has_space=`$ECHO "$complete" | $GREP " "`
8871      if test "x$has_space" != x; then
8872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8874      fi
8875      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8876    fi
8877  fi
8878
8879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8882  # "foo.exe" is OK but "foo" is an error.
8883  #
8884  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8885  # It is also a way to make sure we got the proper file name for the real test later on.
8886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8887  if test "x$test_shortpath" = x; then
8888    # Short path failed, file does not exist as specified.
8889    # Try adding .exe or .cmd
8890    if test -f "${new_path}.exe"; then
8891       input_to_shortpath="${new_path}.exe"
8892    elif test -f "${new_path}.cmd"; then
8893       input_to_shortpath="${new_path}.cmd"
8894    else
8895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8896$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8897      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8898$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8899      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8900    fi
8901  else
8902    input_to_shortpath="$new_path"
8903  fi
8904
8905  # Call helper function which possibly converts this using DOS-style short mode.
8906  # If so, the updated path is stored in $new_path.
8907  new_path="$input_to_shortpath"
8908
8909  input_path="$input_to_shortpath"
8910  # Check if we need to convert this using DOS-style short mode. If the path
8911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8912  # take no chances and rewrite it.
8913  # Note: m4 eats our [], so we need to use [ and ] instead.
8914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8915  if test "x$has_forbidden_chars" != x; then
8916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8920      # Going to short mode and back again did indeed matter. Since short mode is
8921      # case insensitive, let's make it lowercase to improve readability.
8922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8923      # Now convert it back to Unix-stile (cygpath)
8924      input_path=`$CYGPATH -u "$shortmode_path"`
8925      new_path="$input_path"
8926    fi
8927  fi
8928
8929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8930  if test "x$test_cygdrive_prefix" = x; then
8931    # As a simple fix, exclude /usr/bin since it's not a real path.
8932    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8934      # a path prefixed by /cygdrive for fixpath to work.
8935      new_path="$CYGWIN_ROOT_PATH$input_path"
8936    fi
8937  fi
8938
8939  # remove trailing .exe if any
8940  new_path="${new_path/%.exe/}"
8941
8942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8943
8944  # First separate the path from the arguments. This will split at the first
8945  # space.
8946  complete="$FOUND_MAKE"
8947  path="${complete%% *}"
8948  tmp="$complete EOL"
8949  arguments="${tmp#* }"
8950
8951  # Input might be given as Windows format, start by converting to
8952  # unix format.
8953  new_path="$path"
8954
8955  windows_path="$new_path"
8956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8957    unix_path=`$CYGPATH -u "$windows_path"`
8958    new_path="$unix_path"
8959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8961    new_path="$unix_path"
8962  fi
8963
8964
8965  # Now try to locate executable using which
8966  new_path=`$WHICH "$new_path" 2> /dev/null`
8967
8968  if test "x$new_path" = x; then
8969    # Oops. Which didn't find the executable.
8970    # The splitting of arguments from the executable at a space might have been incorrect,
8971    # since paths with space are more likely in Windows. Give it another try with the whole
8972    # argument.
8973    path="$complete"
8974    arguments="EOL"
8975    new_path="$path"
8976
8977  windows_path="$new_path"
8978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8979    unix_path=`$CYGPATH -u "$windows_path"`
8980    new_path="$unix_path"
8981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8983    new_path="$unix_path"
8984  fi
8985
8986
8987    new_path=`$WHICH "$new_path" 2> /dev/null`
8988
8989    if test "x$new_path" = x; then
8990      # It's still not found. Now this is an unrecoverable error.
8991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8992$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8993      has_space=`$ECHO "$complete" | $GREP " "`
8994      if test "x$has_space" != x; then
8995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8997      fi
8998      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8999    fi
9000  fi
9001
9002  # Now new_path has a complete unix path to the binary
9003  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9004    # Keep paths in /bin as-is, but remove trailing .exe if any
9005    new_path="${new_path/%.exe/}"
9006    # Do not save /bin paths to all_fixpath_prefixes!
9007  else
9008    # Not in mixed or Windows style, start by that.
9009    new_path=`cmd //c echo $new_path`
9010
9011  input_path="$new_path"
9012  # Check if we need to convert this using DOS-style short mode. If the path
9013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9014  # take no chances and rewrite it.
9015  # Note: m4 eats our [], so we need to use [ and ] instead.
9016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9017  if test "x$has_forbidden_chars" != x; then
9018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9020  fi
9021
9022    # Output is in $new_path
9023
9024  windows_path="$new_path"
9025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9026    unix_path=`$CYGPATH -u "$windows_path"`
9027    new_path="$unix_path"
9028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9030    new_path="$unix_path"
9031  fi
9032
9033    # remove trailing .exe if any
9034    new_path="${new_path/%.exe/}"
9035
9036    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9037    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9038  fi
9039
9040  else
9041    # We're on a posix platform. Hooray! :)
9042    # First separate the path from the arguments. This will split at the first
9043    # space.
9044    complete="$FOUND_MAKE"
9045    path="${complete%% *}"
9046    tmp="$complete EOL"
9047    arguments="${tmp#* }"
9048
9049    new_path=`$WHICH $path 2> /dev/null`
9050    if test "x$new_path" = x; then
9051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9052      if test "x$is_absolute_path" != x; then
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9054$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9055        new_path="$path"
9056      else
9057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9059        has_space=`$ECHO "$complete" | $GREP " "`
9060        if test "x$has_space" != x; then
9061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9063        fi
9064        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9065      fi
9066    fi
9067  fi
9068
9069  # Now join together the path and the arguments once again
9070  if test "x$arguments" != xEOL; then
9071      new_complete="$new_path ${arguments% *}"
9072  else
9073      new_complete="$new_path"
9074  fi
9075
9076  if test "x$complete" != "x$new_complete"; then
9077    FOUND_MAKE="$new_complete"
9078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9079$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9080  fi
9081
9082        fi
9083      fi
9084    fi
9085  fi
9086
9087        if test "x$FOUND_MAKE" = x; then
9088          for ac_prog in make
9089do
9090  # Extract the first word of "$ac_prog", so it can be a program name with args.
9091set dummy $ac_prog; ac_word=$2
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9093$as_echo_n "checking for $ac_word... " >&6; }
9094if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9095  $as_echo_n "(cached) " >&6
9096else
9097  case $CHECK_TOOLSDIR_MAKE in
9098  [\\/]* | ?:[\\/]*)
9099  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9100  ;;
9101  *)
9102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9103for as_dir in $PATH
9104do
9105  IFS=$as_save_IFS
9106  test -z "$as_dir" && as_dir=.
9107    for ac_exec_ext in '' $ac_executable_extensions; do
9108  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9109    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9111    break 2
9112  fi
9113done
9114  done
9115IFS=$as_save_IFS
9116
9117  ;;
9118esac
9119fi
9120CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9121if test -n "$CHECK_TOOLSDIR_MAKE"; then
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9123$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9124else
9125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
9127fi
9128
9129
9130  test -n "$CHECK_TOOLSDIR_MAKE" && break
9131done
9132
9133
9134  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9135  DESCRIPTION="make in tools-dir"
9136  if test "x$MAKE_CANDIDATE" != x; then
9137    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9138$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9139    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9140    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9141    if test "x$IS_GNU_MAKE" = x; then
9142      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9143$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9144    else
9145      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9146      if test "x$IS_MODERN_MAKE" = x; then
9147        { $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
9148$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;}
9149      else
9150        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9151          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9152            MAKE_EXPECTED_ENV='cygwin'
9153          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9154            MAKE_EXPECTED_ENV='msys'
9155          else
9156            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9157          fi
9158          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9159          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9160        else
9161          # Not relevant for non-Windows
9162          IS_MAKE_CORRECT_ENV=true
9163        fi
9164        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9165          { $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
9166$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;}
9167        else
9168          FOUND_MAKE=$MAKE_CANDIDATE
9169
9170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9171
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  # Input might be given as Windows format, start by converting to
9180  # unix format.
9181  new_path=`$CYGPATH -u "$path"`
9182
9183  # Now try to locate executable using which
9184  new_path=`$WHICH "$new_path" 2> /dev/null`
9185  if test "x$new_path" = x; then
9186    # Oops. Which didn't find the executable.
9187    # The splitting of arguments from the executable at a space might have been incorrect,
9188    # since paths with space are more likely in Windows. Give it another try with the whole
9189    # argument.
9190    path="$complete"
9191    arguments="EOL"
9192    new_path=`$CYGPATH -u "$path"`
9193    new_path=`$WHICH "$new_path" 2> /dev/null`
9194    if test "x$new_path" = x; then
9195      # It's still not found. Now this is an unrecoverable error.
9196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9198      has_space=`$ECHO "$complete" | $GREP " "`
9199      if test "x$has_space" != x; then
9200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9202      fi
9203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9204    fi
9205  fi
9206
9207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9210  # "foo.exe" is OK but "foo" is an error.
9211  #
9212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9213  # It is also a way to make sure we got the proper file name for the real test later on.
9214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9215  if test "x$test_shortpath" = x; then
9216    # Short path failed, file does not exist as specified.
9217    # Try adding .exe or .cmd
9218    if test -f "${new_path}.exe"; then
9219       input_to_shortpath="${new_path}.exe"
9220    elif test -f "${new_path}.cmd"; then
9221       input_to_shortpath="${new_path}.cmd"
9222    else
9223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9224$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9227      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9228    fi
9229  else
9230    input_to_shortpath="$new_path"
9231  fi
9232
9233  # Call helper function which possibly converts this using DOS-style short mode.
9234  # If so, the updated path is stored in $new_path.
9235  new_path="$input_to_shortpath"
9236
9237  input_path="$input_to_shortpath"
9238  # Check if we need to convert this using DOS-style short mode. If the path
9239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9240  # take no chances and rewrite it.
9241  # Note: m4 eats our [], so we need to use [ and ] instead.
9242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9243  if test "x$has_forbidden_chars" != x; then
9244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9248      # Going to short mode and back again did indeed matter. Since short mode is
9249      # case insensitive, let's make it lowercase to improve readability.
9250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9251      # Now convert it back to Unix-stile (cygpath)
9252      input_path=`$CYGPATH -u "$shortmode_path"`
9253      new_path="$input_path"
9254    fi
9255  fi
9256
9257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9258  if test "x$test_cygdrive_prefix" = x; then
9259    # As a simple fix, exclude /usr/bin since it's not a real path.
9260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9262      # a path prefixed by /cygdrive for fixpath to work.
9263      new_path="$CYGWIN_ROOT_PATH$input_path"
9264    fi
9265  fi
9266
9267  # remove trailing .exe if any
9268  new_path="${new_path/%.exe/}"
9269
9270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9271
9272  # First separate the path from the arguments. This will split at the first
9273  # space.
9274  complete="$FOUND_MAKE"
9275  path="${complete%% *}"
9276  tmp="$complete EOL"
9277  arguments="${tmp#* }"
9278
9279  # Input might be given as Windows format, start by converting to
9280  # unix format.
9281  new_path="$path"
9282
9283  windows_path="$new_path"
9284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9285    unix_path=`$CYGPATH -u "$windows_path"`
9286    new_path="$unix_path"
9287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9289    new_path="$unix_path"
9290  fi
9291
9292
9293  # Now try to locate executable using which
9294  new_path=`$WHICH "$new_path" 2> /dev/null`
9295
9296  if test "x$new_path" = x; then
9297    # Oops. Which didn't find the executable.
9298    # The splitting of arguments from the executable at a space might have been incorrect,
9299    # since paths with space are more likely in Windows. Give it another try with the whole
9300    # argument.
9301    path="$complete"
9302    arguments="EOL"
9303    new_path="$path"
9304
9305  windows_path="$new_path"
9306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9307    unix_path=`$CYGPATH -u "$windows_path"`
9308    new_path="$unix_path"
9309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9311    new_path="$unix_path"
9312  fi
9313
9314
9315    new_path=`$WHICH "$new_path" 2> /dev/null`
9316
9317    if test "x$new_path" = x; then
9318      # It's still not found. Now this is an unrecoverable error.
9319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9320$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9321      has_space=`$ECHO "$complete" | $GREP " "`
9322      if test "x$has_space" != x; then
9323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9325      fi
9326      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9327    fi
9328  fi
9329
9330  # Now new_path has a complete unix path to the binary
9331  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9332    # Keep paths in /bin as-is, but remove trailing .exe if any
9333    new_path="${new_path/%.exe/}"
9334    # Do not save /bin paths to all_fixpath_prefixes!
9335  else
9336    # Not in mixed or Windows style, start by that.
9337    new_path=`cmd //c echo $new_path`
9338
9339  input_path="$new_path"
9340  # Check if we need to convert this using DOS-style short mode. If the path
9341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9342  # take no chances and rewrite it.
9343  # Note: m4 eats our [], so we need to use [ and ] instead.
9344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9345  if test "x$has_forbidden_chars" != x; then
9346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9348  fi
9349
9350    # Output is in $new_path
9351
9352  windows_path="$new_path"
9353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9354    unix_path=`$CYGPATH -u "$windows_path"`
9355    new_path="$unix_path"
9356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9358    new_path="$unix_path"
9359  fi
9360
9361    # remove trailing .exe if any
9362    new_path="${new_path/%.exe/}"
9363
9364    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9365    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9366  fi
9367
9368  else
9369    # We're on a posix platform. Hooray! :)
9370    # First separate the path from the arguments. This will split at the first
9371    # space.
9372    complete="$FOUND_MAKE"
9373    path="${complete%% *}"
9374    tmp="$complete EOL"
9375    arguments="${tmp#* }"
9376
9377    new_path=`$WHICH $path 2> /dev/null`
9378    if test "x$new_path" = x; then
9379      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9380      if test "x$is_absolute_path" != x; then
9381        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9382$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9383        new_path="$path"
9384      else
9385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9386$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9387        has_space=`$ECHO "$complete" | $GREP " "`
9388        if test "x$has_space" != x; then
9389          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9390$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9391        fi
9392        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9393      fi
9394    fi
9395  fi
9396
9397  # Now join together the path and the arguments once again
9398  if test "x$arguments" != xEOL; then
9399      new_complete="$new_path ${arguments% *}"
9400  else
9401      new_complete="$new_path"
9402  fi
9403
9404  if test "x$complete" != "x$new_complete"; then
9405    FOUND_MAKE="$new_complete"
9406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9407$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9408  fi
9409
9410        fi
9411      fi
9412    fi
9413  fi
9414
9415        fi
9416        PATH=$OLD_PATH
9417      fi
9418    fi
9419
9420    if test "x$FOUND_MAKE" = x; then
9421      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
9422    fi
9423  fi
9424
9425  MAKE=$FOUND_MAKE
9426
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9428$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9429
9430
9431
9432    # Test if find supports -delete
9433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9434$as_echo_n "checking if find supports -delete... " >&6; }
9435    FIND_DELETE="-delete"
9436
9437    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9438
9439    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9440
9441    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9442    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9443        # No, it does not.
9444        rm $DELETEDIR/TestIfFindSupportsDelete
9445        FIND_DELETE="-exec rm \{\} \+"
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
9448    else
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9450$as_echo "yes" >&6; }
9451    fi
9452    rmdir $DELETEDIR
9453
9454
9455
9456# These tools might not be installed by default,
9457# need hint on how to install them.
9458
9459    for ac_prog in unzip
9460do
9461  # Extract the first word of "$ac_prog", so it can be a program name with args.
9462set dummy $ac_prog; ac_word=$2
9463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9464$as_echo_n "checking for $ac_word... " >&6; }
9465if test "${ac_cv_path_UNZIP+set}" = set; then :
9466  $as_echo_n "(cached) " >&6
9467else
9468  case $UNZIP in
9469  [\\/]* | ?:[\\/]*)
9470  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9471  ;;
9472  *)
9473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9474for as_dir in $PATH
9475do
9476  IFS=$as_save_IFS
9477  test -z "$as_dir" && as_dir=.
9478    for ac_exec_ext in '' $ac_executable_extensions; do
9479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9480    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9482    break 2
9483  fi
9484done
9485  done
9486IFS=$as_save_IFS
9487
9488  ;;
9489esac
9490fi
9491UNZIP=$ac_cv_path_UNZIP
9492if test -n "$UNZIP"; then
9493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9494$as_echo "$UNZIP" >&6; }
9495else
9496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497$as_echo "no" >&6; }
9498fi
9499
9500
9501  test -n "$UNZIP" && break
9502done
9503
9504
9505    if test "x$UNZIP" = x; then
9506        if test "xunzip" = x; then
9507          PROG_NAME=unzip
9508        else
9509          PROG_NAME=unzip
9510        fi
9511        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9512$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9513        as_fn_error $? "Cannot continue" "$LINENO" 5
9514    fi
9515
9516
9517
9518    for ac_prog in zip
9519do
9520  # Extract the first word of "$ac_prog", so it can be a program name with args.
9521set dummy $ac_prog; ac_word=$2
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if test "${ac_cv_path_ZIP+set}" = set; then :
9525  $as_echo_n "(cached) " >&6
9526else
9527  case $ZIP in
9528  [\\/]* | ?:[\\/]*)
9529  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9530  ;;
9531  *)
9532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533for as_dir in $PATH
9534do
9535  IFS=$as_save_IFS
9536  test -z "$as_dir" && as_dir=.
9537    for ac_exec_ext in '' $ac_executable_extensions; do
9538  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9539    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541    break 2
9542  fi
9543done
9544  done
9545IFS=$as_save_IFS
9546
9547  ;;
9548esac
9549fi
9550ZIP=$ac_cv_path_ZIP
9551if test -n "$ZIP"; then
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9553$as_echo "$ZIP" >&6; }
9554else
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
9557fi
9558
9559
9560  test -n "$ZIP" && break
9561done
9562
9563
9564    if test "x$ZIP" = x; then
9565        if test "xzip" = x; then
9566          PROG_NAME=zip
9567        else
9568          PROG_NAME=zip
9569        fi
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9571$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9572        as_fn_error $? "Cannot continue" "$LINENO" 5
9573    fi
9574
9575
9576
9577# Non-required basic tools
9578
9579# Extract the first word of "ldd", so it can be a program name with args.
9580set dummy ldd; ac_word=$2
9581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9582$as_echo_n "checking for $ac_word... " >&6; }
9583if test "${ac_cv_path_LDD+set}" = set; then :
9584  $as_echo_n "(cached) " >&6
9585else
9586  case $LDD in
9587  [\\/]* | ?:[\\/]*)
9588  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9589  ;;
9590  *)
9591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9592for as_dir in $PATH
9593do
9594  IFS=$as_save_IFS
9595  test -z "$as_dir" && as_dir=.
9596    for ac_exec_ext in '' $ac_executable_extensions; do
9597  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9598    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9600    break 2
9601  fi
9602done
9603  done
9604IFS=$as_save_IFS
9605
9606  ;;
9607esac
9608fi
9609LDD=$ac_cv_path_LDD
9610if test -n "$LDD"; then
9611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9612$as_echo "$LDD" >&6; }
9613else
9614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
9616fi
9617
9618
9619if test "x$LDD" = "x"; then
9620    # List shared lib dependencies is used for
9621    # debug output and checking for forbidden dependencies.
9622    # We can build without it.
9623    LDD="true"
9624fi
9625# Extract the first word of "otool", so it can be a program name with args.
9626set dummy otool; ac_word=$2
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9628$as_echo_n "checking for $ac_word... " >&6; }
9629if test "${ac_cv_path_OTOOL+set}" = set; then :
9630  $as_echo_n "(cached) " >&6
9631else
9632  case $OTOOL in
9633  [\\/]* | ?:[\\/]*)
9634  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9635  ;;
9636  *)
9637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9638for as_dir in $PATH
9639do
9640  IFS=$as_save_IFS
9641  test -z "$as_dir" && as_dir=.
9642    for ac_exec_ext in '' $ac_executable_extensions; do
9643  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9644    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9646    break 2
9647  fi
9648done
9649  done
9650IFS=$as_save_IFS
9651
9652  ;;
9653esac
9654fi
9655OTOOL=$ac_cv_path_OTOOL
9656if test -n "$OTOOL"; then
9657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9658$as_echo "$OTOOL" >&6; }
9659else
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
9662fi
9663
9664
9665if test "x$OTOOL" = "x"; then
9666   OTOOL="true"
9667fi
9668for ac_prog in readelf greadelf
9669do
9670  # Extract the first word of "$ac_prog", so it can be a program name with args.
9671set dummy $ac_prog; ac_word=$2
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9673$as_echo_n "checking for $ac_word... " >&6; }
9674if test "${ac_cv_path_READELF+set}" = set; then :
9675  $as_echo_n "(cached) " >&6
9676else
9677  case $READELF in
9678  [\\/]* | ?:[\\/]*)
9679  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9680  ;;
9681  *)
9682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9683for as_dir in $PATH
9684do
9685  IFS=$as_save_IFS
9686  test -z "$as_dir" && as_dir=.
9687    for ac_exec_ext in '' $ac_executable_extensions; do
9688  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9689    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9691    break 2
9692  fi
9693done
9694  done
9695IFS=$as_save_IFS
9696
9697  ;;
9698esac
9699fi
9700READELF=$ac_cv_path_READELF
9701if test -n "$READELF"; then
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9703$as_echo "$READELF" >&6; }
9704else
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
9707fi
9708
9709
9710  test -n "$READELF" && break
9711done
9712
9713# Extract the first word of "hg", so it can be a program name with args.
9714set dummy hg; ac_word=$2
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9716$as_echo_n "checking for $ac_word... " >&6; }
9717if test "${ac_cv_path_HG+set}" = set; then :
9718  $as_echo_n "(cached) " >&6
9719else
9720  case $HG in
9721  [\\/]* | ?:[\\/]*)
9722  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9723  ;;
9724  *)
9725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726for as_dir in $PATH
9727do
9728  IFS=$as_save_IFS
9729  test -z "$as_dir" && as_dir=.
9730    for ac_exec_ext in '' $ac_executable_extensions; do
9731  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9732    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734    break 2
9735  fi
9736done
9737  done
9738IFS=$as_save_IFS
9739
9740  ;;
9741esac
9742fi
9743HG=$ac_cv_path_HG
9744if test -n "$HG"; then
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9746$as_echo "$HG" >&6; }
9747else
9748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
9750fi
9751
9752
9753# Extract the first word of "stat", so it can be a program name with args.
9754set dummy stat; ac_word=$2
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
9757if test "${ac_cv_path_STAT+set}" = set; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  case $STAT in
9761  [\\/]* | ?:[\\/]*)
9762  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9763  ;;
9764  *)
9765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766for as_dir in $PATH
9767do
9768  IFS=$as_save_IFS
9769  test -z "$as_dir" && as_dir=.
9770    for ac_exec_ext in '' $ac_executable_extensions; do
9771  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9772    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774    break 2
9775  fi
9776done
9777  done
9778IFS=$as_save_IFS
9779
9780  ;;
9781esac
9782fi
9783STAT=$ac_cv_path_STAT
9784if test -n "$STAT"; then
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9786$as_echo "$STAT" >&6; }
9787else
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793# Extract the first word of "time", so it can be a program name with args.
9794set dummy time; ac_word=$2
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796$as_echo_n "checking for $ac_word... " >&6; }
9797if test "${ac_cv_path_TIME+set}" = set; then :
9798  $as_echo_n "(cached) " >&6
9799else
9800  case $TIME in
9801  [\\/]* | ?:[\\/]*)
9802  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9803  ;;
9804  *)
9805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806for as_dir in $PATH
9807do
9808  IFS=$as_save_IFS
9809  test -z "$as_dir" && as_dir=.
9810    for ac_exec_ext in '' $ac_executable_extensions; do
9811  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9812    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814    break 2
9815  fi
9816done
9817  done
9818IFS=$as_save_IFS
9819
9820  ;;
9821esac
9822fi
9823TIME=$ac_cv_path_TIME
9824if test -n "$TIME"; then
9825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9826$as_echo "$TIME" >&6; }
9827else
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829$as_echo "no" >&6; }
9830fi
9831
9832
9833
9834if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9835
9836    for ac_prog in comm
9837do
9838  # Extract the first word of "$ac_prog", so it can be a program name with args.
9839set dummy $ac_prog; ac_word=$2
9840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9841$as_echo_n "checking for $ac_word... " >&6; }
9842if test "${ac_cv_path_COMM+set}" = set; then :
9843  $as_echo_n "(cached) " >&6
9844else
9845  case $COMM in
9846  [\\/]* | ?:[\\/]*)
9847  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
9848  ;;
9849  *)
9850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9851for as_dir in $PATH
9852do
9853  IFS=$as_save_IFS
9854  test -z "$as_dir" && as_dir=.
9855    for ac_exec_ext in '' $ac_executable_extensions; do
9856  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9857    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
9858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9859    break 2
9860  fi
9861done
9862  done
9863IFS=$as_save_IFS
9864
9865  ;;
9866esac
9867fi
9868COMM=$ac_cv_path_COMM
9869if test -n "$COMM"; then
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
9871$as_echo "$COMM" >&6; }
9872else
9873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9874$as_echo "no" >&6; }
9875fi
9876
9877
9878  test -n "$COMM" && break
9879done
9880
9881
9882    if test "x$COMM" = x; then
9883        if test "xcomm" = x; then
9884          PROG_NAME=comm
9885        else
9886          PROG_NAME=comm
9887        fi
9888        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9889$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9890        as_fn_error $? "Cannot continue" "$LINENO" 5
9891    fi
9892
9893
9894fi
9895
9896
9897# Check if pkg-config is available.
9898
9899
9900if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9901	if test -n "$ac_tool_prefix"; then
9902  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9903set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905$as_echo_n "checking for $ac_word... " >&6; }
9906if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9907  $as_echo_n "(cached) " >&6
9908else
9909  case $PKG_CONFIG in
9910  [\\/]* | ?:[\\/]*)
9911  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9912  ;;
9913  *)
9914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915for as_dir in $PATH
9916do
9917  IFS=$as_save_IFS
9918  test -z "$as_dir" && as_dir=.
9919    for ac_exec_ext in '' $ac_executable_extensions; do
9920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9921    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923    break 2
9924  fi
9925done
9926  done
9927IFS=$as_save_IFS
9928
9929  ;;
9930esac
9931fi
9932PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9933if test -n "$PKG_CONFIG"; then
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9935$as_echo "$PKG_CONFIG" >&6; }
9936else
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938$as_echo "no" >&6; }
9939fi
9940
9941
9942fi
9943if test -z "$ac_cv_path_PKG_CONFIG"; then
9944  ac_pt_PKG_CONFIG=$PKG_CONFIG
9945  # Extract the first word of "pkg-config", so it can be a program name with args.
9946set dummy pkg-config; ac_word=$2
9947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9948$as_echo_n "checking for $ac_word... " >&6; }
9949if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
9950  $as_echo_n "(cached) " >&6
9951else
9952  case $ac_pt_PKG_CONFIG in
9953  [\\/]* | ?:[\\/]*)
9954  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9955  ;;
9956  *)
9957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9958for as_dir in $PATH
9959do
9960  IFS=$as_save_IFS
9961  test -z "$as_dir" && as_dir=.
9962    for ac_exec_ext in '' $ac_executable_extensions; do
9963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9964    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9966    break 2
9967  fi
9968done
9969  done
9970IFS=$as_save_IFS
9971
9972  ;;
9973esac
9974fi
9975ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9976if test -n "$ac_pt_PKG_CONFIG"; then
9977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9978$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9979else
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
9982fi
9983
9984  if test "x$ac_pt_PKG_CONFIG" = x; then
9985    PKG_CONFIG=""
9986  else
9987    case $cross_compiling:$ac_tool_warned in
9988yes:)
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9991ac_tool_warned=yes ;;
9992esac
9993    PKG_CONFIG=$ac_pt_PKG_CONFIG
9994  fi
9995else
9996  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9997fi
9998
9999fi
10000if test -n "$PKG_CONFIG"; then
10001	_pkg_min_version=0.9.0
10002	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10003$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10004	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10005		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10006$as_echo "yes" >&6; }
10007	else
10008		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
10010		PKG_CONFIG=""
10011	fi
10012
10013fi
10014
10015# After basic tools have been setup, we can check build os specific details.
10016
10017###############################################################################
10018
10019# Note that this is the build platform OS version!
10020
10021OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10022OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10023OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10024OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10025
10026
10027
10028
10029
10030# Setup builddeps, for automatic downloading of tools we need.
10031# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10032# boot-jdk setup, but we need to have basic tools setup first.
10033
10034
10035# Check whether --with-builddeps-conf was given.
10036if test "${with_builddeps_conf+set}" = set; then :
10037  withval=$with_builddeps_conf;
10038fi
10039
10040
10041
10042# Check whether --with-builddeps-server was given.
10043if test "${with_builddeps_server+set}" = set; then :
10044  withval=$with_builddeps_server;
10045fi
10046
10047
10048
10049# Check whether --with-builddeps-dir was given.
10050if test "${with_builddeps_dir+set}" = set; then :
10051  withval=$with_builddeps_dir;
10052else
10053  with_builddeps_dir=/localhome/builddeps
10054fi
10055
10056
10057
10058# Check whether --with-builddeps-group was given.
10059if test "${with_builddeps_group+set}" = set; then :
10060  withval=$with_builddeps_group;
10061fi
10062
10063
10064
10065
10066    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10067        if test "x$with_builddeps_conf" != x; then
10068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10069$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10070            builddepsfile=$with_builddeps_conf
10071            if test -s $builddepsfile; then
10072                . $builddepsfile
10073                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10074$as_echo "loaded!" >&6; }
10075            else
10076               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10077           fi
10078        else
10079            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10080$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10081            builddepsfile=`mktemp`
10082            touch $builddepsfile
10083            # Put all found confs into a single file.
10084            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10085            # Source the file to acquire the variables
10086            if test -s $builddepsfile; then
10087                . $builddepsfile
10088                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10089$as_echo "found at least one!" >&6; }
10090            else
10091               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10092           fi
10093        fi
10094        # Create build and target names that use _ instead of "-" and ".".
10095        # This is necessary to use them in variable names.
10096        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10097        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10098        # Extract rewrite information for build and target
10099        eval rewritten_build=\${REWRITE_${build_var}}
10100        if test "x$rewritten_build" = x; then
10101            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10102            echo Build stays the same $rewritten_build
10103        else
10104            echo Rewriting build for builddeps into $rewritten_build
10105        fi
10106        eval rewritten_target=\${REWRITE_${target_var}}
10107        if test "x$rewritten_target" = x; then
10108            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10109            echo Target stays the same $rewritten_target
10110        else
10111            echo Rewriting target for builddeps into $rewritten_target
10112        fi
10113        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10114        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10115    fi
10116    for ac_prog in 7z unzip
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  if test -n "$BDEPS_UNZIP"; then
10126  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10127else
10128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10129for as_dir in $PATH
10130do
10131  IFS=$as_save_IFS
10132  test -z "$as_dir" && as_dir=.
10133    for ac_exec_ext in '' $ac_executable_extensions; do
10134  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10135    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10137    break 2
10138  fi
10139done
10140  done
10141IFS=$as_save_IFS
10142
10143fi
10144fi
10145BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10146if test -n "$BDEPS_UNZIP"; then
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10148$as_echo "$BDEPS_UNZIP" >&6; }
10149else
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152fi
10153
10154
10155  test -n "$BDEPS_UNZIP" && break
10156done
10157
10158    if test "x$BDEPS_UNZIP" = x7z; then
10159        BDEPS_UNZIP="7z x"
10160    fi
10161
10162    for ac_prog in wget lftp ftp
10163do
10164  # Extract the first word of "$ac_prog", so it can be a program name with args.
10165set dummy $ac_prog; ac_word=$2
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10167$as_echo_n "checking for $ac_word... " >&6; }
10168if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10169  $as_echo_n "(cached) " >&6
10170else
10171  if test -n "$BDEPS_FTP"; then
10172  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10173else
10174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10181    ac_cv_prog_BDEPS_FTP="$ac_prog"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189fi
10190fi
10191BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10192if test -n "$BDEPS_FTP"; then
10193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10194$as_echo "$BDEPS_FTP" >&6; }
10195else
10196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
10198fi
10199
10200
10201  test -n "$BDEPS_FTP" && break
10202done
10203
10204
10205
10206###############################################################################
10207#
10208# Determine OpenJDK variants, options and version numbers.
10209#
10210###############################################################################
10211
10212# We need build & target for this.
10213
10214
10215###############################################################################
10216#
10217# Should we build only OpenJDK even if closed sources are present?
10218#
10219# Check whether --enable-openjdk-only was given.
10220if test "${enable_openjdk_only+set}" = set; then :
10221  enableval=$enable_openjdk_only;
10222else
10223  enable_openjdk_only="no"
10224fi
10225
10226
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10228$as_echo_n "checking for presence of closed sources... " >&6; }
10229if test -d "$SRC_ROOT/jdk/src/closed"; then
10230    CLOSED_SOURCE_PRESENT=yes
10231else
10232    CLOSED_SOURCE_PRESENT=no
10233fi
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10235$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10236
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10238$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10239SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10241$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10242
10243if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10244  OPENJDK=true
10245  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10246    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10247$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10248  fi
10249else
10250  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10251    OPENJDK=true
10252  else
10253    OPENJDK=false
10254  fi
10255fi
10256
10257if test "x$OPENJDK" = "xtrue"; then
10258    SET_OPENJDK="OPENJDK=true"
10259fi
10260
10261
10262
10263###############################################################################
10264#
10265# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10266# We always build headless support.
10267#
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10269$as_echo_n "checking headful support... " >&6; }
10270# Check whether --enable-headful was given.
10271if test "${enable_headful+set}" = set; then :
10272  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10273else
10274  SUPPORT_HEADFUL=yes
10275fi
10276
10277
10278SUPPORT_HEADLESS=yes
10279BUILD_HEADLESS="BUILD_HEADLESS:=true"
10280
10281if test "x$SUPPORT_HEADFUL" = xyes; then
10282    # We are building both headful and headless.
10283    headful_msg="inlude support for both headful and headless"
10284fi
10285
10286if test "x$SUPPORT_HEADFUL" = xno; then
10287    # Thus we are building headless only.
10288    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10289    headful_msg="headless only"
10290fi
10291
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10293$as_echo "$headful_msg" >&6; }
10294
10295
10296
10297
10298
10299# Control wether Hotspot runs Queens test after build.
10300# Check whether --enable-hotspot-test-in-build was given.
10301if test "${enable_hotspot_test_in_build+set}" = set; then :
10302  enableval=$enable_hotspot_test_in_build;
10303else
10304  enable_hotspot_test_in_build=no
10305fi
10306
10307if test "x$enable_hotspot_test_in_build" = "xyes"; then
10308    TEST_IN_BUILD=true
10309else
10310    TEST_IN_BUILD=false
10311fi
10312
10313
10314###############################################################################
10315#
10316# Choose cacerts source file
10317#
10318
10319# Check whether --with-cacerts-file was given.
10320if test "${with_cacerts_file+set}" = set; then :
10321  withval=$with_cacerts_file;
10322fi
10323
10324if test "x$with_cacerts_file" != x; then
10325    CACERTS_FILE=$with_cacerts_file
10326else
10327    if test "x$OPENJDK" = "xtrue"; then
10328        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10329    else
10330        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10331    fi
10332fi
10333
10334
10335###############################################################################
10336#
10337# Compress jars
10338#
10339COMPRESS_JARS=false
10340
10341
10342
10343
10344# Source the version numbers
10345. $AUTOCONF_DIR/version.numbers
10346if test "x$OPENJDK" = "xfalse"; then
10347    . $AUTOCONF_DIR/closed.version.numbers
10348fi
10349# Now set the JDK version, milestone, build number etc.
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364COPYRIGHT_YEAR=`date +'%Y'`
10365
10366
10367RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10368
10369
10370if test "x$JDK_UPDATE_VERSION" != x; then
10371    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10372else
10373    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10374fi
10375
10376
10377if test "x$MILESTONE" != x; then
10378    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10379else
10380    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10381fi
10382
10383
10384if test "x$JDK_BUILD_NUMBER" != x; then
10385    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10386else
10387    JDK_BUILD_NUMBER=b00
10388    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10389    # Avoid [:alnum:] since it depends on the locale.
10390    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10391    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10392    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10393fi
10394
10395COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10396
10397
10398
10399###############################################################################
10400#
10401# Setup BootJDK, used to bootstrap the build.
10402#
10403###############################################################################
10404
10405
10406BOOT_JDK_FOUND=no
10407
10408# Check whether --with-boot-jdk was given.
10409if test "${with_boot_jdk+set}" = set; then :
10410  withval=$with_boot_jdk;
10411fi
10412
10413
10414# We look for the Boot JDK through various means, going from more certain to
10415# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10416# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10417# must check if this is indeed valid; otherwise we'll continue looking.
10418
10419# Test: Is bootjdk explicitely set by command line arguments?
10420
10421  if test "x$BOOT_JDK_FOUND" = xno; then
10422    # Now execute the test
10423
10424if test "x$with_boot_jdk" != x; then
10425    BOOT_JDK=$with_boot_jdk
10426    BOOT_JDK_FOUND=maybe
10427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10428$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10429fi
10430
10431
10432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10434      # Do we have a bin/java?
10435      if test ! -x "$BOOT_JDK/bin/java"; then
10436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10438        BOOT_JDK_FOUND=no
10439      else
10440        # Do we have a bin/javac?
10441        if test ! -x "$BOOT_JDK/bin/javac"; then
10442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10446          BOOT_JDK_FOUND=no
10447        else
10448          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10449          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10450            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10452            BOOT_JDK_FOUND=no
10453          else
10454            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10456
10457            # Extra M4 quote needed to protect [] in grep expression.
10458            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10459            if test "x$FOUND_VERSION_78" = x; then
10460              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10462              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10463$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10464              BOOT_JDK_FOUND=no
10465            else
10466              # We're done! :-)
10467              BOOT_JDK_FOUND=yes
10468
10469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10470
10471  # Input might be given as Windows format, start by converting to
10472  # unix format.
10473  path="$BOOT_JDK"
10474  new_path=`$CYGPATH -u "$path"`
10475
10476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10479  # "foo.exe" is OK but "foo" is an error.
10480  #
10481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10482  # It is also a way to make sure we got the proper file name for the real test later on.
10483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10484  if test "x$test_shortpath" = x; then
10485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10488  fi
10489
10490  # Call helper function which possibly converts this using DOS-style short mode.
10491  # If so, the updated path is stored in $new_path.
10492
10493  input_path="$new_path"
10494  # Check if we need to convert this using DOS-style short mode. If the path
10495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10496  # take no chances and rewrite it.
10497  # Note: m4 eats our [], so we need to use [ and ] instead.
10498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10499  if test "x$has_forbidden_chars" != x; then
10500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10504      # Going to short mode and back again did indeed matter. Since short mode is
10505      # case insensitive, let's make it lowercase to improve readability.
10506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10507      # Now convert it back to Unix-stile (cygpath)
10508      input_path=`$CYGPATH -u "$shortmode_path"`
10509      new_path="$input_path"
10510    fi
10511  fi
10512
10513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10514  if test "x$test_cygdrive_prefix" = x; then
10515    # As a simple fix, exclude /usr/bin since it's not a real path.
10516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10518      # a path prefixed by /cygdrive for fixpath to work.
10519      new_path="$CYGWIN_ROOT_PATH$input_path"
10520    fi
10521  fi
10522
10523
10524  if test "x$path" != "x$new_path"; then
10525    BOOT_JDK="$new_path"
10526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10528  fi
10529
10530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10531
10532  path="$BOOT_JDK"
10533  has_colon=`$ECHO $path | $GREP ^.:`
10534  new_path="$path"
10535  if test "x$has_colon" = x; then
10536    # Not in mixed or Windows style, start by that.
10537    new_path=`cmd //c echo $path`
10538  fi
10539
10540
10541  input_path="$new_path"
10542  # Check if we need to convert this using DOS-style short mode. If the path
10543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10544  # take no chances and rewrite it.
10545  # Note: m4 eats our [], so we need to use [ and ] instead.
10546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10547  if test "x$has_forbidden_chars" != x; then
10548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10550  fi
10551
10552
10553  windows_path="$new_path"
10554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10555    unix_path=`$CYGPATH -u "$windows_path"`
10556    new_path="$unix_path"
10557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10559    new_path="$unix_path"
10560  fi
10561
10562  if test "x$path" != "x$new_path"; then
10563    BOOT_JDK="$new_path"
10564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10566  fi
10567
10568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10570
10571  else
10572    # We're on a posix platform. Hooray! :)
10573    path="$BOOT_JDK"
10574
10575    if test ! -f "$path" && test ! -d "$path"; then
10576      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10577    fi
10578
10579    has_space=`$ECHO "$path" | $GREP " "`
10580    if test "x$has_space" != x; then
10581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10583      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10584    fi
10585  fi
10586
10587              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10588$as_echo_n "checking for Boot JDK... " >&6; }
10589              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10590$as_echo "$BOOT_JDK" >&6; }
10591              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10592$as_echo_n "checking Boot JDK version... " >&6; }
10593              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10594              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10595$as_echo "$BOOT_JDK_VERSION" >&6; }
10596            fi # end check jdk version
10597          fi # end check rt.jar
10598        fi # end check javac
10599      fi # end check java
10600    fi # end check boot jdk found
10601  fi
10602
10603if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10604  # Having specified an argument which is incorrect will produce an instant failure;
10605  # we should not go on looking
10606  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10607fi
10608
10609# Test: Is bootjdk available from builddeps?
10610
10611  if test "x$BOOT_JDK_FOUND" = xno; then
10612    # Now execute the test
10613
10614
10615
10616    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10617        # Source the builddeps file again, to make sure it uses the latest variables!
10618        . $builddepsfile
10619        # Look for a target and build machine specific resource!
10620        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10621        if test "x$resource" = x; then
10622            # Ok, lets instead look for a target specific resource
10623            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10624        fi
10625        if test "x$resource" = x; then
10626            # Ok, lets instead look for a build specific resource
10627            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10628        fi
10629        if test "x$resource" = x; then
10630            # Ok, lets instead look for a generic resource
10631            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10632            resource=${builddep_bootjdk}
10633        fi
10634        if test "x$resource" != x; then
10635            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10636$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10637	    # If the resource in the builddeps.conf file is an existing directory,
10638	    # for example /java/linux/cups
10639	    if test -d ${resource}; then
10640	       depdir=${resource}
10641	    else
10642
10643# bootjdk is for example mymodule
10644# $resource is for example libs/general/libmymod_1_2_3.zip
10645# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10646# $with_builddeps_dir is for example /localhome/builddeps
10647# depdir is the name of the variable into which we store the depdir, eg MYMOD
10648# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10649# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10650    filename=`basename $resource`
10651    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10652    filebase=${filename%%.*}
10653    extension=${filename#*.}
10654    installdir=$with_builddeps_dir/$filebase
10655    if test ! -f $installdir/$filename.unpacked; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10657$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10658        if test ! -d $installdir; then
10659            mkdir -p $installdir
10660        fi
10661        if test ! -d $installdir; then
10662            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10663        fi
10664        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10665        touch $tmpfile
10666        if test ! -f $tmpfile; then
10667            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10668        fi
10669
10670    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10671    # $tmpfile is the local file name for the downloaded file.
10672    VALID_TOOL=no
10673    if test "x$BDEPS_FTP" = xwget; then
10674       VALID_TOOL=yes
10675       wget -O $tmpfile $with_builddeps_server/$resource
10676    fi
10677    if test "x$BDEPS_FTP" = xlftp; then
10678       VALID_TOOL=yes
10679       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10680    fi
10681    if test "x$BDEPS_FTP" = xftp; then
10682        VALID_TOOL=yes
10683        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10684        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10685        FTPUSERPWD=${FTPSERVER%%@*}
10686        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10687            FTPUSER=${userpwd%%:*}
10688            FTPPWD=${userpwd#*@}
10689            FTPSERVER=${FTPSERVER#*@}
10690        else
10691            FTPUSER=ftp
10692            FTPPWD=ftp
10693        fi
10694        # the "pass" command does not work on some
10695        # ftp clients (read ftp.exe) but if it works,
10696        # passive mode is better!
10697        (\
10698            echo "user $FTPUSER $FTPPWD"        ;\
10699            echo "pass"                         ;\
10700            echo "bin"                          ;\
10701            echo "get $FTPPATH $tmpfile"              ;\
10702        ) | ftp -in $FTPSERVER
10703    fi
10704    if test "x$VALID_TOOL" != xyes; then
10705       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10706    fi
10707
10708        mv $tmpfile $installdir/$filename
10709        if test ! -s $installdir/$filename; then
10710            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10711        fi
10712        case "$extension" in
10713            zip)  echo "Unzipping $installdir/$filename..."
10714               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10715            ;;
10716            tar.gz) echo "Untaring $installdir/$filename..."
10717               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10718            ;;
10719            tgz) echo "Untaring $installdir/$filename..."
10720               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10721            ;;
10722            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10723            ;;
10724        esac
10725    fi
10726    if test -f $installdir/$filename.unpacked; then
10727        depdir=$installdir
10728    fi
10729
10730	    fi
10731            # Source the builddeps file again, because in the previous command, the depdir
10732            # was updated to point at the current build dependency install directory.
10733            . $builddepsfile
10734            # Now extract variables from the builddeps.conf files.
10735            theroot=${builddep_bootjdk_ROOT}
10736            thecflags=${builddep_bootjdk_CFLAGS}
10737            thelibs=${builddep_bootjdk_LIBS}
10738            if test "x$depdir" = x; then
10739                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10740            fi
10741            BOOT_JDK=$depdir
10742            if test "x$theroot" != x; then
10743               BOOT_JDK="$theroot"
10744            fi
10745            if test "x$thecflags" != x; then
10746               BOOT_JDK_CFLAGS="$thecflags"
10747            fi
10748            if test "x$thelibs" != x; then
10749               BOOT_JDK_LIBS="$thelibs"
10750            fi
10751            BOOT_JDK_FOUND=maybe
10752            else BOOT_JDK_FOUND=no
10753
10754        fi
10755        else BOOT_JDK_FOUND=no
10756
10757    fi
10758
10759
10760
10761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10763      # Do we have a bin/java?
10764      if test ! -x "$BOOT_JDK/bin/java"; then
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10767        BOOT_JDK_FOUND=no
10768      else
10769        # Do we have a bin/javac?
10770        if test ! -x "$BOOT_JDK/bin/javac"; then
10771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10775          BOOT_JDK_FOUND=no
10776        else
10777          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10778          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10779            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10781            BOOT_JDK_FOUND=no
10782          else
10783            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10785
10786            # Extra M4 quote needed to protect [] in grep expression.
10787            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10788            if test "x$FOUND_VERSION_78" = x; then
10789              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10791              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10792$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10793              BOOT_JDK_FOUND=no
10794            else
10795              # We're done! :-)
10796              BOOT_JDK_FOUND=yes
10797
10798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10799
10800  # Input might be given as Windows format, start by converting to
10801  # unix format.
10802  path="$BOOT_JDK"
10803  new_path=`$CYGPATH -u "$path"`
10804
10805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10808  # "foo.exe" is OK but "foo" is an error.
10809  #
10810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10811  # It is also a way to make sure we got the proper file name for the real test later on.
10812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10813  if test "x$test_shortpath" = x; then
10814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10816    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10817  fi
10818
10819  # Call helper function which possibly converts this using DOS-style short mode.
10820  # If so, the updated path is stored in $new_path.
10821
10822  input_path="$new_path"
10823  # Check if we need to convert this using DOS-style short mode. If the path
10824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10825  # take no chances and rewrite it.
10826  # Note: m4 eats our [], so we need to use [ and ] instead.
10827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10828  if test "x$has_forbidden_chars" != x; then
10829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10833      # Going to short mode and back again did indeed matter. Since short mode is
10834      # case insensitive, let's make it lowercase to improve readability.
10835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10836      # Now convert it back to Unix-stile (cygpath)
10837      input_path=`$CYGPATH -u "$shortmode_path"`
10838      new_path="$input_path"
10839    fi
10840  fi
10841
10842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10843  if test "x$test_cygdrive_prefix" = x; then
10844    # As a simple fix, exclude /usr/bin since it's not a real path.
10845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10847      # a path prefixed by /cygdrive for fixpath to work.
10848      new_path="$CYGWIN_ROOT_PATH$input_path"
10849    fi
10850  fi
10851
10852
10853  if test "x$path" != "x$new_path"; then
10854    BOOT_JDK="$new_path"
10855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10857  fi
10858
10859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10860
10861  path="$BOOT_JDK"
10862  has_colon=`$ECHO $path | $GREP ^.:`
10863  new_path="$path"
10864  if test "x$has_colon" = x; then
10865    # Not in mixed or Windows style, start by that.
10866    new_path=`cmd //c echo $path`
10867  fi
10868
10869
10870  input_path="$new_path"
10871  # Check if we need to convert this using DOS-style short mode. If the path
10872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10873  # take no chances and rewrite it.
10874  # Note: m4 eats our [], so we need to use [ and ] instead.
10875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10876  if test "x$has_forbidden_chars" != x; then
10877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10879  fi
10880
10881
10882  windows_path="$new_path"
10883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10884    unix_path=`$CYGPATH -u "$windows_path"`
10885    new_path="$unix_path"
10886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10888    new_path="$unix_path"
10889  fi
10890
10891  if test "x$path" != "x$new_path"; then
10892    BOOT_JDK="$new_path"
10893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10895  fi
10896
10897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10899
10900  else
10901    # We're on a posix platform. Hooray! :)
10902    path="$BOOT_JDK"
10903
10904    if test ! -f "$path" && test ! -d "$path"; then
10905      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10906    fi
10907
10908    has_space=`$ECHO "$path" | $GREP " "`
10909    if test "x$has_space" != x; then
10910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10912      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10913    fi
10914  fi
10915
10916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10917$as_echo_n "checking for Boot JDK... " >&6; }
10918              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10919$as_echo "$BOOT_JDK" >&6; }
10920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10921$as_echo_n "checking Boot JDK version... " >&6; }
10922              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10924$as_echo "$BOOT_JDK_VERSION" >&6; }
10925            fi # end check jdk version
10926          fi # end check rt.jar
10927        fi # end check javac
10928      fi # end check java
10929    fi # end check boot jdk found
10930  fi
10931
10932
10933# Test: Is $JAVA_HOME set?
10934
10935  if test "x$BOOT_JDK_FOUND" = xno; then
10936    # Now execute the test
10937
10938    if test "x$JAVA_HOME" != x; then
10939        JAVA_HOME_PROCESSED="$JAVA_HOME"
10940
10941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10942
10943  # Input might be given as Windows format, start by converting to
10944  # unix format.
10945  path="$JAVA_HOME_PROCESSED"
10946  new_path=`$CYGPATH -u "$path"`
10947
10948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10951  # "foo.exe" is OK but "foo" is an error.
10952  #
10953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10954  # It is also a way to make sure we got the proper file name for the real test later on.
10955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10956  if test "x$test_shortpath" = x; then
10957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10958$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10959    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
10960  fi
10961
10962  # Call helper function which possibly converts this using DOS-style short mode.
10963  # If so, the updated path is stored in $new_path.
10964
10965  input_path="$new_path"
10966  # Check if we need to convert this using DOS-style short mode. If the path
10967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10968  # take no chances and rewrite it.
10969  # Note: m4 eats our [], so we need to use [ and ] instead.
10970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10971  if test "x$has_forbidden_chars" != x; then
10972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10976      # Going to short mode and back again did indeed matter. Since short mode is
10977      # case insensitive, let's make it lowercase to improve readability.
10978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10979      # Now convert it back to Unix-stile (cygpath)
10980      input_path=`$CYGPATH -u "$shortmode_path"`
10981      new_path="$input_path"
10982    fi
10983  fi
10984
10985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10986  if test "x$test_cygdrive_prefix" = x; then
10987    # As a simple fix, exclude /usr/bin since it's not a real path.
10988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10990      # a path prefixed by /cygdrive for fixpath to work.
10991      new_path="$CYGWIN_ROOT_PATH$input_path"
10992    fi
10993  fi
10994
10995
10996  if test "x$path" != "x$new_path"; then
10997    JAVA_HOME_PROCESSED="$new_path"
10998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10999$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11000  fi
11001
11002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11003
11004  path="$JAVA_HOME_PROCESSED"
11005  has_colon=`$ECHO $path | $GREP ^.:`
11006  new_path="$path"
11007  if test "x$has_colon" = x; then
11008    # Not in mixed or Windows style, start by that.
11009    new_path=`cmd //c echo $path`
11010  fi
11011
11012
11013  input_path="$new_path"
11014  # Check if we need to convert this using DOS-style short mode. If the path
11015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016  # take no chances and rewrite it.
11017  # Note: m4 eats our [], so we need to use [ and ] instead.
11018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11019  if test "x$has_forbidden_chars" != x; then
11020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11022  fi
11023
11024
11025  windows_path="$new_path"
11026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11027    unix_path=`$CYGPATH -u "$windows_path"`
11028    new_path="$unix_path"
11029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11031    new_path="$unix_path"
11032  fi
11033
11034  if test "x$path" != "x$new_path"; then
11035    JAVA_HOME_PROCESSED="$new_path"
11036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11037$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11038  fi
11039
11040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11042
11043  else
11044    # We're on a posix platform. Hooray! :)
11045    path="$JAVA_HOME_PROCESSED"
11046
11047    if test ! -f "$path" && test ! -d "$path"; then
11048      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11049    fi
11050
11051    has_space=`$ECHO "$path" | $GREP " "`
11052    if test "x$has_space" != x; then
11053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11054$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11055      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11056    fi
11057  fi
11058
11059        if test ! -d "$JAVA_HOME_PROCESSED"; then
11060            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11061$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11062        else
11063          # Aha, the user has set a JAVA_HOME
11064          # let us use that as the Boot JDK.
11065          BOOT_JDK="$JAVA_HOME_PROCESSED"
11066          BOOT_JDK_FOUND=maybe
11067          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11068$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11069        fi
11070    fi
11071
11072
11073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11075      # Do we have a bin/java?
11076      if test ! -x "$BOOT_JDK/bin/java"; then
11077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11079        BOOT_JDK_FOUND=no
11080      else
11081        # Do we have a bin/javac?
11082        if test ! -x "$BOOT_JDK/bin/javac"; then
11083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11087          BOOT_JDK_FOUND=no
11088        else
11089          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11090          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11093            BOOT_JDK_FOUND=no
11094          else
11095            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11096            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11097
11098            # Extra M4 quote needed to protect [] in grep expression.
11099            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11100            if test "x$FOUND_VERSION_78" = x; then
11101              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11103              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11104$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11105              BOOT_JDK_FOUND=no
11106            else
11107              # We're done! :-)
11108              BOOT_JDK_FOUND=yes
11109
11110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11111
11112  # Input might be given as Windows format, start by converting to
11113  # unix format.
11114  path="$BOOT_JDK"
11115  new_path=`$CYGPATH -u "$path"`
11116
11117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11120  # "foo.exe" is OK but "foo" is an error.
11121  #
11122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11123  # It is also a way to make sure we got the proper file name for the real test later on.
11124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11125  if test "x$test_shortpath" = x; then
11126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11129  fi
11130
11131  # Call helper function which possibly converts this using DOS-style short mode.
11132  # If so, the updated path is stored in $new_path.
11133
11134  input_path="$new_path"
11135  # Check if we need to convert this using DOS-style short mode. If the path
11136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11137  # take no chances and rewrite it.
11138  # Note: m4 eats our [], so we need to use [ and ] instead.
11139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11140  if test "x$has_forbidden_chars" != x; then
11141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11145      # Going to short mode and back again did indeed matter. Since short mode is
11146      # case insensitive, let's make it lowercase to improve readability.
11147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11148      # Now convert it back to Unix-stile (cygpath)
11149      input_path=`$CYGPATH -u "$shortmode_path"`
11150      new_path="$input_path"
11151    fi
11152  fi
11153
11154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11155  if test "x$test_cygdrive_prefix" = x; then
11156    # As a simple fix, exclude /usr/bin since it's not a real path.
11157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11159      # a path prefixed by /cygdrive for fixpath to work.
11160      new_path="$CYGWIN_ROOT_PATH$input_path"
11161    fi
11162  fi
11163
11164
11165  if test "x$path" != "x$new_path"; then
11166    BOOT_JDK="$new_path"
11167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11169  fi
11170
11171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11172
11173  path="$BOOT_JDK"
11174  has_colon=`$ECHO $path | $GREP ^.:`
11175  new_path="$path"
11176  if test "x$has_colon" = x; then
11177    # Not in mixed or Windows style, start by that.
11178    new_path=`cmd //c echo $path`
11179  fi
11180
11181
11182  input_path="$new_path"
11183  # Check if we need to convert this using DOS-style short mode. If the path
11184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11185  # take no chances and rewrite it.
11186  # Note: m4 eats our [], so we need to use [ and ] instead.
11187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11188  if test "x$has_forbidden_chars" != x; then
11189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11191  fi
11192
11193
11194  windows_path="$new_path"
11195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11196    unix_path=`$CYGPATH -u "$windows_path"`
11197    new_path="$unix_path"
11198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11200    new_path="$unix_path"
11201  fi
11202
11203  if test "x$path" != "x$new_path"; then
11204    BOOT_JDK="$new_path"
11205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11207  fi
11208
11209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11211
11212  else
11213    # We're on a posix platform. Hooray! :)
11214    path="$BOOT_JDK"
11215
11216    if test ! -f "$path" && test ! -d "$path"; then
11217      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11218    fi
11219
11220    has_space=`$ECHO "$path" | $GREP " "`
11221    if test "x$has_space" != x; then
11222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11223$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11224      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11225    fi
11226  fi
11227
11228              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11229$as_echo_n "checking for Boot JDK... " >&6; }
11230              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11231$as_echo "$BOOT_JDK" >&6; }
11232              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11233$as_echo_n "checking Boot JDK version... " >&6; }
11234              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11235              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11236$as_echo "$BOOT_JDK_VERSION" >&6; }
11237            fi # end check jdk version
11238          fi # end check rt.jar
11239        fi # end check javac
11240      fi # end check java
11241    fi # end check boot jdk found
11242  fi
11243
11244
11245# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11246
11247  if test "x$BOOT_JDK_FOUND" = xno; then
11248    # Now execute the test
11249
11250    if test -x /usr/libexec/java_home; then
11251        BOOT_JDK=`/usr/libexec/java_home`
11252        BOOT_JDK_FOUND=maybe
11253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11254$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11255    fi
11256
11257
11258    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11259    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11260      # Do we have a bin/java?
11261      if test ! -x "$BOOT_JDK/bin/java"; then
11262        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11264        BOOT_JDK_FOUND=no
11265      else
11266        # Do we have a bin/javac?
11267        if test ! -x "$BOOT_JDK/bin/javac"; then
11268          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11270          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11271$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11272          BOOT_JDK_FOUND=no
11273        else
11274          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11275          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11276            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11278            BOOT_JDK_FOUND=no
11279          else
11280            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11281            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11282
11283            # Extra M4 quote needed to protect [] in grep expression.
11284            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11285            if test "x$FOUND_VERSION_78" = x; then
11286              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11288              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11289$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11290              BOOT_JDK_FOUND=no
11291            else
11292              # We're done! :-)
11293              BOOT_JDK_FOUND=yes
11294
11295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11296
11297  # Input might be given as Windows format, start by converting to
11298  # unix format.
11299  path="$BOOT_JDK"
11300  new_path=`$CYGPATH -u "$path"`
11301
11302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11305  # "foo.exe" is OK but "foo" is an error.
11306  #
11307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11308  # It is also a way to make sure we got the proper file name for the real test later on.
11309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11310  if test "x$test_shortpath" = x; then
11311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11313    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11314  fi
11315
11316  # Call helper function which possibly converts this using DOS-style short mode.
11317  # If so, the updated path is stored in $new_path.
11318
11319  input_path="$new_path"
11320  # Check if we need to convert this using DOS-style short mode. If the path
11321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11322  # take no chances and rewrite it.
11323  # Note: m4 eats our [], so we need to use [ and ] instead.
11324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11325  if test "x$has_forbidden_chars" != x; then
11326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11330      # Going to short mode and back again did indeed matter. Since short mode is
11331      # case insensitive, let's make it lowercase to improve readability.
11332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11333      # Now convert it back to Unix-stile (cygpath)
11334      input_path=`$CYGPATH -u "$shortmode_path"`
11335      new_path="$input_path"
11336    fi
11337  fi
11338
11339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11340  if test "x$test_cygdrive_prefix" = x; then
11341    # As a simple fix, exclude /usr/bin since it's not a real path.
11342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11344      # a path prefixed by /cygdrive for fixpath to work.
11345      new_path="$CYGWIN_ROOT_PATH$input_path"
11346    fi
11347  fi
11348
11349
11350  if test "x$path" != "x$new_path"; then
11351    BOOT_JDK="$new_path"
11352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11354  fi
11355
11356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11357
11358  path="$BOOT_JDK"
11359  has_colon=`$ECHO $path | $GREP ^.:`
11360  new_path="$path"
11361  if test "x$has_colon" = x; then
11362    # Not in mixed or Windows style, start by that.
11363    new_path=`cmd //c echo $path`
11364  fi
11365
11366
11367  input_path="$new_path"
11368  # Check if we need to convert this using DOS-style short mode. If the path
11369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11370  # take no chances and rewrite it.
11371  # Note: m4 eats our [], so we need to use [ and ] instead.
11372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11373  if test "x$has_forbidden_chars" != x; then
11374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11376  fi
11377
11378
11379  windows_path="$new_path"
11380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11381    unix_path=`$CYGPATH -u "$windows_path"`
11382    new_path="$unix_path"
11383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11385    new_path="$unix_path"
11386  fi
11387
11388  if test "x$path" != "x$new_path"; then
11389    BOOT_JDK="$new_path"
11390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11391$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11392  fi
11393
11394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11396
11397  else
11398    # We're on a posix platform. Hooray! :)
11399    path="$BOOT_JDK"
11400
11401    if test ! -f "$path" && test ! -d "$path"; then
11402      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11403    fi
11404
11405    has_space=`$ECHO "$path" | $GREP " "`
11406    if test "x$has_space" != x; then
11407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11410    fi
11411  fi
11412
11413              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11414$as_echo_n "checking for Boot JDK... " >&6; }
11415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11416$as_echo "$BOOT_JDK" >&6; }
11417              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11418$as_echo_n "checking Boot JDK version... " >&6; }
11419              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11420              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11421$as_echo "$BOOT_JDK_VERSION" >&6; }
11422            fi # end check jdk version
11423          fi # end check rt.jar
11424        fi # end check javac
11425      fi # end check java
11426    fi # end check boot jdk found
11427  fi
11428
11429
11430# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11431
11432  if test "x$BOOT_JDK_FOUND" = xno; then
11433    # Now execute the test
11434
11435    # Extract the first word of "javac", so it can be a program name with args.
11436set dummy javac; ac_word=$2
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11438$as_echo_n "checking for $ac_word... " >&6; }
11439if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11440  $as_echo_n "(cached) " >&6
11441else
11442  case $JAVAC_CHECK in
11443  [\\/]* | ?:[\\/]*)
11444  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11445  ;;
11446  *)
11447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11448for as_dir in $PATH
11449do
11450  IFS=$as_save_IFS
11451  test -z "$as_dir" && as_dir=.
11452    for ac_exec_ext in '' $ac_executable_extensions; do
11453  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11454    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11456    break 2
11457  fi
11458done
11459  done
11460IFS=$as_save_IFS
11461
11462  ;;
11463esac
11464fi
11465JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11466if test -n "$JAVAC_CHECK"; then
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11468$as_echo "$JAVAC_CHECK" >&6; }
11469else
11470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
11472fi
11473
11474
11475    # Extract the first word of "java", so it can be a program name with args.
11476set dummy java; ac_word=$2
11477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11478$as_echo_n "checking for $ac_word... " >&6; }
11479if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11480  $as_echo_n "(cached) " >&6
11481else
11482  case $JAVA_CHECK in
11483  [\\/]* | ?:[\\/]*)
11484  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11485  ;;
11486  *)
11487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11488for as_dir in $PATH
11489do
11490  IFS=$as_save_IFS
11491  test -z "$as_dir" && as_dir=.
11492    for ac_exec_ext in '' $ac_executable_extensions; do
11493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11494    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11496    break 2
11497  fi
11498done
11499  done
11500IFS=$as_save_IFS
11501
11502  ;;
11503esac
11504fi
11505JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11506if test -n "$JAVA_CHECK"; then
11507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11508$as_echo "$JAVA_CHECK" >&6; }
11509else
11510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
11512fi
11513
11514
11515    BINARY="$JAVAC_CHECK"
11516    if test "x$JAVAC_CHECK" = x; then
11517        BINARY="$JAVA_CHECK"
11518    fi
11519    if test "x$BINARY" != x; then
11520        # So there is a java(c) binary, it might be part of a JDK.
11521        # Lets find the JDK/JRE directory by following symbolic links.
11522        # Linux/GNU systems often have links from /usr/bin/java to
11523        # /etc/alternatives/java to the real JDK binary.
11524
11525    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11526        # Follow a chain of symbolic links. Use readlink
11527        # where it exists, else fall back to horribly
11528        # complicated shell code.
11529        if test "x$READLINK_TESTED" != yes; then
11530            # On MacOSX there is a readlink tool with a different
11531            # purpose than the GNU readlink tool. Check the found readlink.
11532            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11533            if test "x$ISGNU" = x; then
11534                 # A readlink that we do not know how to use.
11535                 # Are there other non-GNU readlinks out there?
11536                 READLINK_TESTED=yes
11537                 READLINK=
11538            fi
11539        fi
11540
11541        if test "x$READLINK" != x; then
11542            BINARY=`$READLINK -f $BINARY`
11543        else
11544            STARTDIR=$PWD
11545            COUNTER=0
11546            DIR=`$DIRNAME $BINARY`
11547            FILE=`$BASENAME $BINARY`
11548            while test $COUNTER -lt 20; do
11549                ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11550                if test "x$ISLINK" == x; then
11551                    # This is not a symbolic link! We are done!
11552                    break
11553                fi
11554                # The link might be relative! We have to use cd to travel safely.
11555                cd $DIR
11556                # ... and we must get the to the absolute path, not one using symbolic links.
11557                cd `pwd -P`
11558                cd `$DIRNAME $ISLINK`
11559                DIR=`$THEPWDCMD`
11560                FILE=`$BASENAME $ISLINK`
11561                let COUNTER=COUNTER+1
11562            done
11563            cd $STARTDIR
11564            BINARY=$DIR/$FILE
11565        fi
11566    fi
11567
11568        BOOT_JDK=`dirname "$BINARY"`
11569        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11570        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11571            # Looks like we found ourselves an JDK
11572            BOOT_JDK_FOUND=maybe
11573            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11574$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11575        fi
11576    fi
11577
11578
11579    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11580    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11581      # Do we have a bin/java?
11582      if test ! -x "$BOOT_JDK/bin/java"; then
11583        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11585        BOOT_JDK_FOUND=no
11586      else
11587        # Do we have a bin/javac?
11588        if test ! -x "$BOOT_JDK/bin/javac"; then
11589          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11591          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11592$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11593          BOOT_JDK_FOUND=no
11594        else
11595          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11596          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11597            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11599            BOOT_JDK_FOUND=no
11600          else
11601            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11602            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11603
11604            # Extra M4 quote needed to protect [] in grep expression.
11605            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11606            if test "x$FOUND_VERSION_78" = x; then
11607              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11609              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11610$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11611              BOOT_JDK_FOUND=no
11612            else
11613              # We're done! :-)
11614              BOOT_JDK_FOUND=yes
11615
11616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11617
11618  # Input might be given as Windows format, start by converting to
11619  # unix format.
11620  path="$BOOT_JDK"
11621  new_path=`$CYGPATH -u "$path"`
11622
11623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11626  # "foo.exe" is OK but "foo" is an error.
11627  #
11628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11629  # It is also a way to make sure we got the proper file name for the real test later on.
11630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11631  if test "x$test_shortpath" = x; then
11632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11634    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11635  fi
11636
11637  # Call helper function which possibly converts this using DOS-style short mode.
11638  # If so, the updated path is stored in $new_path.
11639
11640  input_path="$new_path"
11641  # Check if we need to convert this using DOS-style short mode. If the path
11642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11643  # take no chances and rewrite it.
11644  # Note: m4 eats our [], so we need to use [ and ] instead.
11645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11646  if test "x$has_forbidden_chars" != x; then
11647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11651      # Going to short mode and back again did indeed matter. Since short mode is
11652      # case insensitive, let's make it lowercase to improve readability.
11653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11654      # Now convert it back to Unix-stile (cygpath)
11655      input_path=`$CYGPATH -u "$shortmode_path"`
11656      new_path="$input_path"
11657    fi
11658  fi
11659
11660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11661  if test "x$test_cygdrive_prefix" = x; then
11662    # As a simple fix, exclude /usr/bin since it's not a real path.
11663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11665      # a path prefixed by /cygdrive for fixpath to work.
11666      new_path="$CYGWIN_ROOT_PATH$input_path"
11667    fi
11668  fi
11669
11670
11671  if test "x$path" != "x$new_path"; then
11672    BOOT_JDK="$new_path"
11673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11675  fi
11676
11677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11678
11679  path="$BOOT_JDK"
11680  has_colon=`$ECHO $path | $GREP ^.:`
11681  new_path="$path"
11682  if test "x$has_colon" = x; then
11683    # Not in mixed or Windows style, start by that.
11684    new_path=`cmd //c echo $path`
11685  fi
11686
11687
11688  input_path="$new_path"
11689  # Check if we need to convert this using DOS-style short mode. If the path
11690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11691  # take no chances and rewrite it.
11692  # Note: m4 eats our [], so we need to use [ and ] instead.
11693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11694  if test "x$has_forbidden_chars" != x; then
11695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11697  fi
11698
11699
11700  windows_path="$new_path"
11701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11702    unix_path=`$CYGPATH -u "$windows_path"`
11703    new_path="$unix_path"
11704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11706    new_path="$unix_path"
11707  fi
11708
11709  if test "x$path" != "x$new_path"; then
11710    BOOT_JDK="$new_path"
11711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11713  fi
11714
11715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11717
11718  else
11719    # We're on a posix platform. Hooray! :)
11720    path="$BOOT_JDK"
11721
11722    if test ! -f "$path" && test ! -d "$path"; then
11723      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11724    fi
11725
11726    has_space=`$ECHO "$path" | $GREP " "`
11727    if test "x$has_space" != x; then
11728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11730      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11731    fi
11732  fi
11733
11734              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11735$as_echo_n "checking for Boot JDK... " >&6; }
11736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11737$as_echo "$BOOT_JDK" >&6; }
11738              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11739$as_echo_n "checking Boot JDK version... " >&6; }
11740              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11742$as_echo "$BOOT_JDK_VERSION" >&6; }
11743            fi # end check jdk version
11744          fi # end check rt.jar
11745        fi # end check javac
11746      fi # end check java
11747    fi # end check boot jdk found
11748  fi
11749
11750
11751# Test: Is there a JDK installed in default, well-known locations?
11752
11753  if test "x$BOOT_JDK_FOUND" = xno; then
11754    # Now execute the test
11755
11756  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11757
11758  if test "x$BOOT_JDK_FOUND" = xno; then
11759    # Now execute the test
11760
11761  if test "x$ProgramW6432" != x; then
11762    VIRTUAL_DIR="$ProgramW6432/Java"
11763
11764  windows_path="$VIRTUAL_DIR"
11765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11766    unix_path=`$CYGPATH -u "$windows_path"`
11767    VIRTUAL_DIR="$unix_path"
11768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11770    VIRTUAL_DIR="$unix_path"
11771  fi
11772
11773
11774  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11775  BOOT_JDK_SUFFIX=""
11776  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11777  if test "x$ALL_JDKS_FOUND" != x; then
11778    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11779
11780  if test "x$BOOT_JDK_FOUND" = xno; then
11781    # Now execute the test
11782
11783        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11784        if test -d "$BOOT_JDK"; then
11785          BOOT_JDK_FOUND=maybe
11786          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11787$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11788        fi
11789
11790
11791    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11792    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11793      # Do we have a bin/java?
11794      if test ! -x "$BOOT_JDK/bin/java"; then
11795        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11797        BOOT_JDK_FOUND=no
11798      else
11799        # Do we have a bin/javac?
11800        if test ! -x "$BOOT_JDK/bin/javac"; then
11801          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11803          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11804$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11805          BOOT_JDK_FOUND=no
11806        else
11807          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11808          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11811            BOOT_JDK_FOUND=no
11812          else
11813            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11814            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11815
11816            # Extra M4 quote needed to protect [] in grep expression.
11817            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11818            if test "x$FOUND_VERSION_78" = x; then
11819              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11821              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11822$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11823              BOOT_JDK_FOUND=no
11824            else
11825              # We're done! :-)
11826              BOOT_JDK_FOUND=yes
11827
11828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11829
11830  # Input might be given as Windows format, start by converting to
11831  # unix format.
11832  path="$BOOT_JDK"
11833  new_path=`$CYGPATH -u "$path"`
11834
11835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11838  # "foo.exe" is OK but "foo" is an error.
11839  #
11840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11841  # It is also a way to make sure we got the proper file name for the real test later on.
11842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11843  if test "x$test_shortpath" = x; then
11844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11846    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11847  fi
11848
11849  # Call helper function which possibly converts this using DOS-style short mode.
11850  # If so, the updated path is stored in $new_path.
11851
11852  input_path="$new_path"
11853  # Check if we need to convert this using DOS-style short mode. If the path
11854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11855  # take no chances and rewrite it.
11856  # Note: m4 eats our [], so we need to use [ and ] instead.
11857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11858  if test "x$has_forbidden_chars" != x; then
11859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11863      # Going to short mode and back again did indeed matter. Since short mode is
11864      # case insensitive, let's make it lowercase to improve readability.
11865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11866      # Now convert it back to Unix-stile (cygpath)
11867      input_path=`$CYGPATH -u "$shortmode_path"`
11868      new_path="$input_path"
11869    fi
11870  fi
11871
11872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11873  if test "x$test_cygdrive_prefix" = x; then
11874    # As a simple fix, exclude /usr/bin since it's not a real path.
11875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11877      # a path prefixed by /cygdrive for fixpath to work.
11878      new_path="$CYGWIN_ROOT_PATH$input_path"
11879    fi
11880  fi
11881
11882
11883  if test "x$path" != "x$new_path"; then
11884    BOOT_JDK="$new_path"
11885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11887  fi
11888
11889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11890
11891  path="$BOOT_JDK"
11892  has_colon=`$ECHO $path | $GREP ^.:`
11893  new_path="$path"
11894  if test "x$has_colon" = x; then
11895    # Not in mixed or Windows style, start by that.
11896    new_path=`cmd //c echo $path`
11897  fi
11898
11899
11900  input_path="$new_path"
11901  # Check if we need to convert this using DOS-style short mode. If the path
11902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11903  # take no chances and rewrite it.
11904  # Note: m4 eats our [], so we need to use [ and ] instead.
11905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11906  if test "x$has_forbidden_chars" != x; then
11907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11909  fi
11910
11911
11912  windows_path="$new_path"
11913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11914    unix_path=`$CYGPATH -u "$windows_path"`
11915    new_path="$unix_path"
11916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11918    new_path="$unix_path"
11919  fi
11920
11921  if test "x$path" != "x$new_path"; then
11922    BOOT_JDK="$new_path"
11923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11925  fi
11926
11927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11929
11930  else
11931    # We're on a posix platform. Hooray! :)
11932    path="$BOOT_JDK"
11933
11934    if test ! -f "$path" && test ! -d "$path"; then
11935      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11936    fi
11937
11938    has_space=`$ECHO "$path" | $GREP " "`
11939    if test "x$has_space" != x; then
11940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11942      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11943    fi
11944  fi
11945
11946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11947$as_echo_n "checking for Boot JDK... " >&6; }
11948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11949$as_echo "$BOOT_JDK" >&6; }
11950              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11951$as_echo_n "checking Boot JDK version... " >&6; }
11952              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11954$as_echo "$BOOT_JDK_VERSION" >&6; }
11955            fi # end check jdk version
11956          fi # end check rt.jar
11957        fi # end check javac
11958      fi # end check java
11959    fi # end check boot jdk found
11960  fi
11961
11962    done
11963  fi
11964
11965  fi
11966
11967
11968    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11969    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11970      # Do we have a bin/java?
11971      if test ! -x "$BOOT_JDK/bin/java"; then
11972        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11974        BOOT_JDK_FOUND=no
11975      else
11976        # Do we have a bin/javac?
11977        if test ! -x "$BOOT_JDK/bin/javac"; then
11978          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11980          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11981$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11982          BOOT_JDK_FOUND=no
11983        else
11984          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11985          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11986            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11988            BOOT_JDK_FOUND=no
11989          else
11990            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11991            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11992
11993            # Extra M4 quote needed to protect [] in grep expression.
11994            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11995            if test "x$FOUND_VERSION_78" = x; then
11996              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11998              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11999$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12000              BOOT_JDK_FOUND=no
12001            else
12002              # We're done! :-)
12003              BOOT_JDK_FOUND=yes
12004
12005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12006
12007  # Input might be given as Windows format, start by converting to
12008  # unix format.
12009  path="$BOOT_JDK"
12010  new_path=`$CYGPATH -u "$path"`
12011
12012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12015  # "foo.exe" is OK but "foo" is an error.
12016  #
12017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12018  # It is also a way to make sure we got the proper file name for the real test later on.
12019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12020  if test "x$test_shortpath" = x; then
12021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12023    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12024  fi
12025
12026  # Call helper function which possibly converts this using DOS-style short mode.
12027  # If so, the updated path is stored in $new_path.
12028
12029  input_path="$new_path"
12030  # Check if we need to convert this using DOS-style short mode. If the path
12031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12032  # take no chances and rewrite it.
12033  # Note: m4 eats our [], so we need to use [ and ] instead.
12034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12035  if test "x$has_forbidden_chars" != x; then
12036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12040      # Going to short mode and back again did indeed matter. Since short mode is
12041      # case insensitive, let's make it lowercase to improve readability.
12042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12043      # Now convert it back to Unix-stile (cygpath)
12044      input_path=`$CYGPATH -u "$shortmode_path"`
12045      new_path="$input_path"
12046    fi
12047  fi
12048
12049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12050  if test "x$test_cygdrive_prefix" = x; then
12051    # As a simple fix, exclude /usr/bin since it's not a real path.
12052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12054      # a path prefixed by /cygdrive for fixpath to work.
12055      new_path="$CYGWIN_ROOT_PATH$input_path"
12056    fi
12057  fi
12058
12059
12060  if test "x$path" != "x$new_path"; then
12061    BOOT_JDK="$new_path"
12062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12064  fi
12065
12066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12067
12068  path="$BOOT_JDK"
12069  has_colon=`$ECHO $path | $GREP ^.:`
12070  new_path="$path"
12071  if test "x$has_colon" = x; then
12072    # Not in mixed or Windows style, start by that.
12073    new_path=`cmd //c echo $path`
12074  fi
12075
12076
12077  input_path="$new_path"
12078  # Check if we need to convert this using DOS-style short mode. If the path
12079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12080  # take no chances and rewrite it.
12081  # Note: m4 eats our [], so we need to use [ and ] instead.
12082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12083  if test "x$has_forbidden_chars" != x; then
12084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12086  fi
12087
12088
12089  windows_path="$new_path"
12090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12091    unix_path=`$CYGPATH -u "$windows_path"`
12092    new_path="$unix_path"
12093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12095    new_path="$unix_path"
12096  fi
12097
12098  if test "x$path" != "x$new_path"; then
12099    BOOT_JDK="$new_path"
12100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12102  fi
12103
12104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12106
12107  else
12108    # We're on a posix platform. Hooray! :)
12109    path="$BOOT_JDK"
12110
12111    if test ! -f "$path" && test ! -d "$path"; then
12112      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12113    fi
12114
12115    has_space=`$ECHO "$path" | $GREP " "`
12116    if test "x$has_space" != x; then
12117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12120    fi
12121  fi
12122
12123              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12124$as_echo_n "checking for Boot JDK... " >&6; }
12125              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12126$as_echo "$BOOT_JDK" >&6; }
12127              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12128$as_echo_n "checking Boot JDK version... " >&6; }
12129              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12131$as_echo "$BOOT_JDK_VERSION" >&6; }
12132            fi # end check jdk version
12133          fi # end check rt.jar
12134        fi # end check javac
12135      fi # end check java
12136    fi # end check boot jdk found
12137  fi
12138
12139
12140  if test "x$BOOT_JDK_FOUND" = xno; then
12141    # Now execute the test
12142
12143  if test "x$PROGRAMW6432" != x; then
12144    VIRTUAL_DIR="$PROGRAMW6432/Java"
12145
12146  windows_path="$VIRTUAL_DIR"
12147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12148    unix_path=`$CYGPATH -u "$windows_path"`
12149    VIRTUAL_DIR="$unix_path"
12150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12152    VIRTUAL_DIR="$unix_path"
12153  fi
12154
12155
12156  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12157  BOOT_JDK_SUFFIX=""
12158  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12159  if test "x$ALL_JDKS_FOUND" != x; then
12160    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12161
12162  if test "x$BOOT_JDK_FOUND" = xno; then
12163    # Now execute the test
12164
12165        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12166        if test -d "$BOOT_JDK"; then
12167          BOOT_JDK_FOUND=maybe
12168          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12169$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12170        fi
12171
12172
12173    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12174    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12175      # Do we have a bin/java?
12176      if test ! -x "$BOOT_JDK/bin/java"; then
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12179        BOOT_JDK_FOUND=no
12180      else
12181        # Do we have a bin/javac?
12182        if test ! -x "$BOOT_JDK/bin/javac"; then
12183          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12185          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12186$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12187          BOOT_JDK_FOUND=no
12188        else
12189          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12190          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12193            BOOT_JDK_FOUND=no
12194          else
12195            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12196            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12197
12198            # Extra M4 quote needed to protect [] in grep expression.
12199            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12200            if test "x$FOUND_VERSION_78" = x; then
12201              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12203              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12204$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12205              BOOT_JDK_FOUND=no
12206            else
12207              # We're done! :-)
12208              BOOT_JDK_FOUND=yes
12209
12210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12211
12212  # Input might be given as Windows format, start by converting to
12213  # unix format.
12214  path="$BOOT_JDK"
12215  new_path=`$CYGPATH -u "$path"`
12216
12217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12220  # "foo.exe" is OK but "foo" is an error.
12221  #
12222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12223  # It is also a way to make sure we got the proper file name for the real test later on.
12224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12225  if test "x$test_shortpath" = x; then
12226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12229  fi
12230
12231  # Call helper function which possibly converts this using DOS-style short mode.
12232  # If so, the updated path is stored in $new_path.
12233
12234  input_path="$new_path"
12235  # Check if we need to convert this using DOS-style short mode. If the path
12236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12237  # take no chances and rewrite it.
12238  # Note: m4 eats our [], so we need to use [ and ] instead.
12239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12240  if test "x$has_forbidden_chars" != x; then
12241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12245      # Going to short mode and back again did indeed matter. Since short mode is
12246      # case insensitive, let's make it lowercase to improve readability.
12247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12248      # Now convert it back to Unix-stile (cygpath)
12249      input_path=`$CYGPATH -u "$shortmode_path"`
12250      new_path="$input_path"
12251    fi
12252  fi
12253
12254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12255  if test "x$test_cygdrive_prefix" = x; then
12256    # As a simple fix, exclude /usr/bin since it's not a real path.
12257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12259      # a path prefixed by /cygdrive for fixpath to work.
12260      new_path="$CYGWIN_ROOT_PATH$input_path"
12261    fi
12262  fi
12263
12264
12265  if test "x$path" != "x$new_path"; then
12266    BOOT_JDK="$new_path"
12267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12269  fi
12270
12271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12272
12273  path="$BOOT_JDK"
12274  has_colon=`$ECHO $path | $GREP ^.:`
12275  new_path="$path"
12276  if test "x$has_colon" = x; then
12277    # Not in mixed or Windows style, start by that.
12278    new_path=`cmd //c echo $path`
12279  fi
12280
12281
12282  input_path="$new_path"
12283  # Check if we need to convert this using DOS-style short mode. If the path
12284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12285  # take no chances and rewrite it.
12286  # Note: m4 eats our [], so we need to use [ and ] instead.
12287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12288  if test "x$has_forbidden_chars" != x; then
12289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12291  fi
12292
12293
12294  windows_path="$new_path"
12295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12296    unix_path=`$CYGPATH -u "$windows_path"`
12297    new_path="$unix_path"
12298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12300    new_path="$unix_path"
12301  fi
12302
12303  if test "x$path" != "x$new_path"; then
12304    BOOT_JDK="$new_path"
12305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12307  fi
12308
12309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12311
12312  else
12313    # We're on a posix platform. Hooray! :)
12314    path="$BOOT_JDK"
12315
12316    if test ! -f "$path" && test ! -d "$path"; then
12317      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12318    fi
12319
12320    has_space=`$ECHO "$path" | $GREP " "`
12321    if test "x$has_space" != x; then
12322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12324      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12325    fi
12326  fi
12327
12328              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12329$as_echo_n "checking for Boot JDK... " >&6; }
12330              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12331$as_echo "$BOOT_JDK" >&6; }
12332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12333$as_echo_n "checking Boot JDK version... " >&6; }
12334              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12336$as_echo "$BOOT_JDK_VERSION" >&6; }
12337            fi # end check jdk version
12338          fi # end check rt.jar
12339        fi # end check javac
12340      fi # end check java
12341    fi # end check boot jdk found
12342  fi
12343
12344    done
12345  fi
12346
12347  fi
12348
12349
12350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12352      # Do we have a bin/java?
12353      if test ! -x "$BOOT_JDK/bin/java"; then
12354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12356        BOOT_JDK_FOUND=no
12357      else
12358        # Do we have a bin/javac?
12359        if test ! -x "$BOOT_JDK/bin/javac"; then
12360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12364          BOOT_JDK_FOUND=no
12365        else
12366          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12367          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12368            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12370            BOOT_JDK_FOUND=no
12371          else
12372            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12373            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12374
12375            # Extra M4 quote needed to protect [] in grep expression.
12376            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12377            if test "x$FOUND_VERSION_78" = x; then
12378              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12380              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12381$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12382              BOOT_JDK_FOUND=no
12383            else
12384              # We're done! :-)
12385              BOOT_JDK_FOUND=yes
12386
12387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12388
12389  # Input might be given as Windows format, start by converting to
12390  # unix format.
12391  path="$BOOT_JDK"
12392  new_path=`$CYGPATH -u "$path"`
12393
12394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12397  # "foo.exe" is OK but "foo" is an error.
12398  #
12399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12400  # It is also a way to make sure we got the proper file name for the real test later on.
12401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12402  if test "x$test_shortpath" = x; then
12403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12405    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12406  fi
12407
12408  # Call helper function which possibly converts this using DOS-style short mode.
12409  # If so, the updated path is stored in $new_path.
12410
12411  input_path="$new_path"
12412  # Check if we need to convert this using DOS-style short mode. If the path
12413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12414  # take no chances and rewrite it.
12415  # Note: m4 eats our [], so we need to use [ and ] instead.
12416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12417  if test "x$has_forbidden_chars" != x; then
12418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12422      # Going to short mode and back again did indeed matter. Since short mode is
12423      # case insensitive, let's make it lowercase to improve readability.
12424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12425      # Now convert it back to Unix-stile (cygpath)
12426      input_path=`$CYGPATH -u "$shortmode_path"`
12427      new_path="$input_path"
12428    fi
12429  fi
12430
12431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12432  if test "x$test_cygdrive_prefix" = x; then
12433    # As a simple fix, exclude /usr/bin since it's not a real path.
12434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12436      # a path prefixed by /cygdrive for fixpath to work.
12437      new_path="$CYGWIN_ROOT_PATH$input_path"
12438    fi
12439  fi
12440
12441
12442  if test "x$path" != "x$new_path"; then
12443    BOOT_JDK="$new_path"
12444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12446  fi
12447
12448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12449
12450  path="$BOOT_JDK"
12451  has_colon=`$ECHO $path | $GREP ^.:`
12452  new_path="$path"
12453  if test "x$has_colon" = x; then
12454    # Not in mixed or Windows style, start by that.
12455    new_path=`cmd //c echo $path`
12456  fi
12457
12458
12459  input_path="$new_path"
12460  # Check if we need to convert this using DOS-style short mode. If the path
12461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12462  # take no chances and rewrite it.
12463  # Note: m4 eats our [], so we need to use [ and ] instead.
12464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12465  if test "x$has_forbidden_chars" != x; then
12466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12468  fi
12469
12470
12471  windows_path="$new_path"
12472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12473    unix_path=`$CYGPATH -u "$windows_path"`
12474    new_path="$unix_path"
12475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12477    new_path="$unix_path"
12478  fi
12479
12480  if test "x$path" != "x$new_path"; then
12481    BOOT_JDK="$new_path"
12482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12484  fi
12485
12486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12488
12489  else
12490    # We're on a posix platform. Hooray! :)
12491    path="$BOOT_JDK"
12492
12493    if test ! -f "$path" && test ! -d "$path"; then
12494      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12495    fi
12496
12497    has_space=`$ECHO "$path" | $GREP " "`
12498    if test "x$has_space" != x; then
12499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12501      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12502    fi
12503  fi
12504
12505              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12506$as_echo_n "checking for Boot JDK... " >&6; }
12507              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12508$as_echo "$BOOT_JDK" >&6; }
12509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12510$as_echo_n "checking Boot JDK version... " >&6; }
12511              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12512              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12513$as_echo "$BOOT_JDK_VERSION" >&6; }
12514            fi # end check jdk version
12515          fi # end check rt.jar
12516        fi # end check javac
12517      fi # end check java
12518    fi # end check boot jdk found
12519  fi
12520
12521
12522  if test "x$BOOT_JDK_FOUND" = xno; then
12523    # Now execute the test
12524
12525  if test "x$PROGRAMFILES" != x; then
12526    VIRTUAL_DIR="$PROGRAMFILES/Java"
12527
12528  windows_path="$VIRTUAL_DIR"
12529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12530    unix_path=`$CYGPATH -u "$windows_path"`
12531    VIRTUAL_DIR="$unix_path"
12532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12534    VIRTUAL_DIR="$unix_path"
12535  fi
12536
12537
12538  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12539  BOOT_JDK_SUFFIX=""
12540  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12541  if test "x$ALL_JDKS_FOUND" != x; then
12542    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12543
12544  if test "x$BOOT_JDK_FOUND" = xno; then
12545    # Now execute the test
12546
12547        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12548        if test -d "$BOOT_JDK"; then
12549          BOOT_JDK_FOUND=maybe
12550          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12551$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12552        fi
12553
12554
12555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12557      # Do we have a bin/java?
12558      if test ! -x "$BOOT_JDK/bin/java"; then
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12561        BOOT_JDK_FOUND=no
12562      else
12563        # Do we have a bin/javac?
12564        if test ! -x "$BOOT_JDK/bin/javac"; then
12565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12569          BOOT_JDK_FOUND=no
12570        else
12571          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12572          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12575            BOOT_JDK_FOUND=no
12576          else
12577            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12579
12580            # Extra M4 quote needed to protect [] in grep expression.
12581            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12582            if test "x$FOUND_VERSION_78" = x; then
12583              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12585              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12586$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12587              BOOT_JDK_FOUND=no
12588            else
12589              # We're done! :-)
12590              BOOT_JDK_FOUND=yes
12591
12592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12593
12594  # Input might be given as Windows format, start by converting to
12595  # unix format.
12596  path="$BOOT_JDK"
12597  new_path=`$CYGPATH -u "$path"`
12598
12599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12602  # "foo.exe" is OK but "foo" is an error.
12603  #
12604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12605  # It is also a way to make sure we got the proper file name for the real test later on.
12606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12607  if test "x$test_shortpath" = x; then
12608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12611  fi
12612
12613  # Call helper function which possibly converts this using DOS-style short mode.
12614  # If so, the updated path is stored in $new_path.
12615
12616  input_path="$new_path"
12617  # Check if we need to convert this using DOS-style short mode. If the path
12618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12619  # take no chances and rewrite it.
12620  # Note: m4 eats our [], so we need to use [ and ] instead.
12621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12622  if test "x$has_forbidden_chars" != x; then
12623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12627      # Going to short mode and back again did indeed matter. Since short mode is
12628      # case insensitive, let's make it lowercase to improve readability.
12629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12630      # Now convert it back to Unix-stile (cygpath)
12631      input_path=`$CYGPATH -u "$shortmode_path"`
12632      new_path="$input_path"
12633    fi
12634  fi
12635
12636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12637  if test "x$test_cygdrive_prefix" = x; then
12638    # As a simple fix, exclude /usr/bin since it's not a real path.
12639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12641      # a path prefixed by /cygdrive for fixpath to work.
12642      new_path="$CYGWIN_ROOT_PATH$input_path"
12643    fi
12644  fi
12645
12646
12647  if test "x$path" != "x$new_path"; then
12648    BOOT_JDK="$new_path"
12649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12651  fi
12652
12653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12654
12655  path="$BOOT_JDK"
12656  has_colon=`$ECHO $path | $GREP ^.:`
12657  new_path="$path"
12658  if test "x$has_colon" = x; then
12659    # Not in mixed or Windows style, start by that.
12660    new_path=`cmd //c echo $path`
12661  fi
12662
12663
12664  input_path="$new_path"
12665  # Check if we need to convert this using DOS-style short mode. If the path
12666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12667  # take no chances and rewrite it.
12668  # Note: m4 eats our [], so we need to use [ and ] instead.
12669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12670  if test "x$has_forbidden_chars" != x; then
12671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12673  fi
12674
12675
12676  windows_path="$new_path"
12677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12678    unix_path=`$CYGPATH -u "$windows_path"`
12679    new_path="$unix_path"
12680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12682    new_path="$unix_path"
12683  fi
12684
12685  if test "x$path" != "x$new_path"; then
12686    BOOT_JDK="$new_path"
12687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12689  fi
12690
12691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12693
12694  else
12695    # We're on a posix platform. Hooray! :)
12696    path="$BOOT_JDK"
12697
12698    if test ! -f "$path" && test ! -d "$path"; then
12699      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12700    fi
12701
12702    has_space=`$ECHO "$path" | $GREP " "`
12703    if test "x$has_space" != x; then
12704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12706      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12707    fi
12708  fi
12709
12710              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12711$as_echo_n "checking for Boot JDK... " >&6; }
12712              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12713$as_echo "$BOOT_JDK" >&6; }
12714              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12715$as_echo_n "checking Boot JDK version... " >&6; }
12716              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12717              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12718$as_echo "$BOOT_JDK_VERSION" >&6; }
12719            fi # end check jdk version
12720          fi # end check rt.jar
12721        fi # end check javac
12722      fi # end check java
12723    fi # end check boot jdk found
12724  fi
12725
12726    done
12727  fi
12728
12729  fi
12730
12731
12732    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12733    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12734      # Do we have a bin/java?
12735      if test ! -x "$BOOT_JDK/bin/java"; then
12736        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12738        BOOT_JDK_FOUND=no
12739      else
12740        # Do we have a bin/javac?
12741        if test ! -x "$BOOT_JDK/bin/javac"; then
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12744          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12745$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12746          BOOT_JDK_FOUND=no
12747        else
12748          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12749          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12750            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12752            BOOT_JDK_FOUND=no
12753          else
12754            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12755            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12756
12757            # Extra M4 quote needed to protect [] in grep expression.
12758            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12759            if test "x$FOUND_VERSION_78" = x; then
12760              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12762              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12763$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12764              BOOT_JDK_FOUND=no
12765            else
12766              # We're done! :-)
12767              BOOT_JDK_FOUND=yes
12768
12769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12770
12771  # Input might be given as Windows format, start by converting to
12772  # unix format.
12773  path="$BOOT_JDK"
12774  new_path=`$CYGPATH -u "$path"`
12775
12776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12779  # "foo.exe" is OK but "foo" is an error.
12780  #
12781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12782  # It is also a way to make sure we got the proper file name for the real test later on.
12783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12784  if test "x$test_shortpath" = x; then
12785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12787    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12788  fi
12789
12790  # Call helper function which possibly converts this using DOS-style short mode.
12791  # If so, the updated path is stored in $new_path.
12792
12793  input_path="$new_path"
12794  # Check if we need to convert this using DOS-style short mode. If the path
12795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12796  # take no chances and rewrite it.
12797  # Note: m4 eats our [], so we need to use [ and ] instead.
12798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12799  if test "x$has_forbidden_chars" != x; then
12800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12804      # Going to short mode and back again did indeed matter. Since short mode is
12805      # case insensitive, let's make it lowercase to improve readability.
12806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12807      # Now convert it back to Unix-stile (cygpath)
12808      input_path=`$CYGPATH -u "$shortmode_path"`
12809      new_path="$input_path"
12810    fi
12811  fi
12812
12813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12814  if test "x$test_cygdrive_prefix" = x; then
12815    # As a simple fix, exclude /usr/bin since it's not a real path.
12816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12818      # a path prefixed by /cygdrive for fixpath to work.
12819      new_path="$CYGWIN_ROOT_PATH$input_path"
12820    fi
12821  fi
12822
12823
12824  if test "x$path" != "x$new_path"; then
12825    BOOT_JDK="$new_path"
12826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12828  fi
12829
12830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12831
12832  path="$BOOT_JDK"
12833  has_colon=`$ECHO $path | $GREP ^.:`
12834  new_path="$path"
12835  if test "x$has_colon" = x; then
12836    # Not in mixed or Windows style, start by that.
12837    new_path=`cmd //c echo $path`
12838  fi
12839
12840
12841  input_path="$new_path"
12842  # Check if we need to convert this using DOS-style short mode. If the path
12843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12844  # take no chances and rewrite it.
12845  # Note: m4 eats our [], so we need to use [ and ] instead.
12846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12847  if test "x$has_forbidden_chars" != x; then
12848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12850  fi
12851
12852
12853  windows_path="$new_path"
12854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12855    unix_path=`$CYGPATH -u "$windows_path"`
12856    new_path="$unix_path"
12857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12859    new_path="$unix_path"
12860  fi
12861
12862  if test "x$path" != "x$new_path"; then
12863    BOOT_JDK="$new_path"
12864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12866  fi
12867
12868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12870
12871  else
12872    # We're on a posix platform. Hooray! :)
12873    path="$BOOT_JDK"
12874
12875    if test ! -f "$path" && test ! -d "$path"; then
12876      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12877    fi
12878
12879    has_space=`$ECHO "$path" | $GREP " "`
12880    if test "x$has_space" != x; then
12881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12883      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12884    fi
12885  fi
12886
12887              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12888$as_echo_n "checking for Boot JDK... " >&6; }
12889              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12890$as_echo "$BOOT_JDK" >&6; }
12891              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12892$as_echo_n "checking Boot JDK version... " >&6; }
12893              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12894              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12895$as_echo "$BOOT_JDK_VERSION" >&6; }
12896            fi # end check jdk version
12897          fi # end check rt.jar
12898        fi # end check javac
12899      fi # end check java
12900    fi # end check boot jdk found
12901  fi
12902
12903
12904  if test "x$BOOT_JDK_FOUND" = xno; then
12905    # Now execute the test
12906
12907  if test "x$ProgramFiles" != x; then
12908    VIRTUAL_DIR="$ProgramFiles/Java"
12909
12910  windows_path="$VIRTUAL_DIR"
12911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12912    unix_path=`$CYGPATH -u "$windows_path"`
12913    VIRTUAL_DIR="$unix_path"
12914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12916    VIRTUAL_DIR="$unix_path"
12917  fi
12918
12919
12920  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12921  BOOT_JDK_SUFFIX=""
12922  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12923  if test "x$ALL_JDKS_FOUND" != x; then
12924    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12925
12926  if test "x$BOOT_JDK_FOUND" = xno; then
12927    # Now execute the test
12928
12929        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12930        if test -d "$BOOT_JDK"; then
12931          BOOT_JDK_FOUND=maybe
12932          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12933$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12934        fi
12935
12936
12937    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12938    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12939      # Do we have a bin/java?
12940      if test ! -x "$BOOT_JDK/bin/java"; then
12941        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12943        BOOT_JDK_FOUND=no
12944      else
12945        # Do we have a bin/javac?
12946        if test ! -x "$BOOT_JDK/bin/javac"; then
12947          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12949          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12950$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12951          BOOT_JDK_FOUND=no
12952        else
12953          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12954          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12955            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12957            BOOT_JDK_FOUND=no
12958          else
12959            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12960            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12961
12962            # Extra M4 quote needed to protect [] in grep expression.
12963            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12964            if test "x$FOUND_VERSION_78" = x; then
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12968$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12969              BOOT_JDK_FOUND=no
12970            else
12971              # We're done! :-)
12972              BOOT_JDK_FOUND=yes
12973
12974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12975
12976  # Input might be given as Windows format, start by converting to
12977  # unix format.
12978  path="$BOOT_JDK"
12979  new_path=`$CYGPATH -u "$path"`
12980
12981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12984  # "foo.exe" is OK but "foo" is an error.
12985  #
12986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12987  # It is also a way to make sure we got the proper file name for the real test later on.
12988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12989  if test "x$test_shortpath" = x; then
12990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12992    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12993  fi
12994
12995  # Call helper function which possibly converts this using DOS-style short mode.
12996  # If so, the updated path is stored in $new_path.
12997
12998  input_path="$new_path"
12999  # Check if we need to convert this using DOS-style short mode. If the path
13000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13001  # take no chances and rewrite it.
13002  # Note: m4 eats our [], so we need to use [ and ] instead.
13003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13004  if test "x$has_forbidden_chars" != x; then
13005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13009      # Going to short mode and back again did indeed matter. Since short mode is
13010      # case insensitive, let's make it lowercase to improve readability.
13011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13012      # Now convert it back to Unix-stile (cygpath)
13013      input_path=`$CYGPATH -u "$shortmode_path"`
13014      new_path="$input_path"
13015    fi
13016  fi
13017
13018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13019  if test "x$test_cygdrive_prefix" = x; then
13020    # As a simple fix, exclude /usr/bin since it's not a real path.
13021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13023      # a path prefixed by /cygdrive for fixpath to work.
13024      new_path="$CYGWIN_ROOT_PATH$input_path"
13025    fi
13026  fi
13027
13028
13029  if test "x$path" != "x$new_path"; then
13030    BOOT_JDK="$new_path"
13031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13033  fi
13034
13035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13036
13037  path="$BOOT_JDK"
13038  has_colon=`$ECHO $path | $GREP ^.:`
13039  new_path="$path"
13040  if test "x$has_colon" = x; then
13041    # Not in mixed or Windows style, start by that.
13042    new_path=`cmd //c echo $path`
13043  fi
13044
13045
13046  input_path="$new_path"
13047  # Check if we need to convert this using DOS-style short mode. If the path
13048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13049  # take no chances and rewrite it.
13050  # Note: m4 eats our [], so we need to use [ and ] instead.
13051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13052  if test "x$has_forbidden_chars" != x; then
13053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13055  fi
13056
13057
13058  windows_path="$new_path"
13059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13060    unix_path=`$CYGPATH -u "$windows_path"`
13061    new_path="$unix_path"
13062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13064    new_path="$unix_path"
13065  fi
13066
13067  if test "x$path" != "x$new_path"; then
13068    BOOT_JDK="$new_path"
13069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13071  fi
13072
13073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13075
13076  else
13077    # We're on a posix platform. Hooray! :)
13078    path="$BOOT_JDK"
13079
13080    if test ! -f "$path" && test ! -d "$path"; then
13081      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13082    fi
13083
13084    has_space=`$ECHO "$path" | $GREP " "`
13085    if test "x$has_space" != x; then
13086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13088      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13089    fi
13090  fi
13091
13092              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13093$as_echo_n "checking for Boot JDK... " >&6; }
13094              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13095$as_echo "$BOOT_JDK" >&6; }
13096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13097$as_echo_n "checking Boot JDK version... " >&6; }
13098              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13099              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13100$as_echo "$BOOT_JDK_VERSION" >&6; }
13101            fi # end check jdk version
13102          fi # end check rt.jar
13103        fi # end check javac
13104      fi # end check java
13105    fi # end check boot jdk found
13106  fi
13107
13108    done
13109  fi
13110
13111  fi
13112
13113
13114    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13115    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13116      # Do we have a bin/java?
13117      if test ! -x "$BOOT_JDK/bin/java"; then
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13120        BOOT_JDK_FOUND=no
13121      else
13122        # Do we have a bin/javac?
13123        if test ! -x "$BOOT_JDK/bin/javac"; then
13124          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13126          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13127$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13128          BOOT_JDK_FOUND=no
13129        else
13130          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13131          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13132            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13134            BOOT_JDK_FOUND=no
13135          else
13136            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13137            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13138
13139            # Extra M4 quote needed to protect [] in grep expression.
13140            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13141            if test "x$FOUND_VERSION_78" = x; then
13142              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13144              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13145$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13146              BOOT_JDK_FOUND=no
13147            else
13148              # We're done! :-)
13149              BOOT_JDK_FOUND=yes
13150
13151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13152
13153  # Input might be given as Windows format, start by converting to
13154  # unix format.
13155  path="$BOOT_JDK"
13156  new_path=`$CYGPATH -u "$path"`
13157
13158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13161  # "foo.exe" is OK but "foo" is an error.
13162  #
13163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13164  # It is also a way to make sure we got the proper file name for the real test later on.
13165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13166  if test "x$test_shortpath" = x; then
13167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13169    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13170  fi
13171
13172  # Call helper function which possibly converts this using DOS-style short mode.
13173  # If so, the updated path is stored in $new_path.
13174
13175  input_path="$new_path"
13176  # Check if we need to convert this using DOS-style short mode. If the path
13177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13178  # take no chances and rewrite it.
13179  # Note: m4 eats our [], so we need to use [ and ] instead.
13180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13181  if test "x$has_forbidden_chars" != x; then
13182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13186      # Going to short mode and back again did indeed matter. Since short mode is
13187      # case insensitive, let's make it lowercase to improve readability.
13188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13189      # Now convert it back to Unix-stile (cygpath)
13190      input_path=`$CYGPATH -u "$shortmode_path"`
13191      new_path="$input_path"
13192    fi
13193  fi
13194
13195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13196  if test "x$test_cygdrive_prefix" = x; then
13197    # As a simple fix, exclude /usr/bin since it's not a real path.
13198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13200      # a path prefixed by /cygdrive for fixpath to work.
13201      new_path="$CYGWIN_ROOT_PATH$input_path"
13202    fi
13203  fi
13204
13205
13206  if test "x$path" != "x$new_path"; then
13207    BOOT_JDK="$new_path"
13208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13210  fi
13211
13212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13213
13214  path="$BOOT_JDK"
13215  has_colon=`$ECHO $path | $GREP ^.:`
13216  new_path="$path"
13217  if test "x$has_colon" = x; then
13218    # Not in mixed or Windows style, start by that.
13219    new_path=`cmd //c echo $path`
13220  fi
13221
13222
13223  input_path="$new_path"
13224  # Check if we need to convert this using DOS-style short mode. If the path
13225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13226  # take no chances and rewrite it.
13227  # Note: m4 eats our [], so we need to use [ and ] instead.
13228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13229  if test "x$has_forbidden_chars" != x; then
13230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13232  fi
13233
13234
13235  windows_path="$new_path"
13236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13237    unix_path=`$CYGPATH -u "$windows_path"`
13238    new_path="$unix_path"
13239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13241    new_path="$unix_path"
13242  fi
13243
13244  if test "x$path" != "x$new_path"; then
13245    BOOT_JDK="$new_path"
13246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13248  fi
13249
13250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13252
13253  else
13254    # We're on a posix platform. Hooray! :)
13255    path="$BOOT_JDK"
13256
13257    if test ! -f "$path" && test ! -d "$path"; then
13258      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13259    fi
13260
13261    has_space=`$ECHO "$path" | $GREP " "`
13262    if test "x$has_space" != x; then
13263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13265      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13266    fi
13267  fi
13268
13269              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13270$as_echo_n "checking for Boot JDK... " >&6; }
13271              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13272$as_echo "$BOOT_JDK" >&6; }
13273              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13274$as_echo_n "checking Boot JDK version... " >&6; }
13275              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13276              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13277$as_echo "$BOOT_JDK_VERSION" >&6; }
13278            fi # end check jdk version
13279          fi # end check rt.jar
13280        fi # end check javac
13281      fi # end check java
13282    fi # end check boot jdk found
13283  fi
13284
13285
13286  if test "x$BOOT_JDK_FOUND" = xno; then
13287    # Now execute the test
13288
13289  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13290  BOOT_JDK_SUFFIX=""
13291  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13292  if test "x$ALL_JDKS_FOUND" != x; then
13293    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13294
13295  if test "x$BOOT_JDK_FOUND" = xno; then
13296    # Now execute the test
13297
13298        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13299        if test -d "$BOOT_JDK"; then
13300          BOOT_JDK_FOUND=maybe
13301          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13302$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13303        fi
13304
13305
13306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13308      # Do we have a bin/java?
13309      if test ! -x "$BOOT_JDK/bin/java"; then
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13312        BOOT_JDK_FOUND=no
13313      else
13314        # Do we have a bin/javac?
13315        if test ! -x "$BOOT_JDK/bin/javac"; then
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13320          BOOT_JDK_FOUND=no
13321        else
13322          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13323          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13326            BOOT_JDK_FOUND=no
13327          else
13328            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13330
13331            # Extra M4 quote needed to protect [] in grep expression.
13332            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13333            if test "x$FOUND_VERSION_78" = x; then
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13336              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13337$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13338              BOOT_JDK_FOUND=no
13339            else
13340              # We're done! :-)
13341              BOOT_JDK_FOUND=yes
13342
13343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13344
13345  # Input might be given as Windows format, start by converting to
13346  # unix format.
13347  path="$BOOT_JDK"
13348  new_path=`$CYGPATH -u "$path"`
13349
13350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13353  # "foo.exe" is OK but "foo" is an error.
13354  #
13355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13356  # It is also a way to make sure we got the proper file name for the real test later on.
13357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13358  if test "x$test_shortpath" = x; then
13359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13362  fi
13363
13364  # Call helper function which possibly converts this using DOS-style short mode.
13365  # If so, the updated path is stored in $new_path.
13366
13367  input_path="$new_path"
13368  # Check if we need to convert this using DOS-style short mode. If the path
13369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13370  # take no chances and rewrite it.
13371  # Note: m4 eats our [], so we need to use [ and ] instead.
13372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13373  if test "x$has_forbidden_chars" != x; then
13374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13378      # Going to short mode and back again did indeed matter. Since short mode is
13379      # case insensitive, let's make it lowercase to improve readability.
13380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13381      # Now convert it back to Unix-stile (cygpath)
13382      input_path=`$CYGPATH -u "$shortmode_path"`
13383      new_path="$input_path"
13384    fi
13385  fi
13386
13387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13388  if test "x$test_cygdrive_prefix" = x; then
13389    # As a simple fix, exclude /usr/bin since it's not a real path.
13390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13392      # a path prefixed by /cygdrive for fixpath to work.
13393      new_path="$CYGWIN_ROOT_PATH$input_path"
13394    fi
13395  fi
13396
13397
13398  if test "x$path" != "x$new_path"; then
13399    BOOT_JDK="$new_path"
13400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13402  fi
13403
13404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13405
13406  path="$BOOT_JDK"
13407  has_colon=`$ECHO $path | $GREP ^.:`
13408  new_path="$path"
13409  if test "x$has_colon" = x; then
13410    # Not in mixed or Windows style, start by that.
13411    new_path=`cmd //c echo $path`
13412  fi
13413
13414
13415  input_path="$new_path"
13416  # Check if we need to convert this using DOS-style short mode. If the path
13417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13418  # take no chances and rewrite it.
13419  # Note: m4 eats our [], so we need to use [ and ] instead.
13420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13421  if test "x$has_forbidden_chars" != x; then
13422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13424  fi
13425
13426
13427  windows_path="$new_path"
13428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13429    unix_path=`$CYGPATH -u "$windows_path"`
13430    new_path="$unix_path"
13431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13433    new_path="$unix_path"
13434  fi
13435
13436  if test "x$path" != "x$new_path"; then
13437    BOOT_JDK="$new_path"
13438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13440  fi
13441
13442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13444
13445  else
13446    # We're on a posix platform. Hooray! :)
13447    path="$BOOT_JDK"
13448
13449    if test ! -f "$path" && test ! -d "$path"; then
13450      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13451    fi
13452
13453    has_space=`$ECHO "$path" | $GREP " "`
13454    if test "x$has_space" != x; then
13455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13458    fi
13459  fi
13460
13461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13462$as_echo_n "checking for Boot JDK... " >&6; }
13463              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13464$as_echo "$BOOT_JDK" >&6; }
13465              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13466$as_echo_n "checking Boot JDK version... " >&6; }
13467              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13468              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13469$as_echo "$BOOT_JDK_VERSION" >&6; }
13470            fi # end check jdk version
13471          fi # end check rt.jar
13472        fi # end check javac
13473      fi # end check java
13474    fi # end check boot jdk found
13475  fi
13476
13477    done
13478  fi
13479
13480
13481    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13482    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13483      # Do we have a bin/java?
13484      if test ! -x "$BOOT_JDK/bin/java"; then
13485        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13487        BOOT_JDK_FOUND=no
13488      else
13489        # Do we have a bin/javac?
13490        if test ! -x "$BOOT_JDK/bin/javac"; then
13491          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13493          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13494$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13495          BOOT_JDK_FOUND=no
13496        else
13497          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13498          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13499            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13501            BOOT_JDK_FOUND=no
13502          else
13503            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13505
13506            # Extra M4 quote needed to protect [] in grep expression.
13507            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13508            if test "x$FOUND_VERSION_78" = x; then
13509              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13511              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13512$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13513              BOOT_JDK_FOUND=no
13514            else
13515              # We're done! :-)
13516              BOOT_JDK_FOUND=yes
13517
13518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13519
13520  # Input might be given as Windows format, start by converting to
13521  # unix format.
13522  path="$BOOT_JDK"
13523  new_path=`$CYGPATH -u "$path"`
13524
13525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13528  # "foo.exe" is OK but "foo" is an error.
13529  #
13530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13531  # It is also a way to make sure we got the proper file name for the real test later on.
13532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13533  if test "x$test_shortpath" = x; then
13534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13536    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13537  fi
13538
13539  # Call helper function which possibly converts this using DOS-style short mode.
13540  # If so, the updated path is stored in $new_path.
13541
13542  input_path="$new_path"
13543  # Check if we need to convert this using DOS-style short mode. If the path
13544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13545  # take no chances and rewrite it.
13546  # Note: m4 eats our [], so we need to use [ and ] instead.
13547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13548  if test "x$has_forbidden_chars" != x; then
13549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13553      # Going to short mode and back again did indeed matter. Since short mode is
13554      # case insensitive, let's make it lowercase to improve readability.
13555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13556      # Now convert it back to Unix-stile (cygpath)
13557      input_path=`$CYGPATH -u "$shortmode_path"`
13558      new_path="$input_path"
13559    fi
13560  fi
13561
13562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13563  if test "x$test_cygdrive_prefix" = x; then
13564    # As a simple fix, exclude /usr/bin since it's not a real path.
13565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13567      # a path prefixed by /cygdrive for fixpath to work.
13568      new_path="$CYGWIN_ROOT_PATH$input_path"
13569    fi
13570  fi
13571
13572
13573  if test "x$path" != "x$new_path"; then
13574    BOOT_JDK="$new_path"
13575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13577  fi
13578
13579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13580
13581  path="$BOOT_JDK"
13582  has_colon=`$ECHO $path | $GREP ^.:`
13583  new_path="$path"
13584  if test "x$has_colon" = x; then
13585    # Not in mixed or Windows style, start by that.
13586    new_path=`cmd //c echo $path`
13587  fi
13588
13589
13590  input_path="$new_path"
13591  # Check if we need to convert this using DOS-style short mode. If the path
13592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13593  # take no chances and rewrite it.
13594  # Note: m4 eats our [], so we need to use [ and ] instead.
13595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13596  if test "x$has_forbidden_chars" != x; then
13597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13599  fi
13600
13601
13602  windows_path="$new_path"
13603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13604    unix_path=`$CYGPATH -u "$windows_path"`
13605    new_path="$unix_path"
13606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13608    new_path="$unix_path"
13609  fi
13610
13611  if test "x$path" != "x$new_path"; then
13612    BOOT_JDK="$new_path"
13613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13615  fi
13616
13617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13619
13620  else
13621    # We're on a posix platform. Hooray! :)
13622    path="$BOOT_JDK"
13623
13624    if test ! -f "$path" && test ! -d "$path"; then
13625      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13626    fi
13627
13628    has_space=`$ECHO "$path" | $GREP " "`
13629    if test "x$has_space" != x; then
13630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13632      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13633    fi
13634  fi
13635
13636              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13637$as_echo_n "checking for Boot JDK... " >&6; }
13638              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13639$as_echo "$BOOT_JDK" >&6; }
13640              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13641$as_echo_n "checking Boot JDK version... " >&6; }
13642              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13643              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13644$as_echo "$BOOT_JDK_VERSION" >&6; }
13645            fi # end check jdk version
13646          fi # end check rt.jar
13647        fi # end check javac
13648      fi # end check java
13649    fi # end check boot jdk found
13650  fi
13651
13652  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13653
13654  if test "x$BOOT_JDK_FOUND" = xno; then
13655    # Now execute the test
13656
13657  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13658  BOOT_JDK_SUFFIX="/Contents/Home"
13659  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13660  if test "x$ALL_JDKS_FOUND" != x; then
13661    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13662
13663  if test "x$BOOT_JDK_FOUND" = xno; then
13664    # Now execute the test
13665
13666        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13667        if test -d "$BOOT_JDK"; then
13668          BOOT_JDK_FOUND=maybe
13669          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13670$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13671        fi
13672
13673
13674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13676      # Do we have a bin/java?
13677      if test ! -x "$BOOT_JDK/bin/java"; then
13678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13680        BOOT_JDK_FOUND=no
13681      else
13682        # Do we have a bin/javac?
13683        if test ! -x "$BOOT_JDK/bin/javac"; then
13684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13688          BOOT_JDK_FOUND=no
13689        else
13690          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13691          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13694            BOOT_JDK_FOUND=no
13695          else
13696            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13697            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13698
13699            # Extra M4 quote needed to protect [] in grep expression.
13700            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13701            if test "x$FOUND_VERSION_78" = x; then
13702              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13704              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13705$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13706              BOOT_JDK_FOUND=no
13707            else
13708              # We're done! :-)
13709              BOOT_JDK_FOUND=yes
13710
13711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13712
13713  # Input might be given as Windows format, start by converting to
13714  # unix format.
13715  path="$BOOT_JDK"
13716  new_path=`$CYGPATH -u "$path"`
13717
13718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13721  # "foo.exe" is OK but "foo" is an error.
13722  #
13723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13724  # It is also a way to make sure we got the proper file name for the real test later on.
13725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13726  if test "x$test_shortpath" = x; then
13727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13730  fi
13731
13732  # Call helper function which possibly converts this using DOS-style short mode.
13733  # If so, the updated path is stored in $new_path.
13734
13735  input_path="$new_path"
13736  # Check if we need to convert this using DOS-style short mode. If the path
13737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13738  # take no chances and rewrite it.
13739  # Note: m4 eats our [], so we need to use [ and ] instead.
13740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13741  if test "x$has_forbidden_chars" != x; then
13742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13746      # Going to short mode and back again did indeed matter. Since short mode is
13747      # case insensitive, let's make it lowercase to improve readability.
13748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13749      # Now convert it back to Unix-stile (cygpath)
13750      input_path=`$CYGPATH -u "$shortmode_path"`
13751      new_path="$input_path"
13752    fi
13753  fi
13754
13755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13756  if test "x$test_cygdrive_prefix" = x; then
13757    # As a simple fix, exclude /usr/bin since it's not a real path.
13758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13760      # a path prefixed by /cygdrive for fixpath to work.
13761      new_path="$CYGWIN_ROOT_PATH$input_path"
13762    fi
13763  fi
13764
13765
13766  if test "x$path" != "x$new_path"; then
13767    BOOT_JDK="$new_path"
13768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13770  fi
13771
13772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13773
13774  path="$BOOT_JDK"
13775  has_colon=`$ECHO $path | $GREP ^.:`
13776  new_path="$path"
13777  if test "x$has_colon" = x; then
13778    # Not in mixed or Windows style, start by that.
13779    new_path=`cmd //c echo $path`
13780  fi
13781
13782
13783  input_path="$new_path"
13784  # Check if we need to convert this using DOS-style short mode. If the path
13785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13786  # take no chances and rewrite it.
13787  # Note: m4 eats our [], so we need to use [ and ] instead.
13788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13789  if test "x$has_forbidden_chars" != x; then
13790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13792  fi
13793
13794
13795  windows_path="$new_path"
13796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13797    unix_path=`$CYGPATH -u "$windows_path"`
13798    new_path="$unix_path"
13799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13801    new_path="$unix_path"
13802  fi
13803
13804  if test "x$path" != "x$new_path"; then
13805    BOOT_JDK="$new_path"
13806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13808  fi
13809
13810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13812
13813  else
13814    # We're on a posix platform. Hooray! :)
13815    path="$BOOT_JDK"
13816
13817    if test ! -f "$path" && test ! -d "$path"; then
13818      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13819    fi
13820
13821    has_space=`$ECHO "$path" | $GREP " "`
13822    if test "x$has_space" != x; then
13823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13825      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13826    fi
13827  fi
13828
13829              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13830$as_echo_n "checking for Boot JDK... " >&6; }
13831              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13832$as_echo "$BOOT_JDK" >&6; }
13833              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13834$as_echo_n "checking Boot JDK version... " >&6; }
13835              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13836              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13837$as_echo "$BOOT_JDK_VERSION" >&6; }
13838            fi # end check jdk version
13839          fi # end check rt.jar
13840        fi # end check javac
13841      fi # end check java
13842    fi # end check boot jdk found
13843  fi
13844
13845    done
13846  fi
13847
13848
13849    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13850    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13851      # Do we have a bin/java?
13852      if test ! -x "$BOOT_JDK/bin/java"; then
13853        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13855        BOOT_JDK_FOUND=no
13856      else
13857        # Do we have a bin/javac?
13858        if test ! -x "$BOOT_JDK/bin/javac"; then
13859          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13861          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13862$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13863          BOOT_JDK_FOUND=no
13864        else
13865          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13866          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13867            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13869            BOOT_JDK_FOUND=no
13870          else
13871            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13873
13874            # Extra M4 quote needed to protect [] in grep expression.
13875            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13876            if test "x$FOUND_VERSION_78" = x; then
13877              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13879              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13880$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13881              BOOT_JDK_FOUND=no
13882            else
13883              # We're done! :-)
13884              BOOT_JDK_FOUND=yes
13885
13886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13887
13888  # Input might be given as Windows format, start by converting to
13889  # unix format.
13890  path="$BOOT_JDK"
13891  new_path=`$CYGPATH -u "$path"`
13892
13893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13896  # "foo.exe" is OK but "foo" is an error.
13897  #
13898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13899  # It is also a way to make sure we got the proper file name for the real test later on.
13900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13901  if test "x$test_shortpath" = x; then
13902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13904    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13905  fi
13906
13907  # Call helper function which possibly converts this using DOS-style short mode.
13908  # If so, the updated path is stored in $new_path.
13909
13910  input_path="$new_path"
13911  # Check if we need to convert this using DOS-style short mode. If the path
13912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13913  # take no chances and rewrite it.
13914  # Note: m4 eats our [], so we need to use [ and ] instead.
13915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13916  if test "x$has_forbidden_chars" != x; then
13917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13921      # Going to short mode and back again did indeed matter. Since short mode is
13922      # case insensitive, let's make it lowercase to improve readability.
13923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13924      # Now convert it back to Unix-stile (cygpath)
13925      input_path=`$CYGPATH -u "$shortmode_path"`
13926      new_path="$input_path"
13927    fi
13928  fi
13929
13930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13931  if test "x$test_cygdrive_prefix" = x; then
13932    # As a simple fix, exclude /usr/bin since it's not a real path.
13933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13935      # a path prefixed by /cygdrive for fixpath to work.
13936      new_path="$CYGWIN_ROOT_PATH$input_path"
13937    fi
13938  fi
13939
13940
13941  if test "x$path" != "x$new_path"; then
13942    BOOT_JDK="$new_path"
13943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13945  fi
13946
13947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13948
13949  path="$BOOT_JDK"
13950  has_colon=`$ECHO $path | $GREP ^.:`
13951  new_path="$path"
13952  if test "x$has_colon" = x; then
13953    # Not in mixed or Windows style, start by that.
13954    new_path=`cmd //c echo $path`
13955  fi
13956
13957
13958  input_path="$new_path"
13959  # Check if we need to convert this using DOS-style short mode. If the path
13960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13961  # take no chances and rewrite it.
13962  # Note: m4 eats our [], so we need to use [ and ] instead.
13963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13964  if test "x$has_forbidden_chars" != x; then
13965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13967  fi
13968
13969
13970  windows_path="$new_path"
13971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13972    unix_path=`$CYGPATH -u "$windows_path"`
13973    new_path="$unix_path"
13974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13976    new_path="$unix_path"
13977  fi
13978
13979  if test "x$path" != "x$new_path"; then
13980    BOOT_JDK="$new_path"
13981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13983  fi
13984
13985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13987
13988  else
13989    # We're on a posix platform. Hooray! :)
13990    path="$BOOT_JDK"
13991
13992    if test ! -f "$path" && test ! -d "$path"; then
13993      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13994    fi
13995
13996    has_space=`$ECHO "$path" | $GREP " "`
13997    if test "x$has_space" != x; then
13998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14000      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14001    fi
14002  fi
14003
14004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14005$as_echo_n "checking for Boot JDK... " >&6; }
14006              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14007$as_echo "$BOOT_JDK" >&6; }
14008              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14009$as_echo_n "checking Boot JDK version... " >&6; }
14010              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14012$as_echo "$BOOT_JDK_VERSION" >&6; }
14013            fi # end check jdk version
14014          fi # end check rt.jar
14015        fi # end check javac
14016      fi # end check java
14017    fi # end check boot jdk found
14018  fi
14019
14020
14021  if test "x$BOOT_JDK_FOUND" = xno; then
14022    # Now execute the test
14023
14024  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14025  BOOT_JDK_SUFFIX="/Contents/Home"
14026  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14027  if test "x$ALL_JDKS_FOUND" != x; then
14028    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14029
14030  if test "x$BOOT_JDK_FOUND" = xno; then
14031    # Now execute the test
14032
14033        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14034        if test -d "$BOOT_JDK"; then
14035          BOOT_JDK_FOUND=maybe
14036          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14037$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14038        fi
14039
14040
14041    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14042    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14043      # Do we have a bin/java?
14044      if test ! -x "$BOOT_JDK/bin/java"; then
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14047        BOOT_JDK_FOUND=no
14048      else
14049        # Do we have a bin/javac?
14050        if test ! -x "$BOOT_JDK/bin/javac"; then
14051          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14053          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14054$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14055          BOOT_JDK_FOUND=no
14056        else
14057          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14058          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14059            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14061            BOOT_JDK_FOUND=no
14062          else
14063            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14065
14066            # Extra M4 quote needed to protect [] in grep expression.
14067            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14068            if test "x$FOUND_VERSION_78" = x; then
14069              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14071              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14072$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14073              BOOT_JDK_FOUND=no
14074            else
14075              # We're done! :-)
14076              BOOT_JDK_FOUND=yes
14077
14078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14079
14080  # Input might be given as Windows format, start by converting to
14081  # unix format.
14082  path="$BOOT_JDK"
14083  new_path=`$CYGPATH -u "$path"`
14084
14085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14088  # "foo.exe" is OK but "foo" is an error.
14089  #
14090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14091  # It is also a way to make sure we got the proper file name for the real test later on.
14092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14093  if test "x$test_shortpath" = x; then
14094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14096    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14097  fi
14098
14099  # Call helper function which possibly converts this using DOS-style short mode.
14100  # If so, the updated path is stored in $new_path.
14101
14102  input_path="$new_path"
14103  # Check if we need to convert this using DOS-style short mode. If the path
14104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14105  # take no chances and rewrite it.
14106  # Note: m4 eats our [], so we need to use [ and ] instead.
14107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14108  if test "x$has_forbidden_chars" != x; then
14109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14113      # Going to short mode and back again did indeed matter. Since short mode is
14114      # case insensitive, let's make it lowercase to improve readability.
14115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14116      # Now convert it back to Unix-stile (cygpath)
14117      input_path=`$CYGPATH -u "$shortmode_path"`
14118      new_path="$input_path"
14119    fi
14120  fi
14121
14122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14123  if test "x$test_cygdrive_prefix" = x; then
14124    # As a simple fix, exclude /usr/bin since it's not a real path.
14125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14127      # a path prefixed by /cygdrive for fixpath to work.
14128      new_path="$CYGWIN_ROOT_PATH$input_path"
14129    fi
14130  fi
14131
14132
14133  if test "x$path" != "x$new_path"; then
14134    BOOT_JDK="$new_path"
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14137  fi
14138
14139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14140
14141  path="$BOOT_JDK"
14142  has_colon=`$ECHO $path | $GREP ^.:`
14143  new_path="$path"
14144  if test "x$has_colon" = x; then
14145    # Not in mixed or Windows style, start by that.
14146    new_path=`cmd //c echo $path`
14147  fi
14148
14149
14150  input_path="$new_path"
14151  # Check if we need to convert this using DOS-style short mode. If the path
14152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14153  # take no chances and rewrite it.
14154  # Note: m4 eats our [], so we need to use [ and ] instead.
14155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14156  if test "x$has_forbidden_chars" != x; then
14157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14159  fi
14160
14161
14162  windows_path="$new_path"
14163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14164    unix_path=`$CYGPATH -u "$windows_path"`
14165    new_path="$unix_path"
14166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14168    new_path="$unix_path"
14169  fi
14170
14171  if test "x$path" != "x$new_path"; then
14172    BOOT_JDK="$new_path"
14173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14175  fi
14176
14177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14179
14180  else
14181    # We're on a posix platform. Hooray! :)
14182    path="$BOOT_JDK"
14183
14184    if test ! -f "$path" && test ! -d "$path"; then
14185      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14186    fi
14187
14188    has_space=`$ECHO "$path" | $GREP " "`
14189    if test "x$has_space" != x; then
14190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14193    fi
14194  fi
14195
14196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14197$as_echo_n "checking for Boot JDK... " >&6; }
14198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14199$as_echo "$BOOT_JDK" >&6; }
14200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14201$as_echo_n "checking Boot JDK version... " >&6; }
14202              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14204$as_echo "$BOOT_JDK_VERSION" >&6; }
14205            fi # end check jdk version
14206          fi # end check rt.jar
14207        fi # end check javac
14208      fi # end check java
14209    fi # end check boot jdk found
14210  fi
14211
14212    done
14213  fi
14214
14215
14216    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14217    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14218      # Do we have a bin/java?
14219      if test ! -x "$BOOT_JDK/bin/java"; then
14220        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14222        BOOT_JDK_FOUND=no
14223      else
14224        # Do we have a bin/javac?
14225        if test ! -x "$BOOT_JDK/bin/javac"; then
14226          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14228          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14229$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14230          BOOT_JDK_FOUND=no
14231        else
14232          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14233          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14234            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14236            BOOT_JDK_FOUND=no
14237          else
14238            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14239            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14240
14241            # Extra M4 quote needed to protect [] in grep expression.
14242            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14243            if test "x$FOUND_VERSION_78" = x; then
14244              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14246              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14247$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14248              BOOT_JDK_FOUND=no
14249            else
14250              # We're done! :-)
14251              BOOT_JDK_FOUND=yes
14252
14253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14254
14255  # Input might be given as Windows format, start by converting to
14256  # unix format.
14257  path="$BOOT_JDK"
14258  new_path=`$CYGPATH -u "$path"`
14259
14260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14263  # "foo.exe" is OK but "foo" is an error.
14264  #
14265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14266  # It is also a way to make sure we got the proper file name for the real test later on.
14267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14268  if test "x$test_shortpath" = x; then
14269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14270$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14271    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14272  fi
14273
14274  # Call helper function which possibly converts this using DOS-style short mode.
14275  # If so, the updated path is stored in $new_path.
14276
14277  input_path="$new_path"
14278  # Check if we need to convert this using DOS-style short mode. If the path
14279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14280  # take no chances and rewrite it.
14281  # Note: m4 eats our [], so we need to use [ and ] instead.
14282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14283  if test "x$has_forbidden_chars" != x; then
14284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14288      # Going to short mode and back again did indeed matter. Since short mode is
14289      # case insensitive, let's make it lowercase to improve readability.
14290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14291      # Now convert it back to Unix-stile (cygpath)
14292      input_path=`$CYGPATH -u "$shortmode_path"`
14293      new_path="$input_path"
14294    fi
14295  fi
14296
14297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14298  if test "x$test_cygdrive_prefix" = x; then
14299    # As a simple fix, exclude /usr/bin since it's not a real path.
14300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14302      # a path prefixed by /cygdrive for fixpath to work.
14303      new_path="$CYGWIN_ROOT_PATH$input_path"
14304    fi
14305  fi
14306
14307
14308  if test "x$path" != "x$new_path"; then
14309    BOOT_JDK="$new_path"
14310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14312  fi
14313
14314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14315
14316  path="$BOOT_JDK"
14317  has_colon=`$ECHO $path | $GREP ^.:`
14318  new_path="$path"
14319  if test "x$has_colon" = x; then
14320    # Not in mixed or Windows style, start by that.
14321    new_path=`cmd //c echo $path`
14322  fi
14323
14324
14325  input_path="$new_path"
14326  # Check if we need to convert this using DOS-style short mode. If the path
14327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14328  # take no chances and rewrite it.
14329  # Note: m4 eats our [], so we need to use [ and ] instead.
14330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14331  if test "x$has_forbidden_chars" != x; then
14332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14334  fi
14335
14336
14337  windows_path="$new_path"
14338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14339    unix_path=`$CYGPATH -u "$windows_path"`
14340    new_path="$unix_path"
14341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14343    new_path="$unix_path"
14344  fi
14345
14346  if test "x$path" != "x$new_path"; then
14347    BOOT_JDK="$new_path"
14348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14350  fi
14351
14352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14354
14355  else
14356    # We're on a posix platform. Hooray! :)
14357    path="$BOOT_JDK"
14358
14359    if test ! -f "$path" && test ! -d "$path"; then
14360      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14361    fi
14362
14363    has_space=`$ECHO "$path" | $GREP " "`
14364    if test "x$has_space" != x; then
14365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14367      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14368    fi
14369  fi
14370
14371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14372$as_echo_n "checking for Boot JDK... " >&6; }
14373              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14374$as_echo "$BOOT_JDK" >&6; }
14375              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14376$as_echo_n "checking Boot JDK version... " >&6; }
14377              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14379$as_echo "$BOOT_JDK_VERSION" >&6; }
14380            fi # end check jdk version
14381          fi # end check rt.jar
14382        fi # end check javac
14383      fi # end check java
14384    fi # end check boot jdk found
14385  fi
14386
14387  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14388
14389  if test "x$BOOT_JDK_FOUND" = xno; then
14390    # Now execute the test
14391
14392  BOOT_JDK_PREFIX="/usr/lib/jvm"
14393  BOOT_JDK_SUFFIX=""
14394  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14395  if test "x$ALL_JDKS_FOUND" != x; then
14396    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14397
14398  if test "x$BOOT_JDK_FOUND" = xno; then
14399    # Now execute the test
14400
14401        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14402        if test -d "$BOOT_JDK"; then
14403          BOOT_JDK_FOUND=maybe
14404          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14405$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14406        fi
14407
14408
14409    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14410    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14411      # Do we have a bin/java?
14412      if test ! -x "$BOOT_JDK/bin/java"; then
14413        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14415        BOOT_JDK_FOUND=no
14416      else
14417        # Do we have a bin/javac?
14418        if test ! -x "$BOOT_JDK/bin/javac"; then
14419          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14421          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14422$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14423          BOOT_JDK_FOUND=no
14424        else
14425          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14426          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14427            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14429            BOOT_JDK_FOUND=no
14430          else
14431            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14432            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14433
14434            # Extra M4 quote needed to protect [] in grep expression.
14435            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14436            if test "x$FOUND_VERSION_78" = x; then
14437              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14439              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14440$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14441              BOOT_JDK_FOUND=no
14442            else
14443              # We're done! :-)
14444              BOOT_JDK_FOUND=yes
14445
14446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14447
14448  # Input might be given as Windows format, start by converting to
14449  # unix format.
14450  path="$BOOT_JDK"
14451  new_path=`$CYGPATH -u "$path"`
14452
14453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14456  # "foo.exe" is OK but "foo" is an error.
14457  #
14458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14459  # It is also a way to make sure we got the proper file name for the real test later on.
14460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14461  if test "x$test_shortpath" = x; then
14462    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14464    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14465  fi
14466
14467  # Call helper function which possibly converts this using DOS-style short mode.
14468  # If so, the updated path is stored in $new_path.
14469
14470  input_path="$new_path"
14471  # Check if we need to convert this using DOS-style short mode. If the path
14472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14473  # take no chances and rewrite it.
14474  # Note: m4 eats our [], so we need to use [ and ] instead.
14475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14476  if test "x$has_forbidden_chars" != x; then
14477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14481      # Going to short mode and back again did indeed matter. Since short mode is
14482      # case insensitive, let's make it lowercase to improve readability.
14483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14484      # Now convert it back to Unix-stile (cygpath)
14485      input_path=`$CYGPATH -u "$shortmode_path"`
14486      new_path="$input_path"
14487    fi
14488  fi
14489
14490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14491  if test "x$test_cygdrive_prefix" = x; then
14492    # As a simple fix, exclude /usr/bin since it's not a real path.
14493    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14495      # a path prefixed by /cygdrive for fixpath to work.
14496      new_path="$CYGWIN_ROOT_PATH$input_path"
14497    fi
14498  fi
14499
14500
14501  if test "x$path" != "x$new_path"; then
14502    BOOT_JDK="$new_path"
14503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14504$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14505  fi
14506
14507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14508
14509  path="$BOOT_JDK"
14510  has_colon=`$ECHO $path | $GREP ^.:`
14511  new_path="$path"
14512  if test "x$has_colon" = x; then
14513    # Not in mixed or Windows style, start by that.
14514    new_path=`cmd //c echo $path`
14515  fi
14516
14517
14518  input_path="$new_path"
14519  # Check if we need to convert this using DOS-style short mode. If the path
14520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14521  # take no chances and rewrite it.
14522  # Note: m4 eats our [], so we need to use [ and ] instead.
14523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14524  if test "x$has_forbidden_chars" != x; then
14525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14527  fi
14528
14529
14530  windows_path="$new_path"
14531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14532    unix_path=`$CYGPATH -u "$windows_path"`
14533    new_path="$unix_path"
14534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14536    new_path="$unix_path"
14537  fi
14538
14539  if test "x$path" != "x$new_path"; then
14540    BOOT_JDK="$new_path"
14541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14543  fi
14544
14545  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14546  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14547
14548  else
14549    # We're on a posix platform. Hooray! :)
14550    path="$BOOT_JDK"
14551
14552    if test ! -f "$path" && test ! -d "$path"; then
14553      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14554    fi
14555
14556    has_space=`$ECHO "$path" | $GREP " "`
14557    if test "x$has_space" != x; then
14558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14560      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14561    fi
14562  fi
14563
14564              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14565$as_echo_n "checking for Boot JDK... " >&6; }
14566              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14567$as_echo "$BOOT_JDK" >&6; }
14568              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14569$as_echo_n "checking Boot JDK version... " >&6; }
14570              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14571              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14572$as_echo "$BOOT_JDK_VERSION" >&6; }
14573            fi # end check jdk version
14574          fi # end check rt.jar
14575        fi # end check javac
14576      fi # end check java
14577    fi # end check boot jdk found
14578  fi
14579
14580    done
14581  fi
14582
14583
14584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14586      # Do we have a bin/java?
14587      if test ! -x "$BOOT_JDK/bin/java"; then
14588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14590        BOOT_JDK_FOUND=no
14591      else
14592        # Do we have a bin/javac?
14593        if test ! -x "$BOOT_JDK/bin/javac"; then
14594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14598          BOOT_JDK_FOUND=no
14599        else
14600          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14601          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14604            BOOT_JDK_FOUND=no
14605          else
14606            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14607            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14608
14609            # Extra M4 quote needed to protect [] in grep expression.
14610            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14611            if test "x$FOUND_VERSION_78" = x; then
14612              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14614              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14615$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14616              BOOT_JDK_FOUND=no
14617            else
14618              # We're done! :-)
14619              BOOT_JDK_FOUND=yes
14620
14621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14622
14623  # Input might be given as Windows format, start by converting to
14624  # unix format.
14625  path="$BOOT_JDK"
14626  new_path=`$CYGPATH -u "$path"`
14627
14628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14631  # "foo.exe" is OK but "foo" is an error.
14632  #
14633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14634  # It is also a way to make sure we got the proper file name for the real test later on.
14635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14636  if test "x$test_shortpath" = x; then
14637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14639    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14640  fi
14641
14642  # Call helper function which possibly converts this using DOS-style short mode.
14643  # If so, the updated path is stored in $new_path.
14644
14645  input_path="$new_path"
14646  # Check if we need to convert this using DOS-style short mode. If the path
14647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14648  # take no chances and rewrite it.
14649  # Note: m4 eats our [], so we need to use [ and ] instead.
14650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14651  if test "x$has_forbidden_chars" != x; then
14652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14656      # Going to short mode and back again did indeed matter. Since short mode is
14657      # case insensitive, let's make it lowercase to improve readability.
14658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14659      # Now convert it back to Unix-stile (cygpath)
14660      input_path=`$CYGPATH -u "$shortmode_path"`
14661      new_path="$input_path"
14662    fi
14663  fi
14664
14665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14666  if test "x$test_cygdrive_prefix" = x; then
14667    # As a simple fix, exclude /usr/bin since it's not a real path.
14668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14670      # a path prefixed by /cygdrive for fixpath to work.
14671      new_path="$CYGWIN_ROOT_PATH$input_path"
14672    fi
14673  fi
14674
14675
14676  if test "x$path" != "x$new_path"; then
14677    BOOT_JDK="$new_path"
14678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14679$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14680  fi
14681
14682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14683
14684  path="$BOOT_JDK"
14685  has_colon=`$ECHO $path | $GREP ^.:`
14686  new_path="$path"
14687  if test "x$has_colon" = x; then
14688    # Not in mixed or Windows style, start by that.
14689    new_path=`cmd //c echo $path`
14690  fi
14691
14692
14693  input_path="$new_path"
14694  # Check if we need to convert this using DOS-style short mode. If the path
14695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14696  # take no chances and rewrite it.
14697  # Note: m4 eats our [], so we need to use [ and ] instead.
14698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14699  if test "x$has_forbidden_chars" != x; then
14700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14702  fi
14703
14704
14705  windows_path="$new_path"
14706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14707    unix_path=`$CYGPATH -u "$windows_path"`
14708    new_path="$unix_path"
14709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14711    new_path="$unix_path"
14712  fi
14713
14714  if test "x$path" != "x$new_path"; then
14715    BOOT_JDK="$new_path"
14716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14717$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14718  fi
14719
14720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14722
14723  else
14724    # We're on a posix platform. Hooray! :)
14725    path="$BOOT_JDK"
14726
14727    if test ! -f "$path" && test ! -d "$path"; then
14728      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14729    fi
14730
14731    has_space=`$ECHO "$path" | $GREP " "`
14732    if test "x$has_space" != x; then
14733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14735      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14736    fi
14737  fi
14738
14739              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14740$as_echo_n "checking for Boot JDK... " >&6; }
14741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14742$as_echo "$BOOT_JDK" >&6; }
14743              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14744$as_echo_n "checking Boot JDK version... " >&6; }
14745              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14746              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14747$as_echo "$BOOT_JDK_VERSION" >&6; }
14748            fi # end check jdk version
14749          fi # end check rt.jar
14750        fi # end check javac
14751      fi # end check java
14752    fi # end check boot jdk found
14753  fi
14754
14755  fi
14756
14757
14758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14760      # Do we have a bin/java?
14761      if test ! -x "$BOOT_JDK/bin/java"; then
14762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14764        BOOT_JDK_FOUND=no
14765      else
14766        # Do we have a bin/javac?
14767        if test ! -x "$BOOT_JDK/bin/javac"; then
14768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14772          BOOT_JDK_FOUND=no
14773        else
14774          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14775          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14778            BOOT_JDK_FOUND=no
14779          else
14780            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14782
14783            # Extra M4 quote needed to protect [] in grep expression.
14784            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14785            if test "x$FOUND_VERSION_78" = x; then
14786              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14788              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14789$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14790              BOOT_JDK_FOUND=no
14791            else
14792              # We're done! :-)
14793              BOOT_JDK_FOUND=yes
14794
14795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14796
14797  # Input might be given as Windows format, start by converting to
14798  # unix format.
14799  path="$BOOT_JDK"
14800  new_path=`$CYGPATH -u "$path"`
14801
14802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14805  # "foo.exe" is OK but "foo" is an error.
14806  #
14807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14808  # It is also a way to make sure we got the proper file name for the real test later on.
14809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14810  if test "x$test_shortpath" = x; then
14811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14814  fi
14815
14816  # Call helper function which possibly converts this using DOS-style short mode.
14817  # If so, the updated path is stored in $new_path.
14818
14819  input_path="$new_path"
14820  # Check if we need to convert this using DOS-style short mode. If the path
14821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14822  # take no chances and rewrite it.
14823  # Note: m4 eats our [], so we need to use [ and ] instead.
14824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14825  if test "x$has_forbidden_chars" != x; then
14826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14830      # Going to short mode and back again did indeed matter. Since short mode is
14831      # case insensitive, let's make it lowercase to improve readability.
14832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14833      # Now convert it back to Unix-stile (cygpath)
14834      input_path=`$CYGPATH -u "$shortmode_path"`
14835      new_path="$input_path"
14836    fi
14837  fi
14838
14839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14840  if test "x$test_cygdrive_prefix" = x; then
14841    # As a simple fix, exclude /usr/bin since it's not a real path.
14842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14844      # a path prefixed by /cygdrive for fixpath to work.
14845      new_path="$CYGWIN_ROOT_PATH$input_path"
14846    fi
14847  fi
14848
14849
14850  if test "x$path" != "x$new_path"; then
14851    BOOT_JDK="$new_path"
14852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14854  fi
14855
14856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14857
14858  path="$BOOT_JDK"
14859  has_colon=`$ECHO $path | $GREP ^.:`
14860  new_path="$path"
14861  if test "x$has_colon" = x; then
14862    # Not in mixed or Windows style, start by that.
14863    new_path=`cmd //c echo $path`
14864  fi
14865
14866
14867  input_path="$new_path"
14868  # Check if we need to convert this using DOS-style short mode. If the path
14869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14870  # take no chances and rewrite it.
14871  # Note: m4 eats our [], so we need to use [ and ] instead.
14872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14873  if test "x$has_forbidden_chars" != x; then
14874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14876  fi
14877
14878
14879  windows_path="$new_path"
14880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14881    unix_path=`$CYGPATH -u "$windows_path"`
14882    new_path="$unix_path"
14883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14885    new_path="$unix_path"
14886  fi
14887
14888  if test "x$path" != "x$new_path"; then
14889    BOOT_JDK="$new_path"
14890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14892  fi
14893
14894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14896
14897  else
14898    # We're on a posix platform. Hooray! :)
14899    path="$BOOT_JDK"
14900
14901    if test ! -f "$path" && test ! -d "$path"; then
14902      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14903    fi
14904
14905    has_space=`$ECHO "$path" | $GREP " "`
14906    if test "x$has_space" != x; then
14907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14910    fi
14911  fi
14912
14913              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14914$as_echo_n "checking for Boot JDK... " >&6; }
14915              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14916$as_echo "$BOOT_JDK" >&6; }
14917              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14918$as_echo_n "checking Boot JDK version... " >&6; }
14919              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14920              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14921$as_echo "$BOOT_JDK_VERSION" >&6; }
14922            fi # end check jdk version
14923          fi # end check rt.jar
14924        fi # end check javac
14925      fi # end check java
14926    fi # end check boot jdk found
14927  fi
14928
14929
14930# If we haven't found anything yet, we've truly lost. Give up.
14931if test "x$BOOT_JDK_FOUND" = xno; then
14932
14933    # Print a helpful message on how to acquire the necessary build dependency.
14934    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
14935    MISSING_DEPENDENCY=openjdk
14936    PKGHANDLER_COMMAND=
14937
14938    case $PKGHANDLER in
14939	apt-get)
14940                apt_help     $MISSING_DEPENDENCY ;;
14941    yum)
14942                yum_help     $MISSING_DEPENDENCY ;;
14943	port)
14944                port_help    $MISSING_DEPENDENCY ;;
14945	pkgutil)
14946                pkgutil_help $MISSING_DEPENDENCY ;;
14947	pkgadd)
14948                pkgadd_help  $MISSING_DEPENDENCY ;;
14949    * )
14950      break ;;
14951    esac
14952
14953    if test "x$PKGHANDLER_COMMAND" != x; then
14954        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
14955    fi
14956
14957  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
14958$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
14959  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
14960$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14961  as_fn_error $? "Cannot continue" "$LINENO" 5
14962fi
14963
14964# Setup proper paths for what we found
14965BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
14966if test ! -f "$BOOT_RTJAR"; then
14967    # On MacOSX it is called classes.jar
14968    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
14969    if test -f "$BOOT_RTJAR"; then
14970      # Remove the ..
14971      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
14972    fi
14973fi
14974BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
14975BOOT_JDK="$BOOT_JDK"
14976
14977
14978
14979
14980# Setup tools from the Boot JDK.
14981
14982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
14983$as_echo_n "checking for java in Boot JDK... " >&6; }
14984  JAVA=$BOOT_JDK/bin/java
14985  if test ! -x $JAVA; then
14986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14987$as_echo "not found" >&6; }
14988      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14989$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14990      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
14991  fi
14992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14993$as_echo "ok" >&6; }
14994
14995
14996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
14997$as_echo_n "checking for javac in Boot JDK... " >&6; }
14998  JAVAC=$BOOT_JDK/bin/javac
14999  if test ! -x $JAVAC; then
15000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15001$as_echo "not found" >&6; }
15002      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15003$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15004      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15005  fi
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15007$as_echo "ok" >&6; }
15008
15009
15010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15011$as_echo_n "checking for javah in Boot JDK... " >&6; }
15012  JAVAH=$BOOT_JDK/bin/javah
15013  if test ! -x $JAVAH; then
15014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15015$as_echo "not found" >&6; }
15016      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15017$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15018      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15019  fi
15020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15021$as_echo "ok" >&6; }
15022
15023
15024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15025$as_echo_n "checking for javap in Boot JDK... " >&6; }
15026  JAVAP=$BOOT_JDK/bin/javap
15027  if test ! -x $JAVAP; then
15028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15029$as_echo "not found" >&6; }
15030      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15031$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15032      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15033  fi
15034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15035$as_echo "ok" >&6; }
15036
15037
15038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15039$as_echo_n "checking for jar in Boot JDK... " >&6; }
15040  JAR=$BOOT_JDK/bin/jar
15041  if test ! -x $JAR; then
15042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15043$as_echo "not found" >&6; }
15044      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15045$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15046      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15047  fi
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15049$as_echo "ok" >&6; }
15050
15051
15052  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15053$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15054  RMIC=$BOOT_JDK/bin/rmic
15055  if test ! -x $RMIC; then
15056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15057$as_echo "not found" >&6; }
15058      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15060      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15061  fi
15062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15063$as_echo "ok" >&6; }
15064
15065
15066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15067$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15068  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15069  if test ! -x $NATIVE2ASCII; then
15070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15071$as_echo "not found" >&6; }
15072      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15073$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15074      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15075  fi
15076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15077$as_echo "ok" >&6; }
15078
15079
15080# Finally, set some other options...
15081
15082# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15083BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15084
15085
15086
15087
15088##############################################################################
15089#
15090# Specify options for anything that is run with the Boot JDK.
15091#
15092
15093# Check whether --with-boot-jdk-jvmargs was given.
15094if test "${with_boot_jdk_jvmargs+set}" = set; then :
15095  withval=$with_boot_jdk_jvmargs;
15096fi
15097
15098
15099if test "x$with_boot_jdk_jvmargs" = x; then
15100    # Not all JVM:s accept the same arguments on the command line.
15101    # OpenJDK specific increase in thread stack for JDK build,
15102    # well more specifically, when running javac.
15103    if test "x$BUILD_NUM_BITS" = x32; then
15104       STACK_SIZE=768
15105    else
15106       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15107       # since 64-bit pointers are pushed on the stach. Apparently, we need
15108       # to increase the stack space when javacing the JDK....
15109       STACK_SIZE=1536
15110    fi
15111
15112    # Minimum amount of heap memory.
15113
15114    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15115    # If so, then append -Xms64M to boot_jdk_jvmargs
15116    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15117    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15118    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15119        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15120    fi
15121
15122    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15123        # Why does macosx need more heap? Its the huge JDK batch.
15124
15125    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15126    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15127    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15128    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15129    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15130        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15131    fi
15132
15133    else
15134
15135    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15136    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15137    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15138    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15139    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15140        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15141    fi
15142
15143    fi
15144    # When is adding -client something that speeds up the JVM?
15145    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15146
15147    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15148    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15149    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15150    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15151    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15152        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15153    fi
15154
15155
15156    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15157    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15158    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15159    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15160    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15161        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15162    fi
15163
15164
15165    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15166    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15167    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15168    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15169    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15170        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15171    fi
15172
15173    # Disable special log output when a debug build is used as Boot JDK...
15174
15175    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15176    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15177    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15178    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15179    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15180        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15181    fi
15182
15183fi
15184
15185BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15186
15187
15188
15189###############################################################################
15190#
15191# Configure the sources to use. We can add or override individual directories.
15192#
15193###############################################################################
15194
15195
15196
15197# Where are the sources. Any of these can be overridden
15198# using --with-override-corba and the likes.
15199LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15200CORBA_TOPDIR="$SRC_ROOT/corba"
15201JAXP_TOPDIR="$SRC_ROOT/jaxp"
15202JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15203HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15204JDK_TOPDIR="$SRC_ROOT/jdk"
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214###############################################################################
15215#
15216# Pickup additional source for a component from outside of the source root
15217# or override source for a component.
15218#
15219
15220# Check whether --with-add-source-root was given.
15221if test "${with_add_source_root+set}" = set; then :
15222  withval=$with_add_source_root;
15223fi
15224
15225
15226
15227# Check whether --with-override-source-root was given.
15228if test "${with_override_source_root+set}" = set; then :
15229  withval=$with_override_source_root;
15230fi
15231
15232
15233
15234# Check whether --with-adds-and-overrides was given.
15235if test "${with_adds_and_overrides+set}" = set; then :
15236  withval=$with_adds_and_overrides;
15237fi
15238
15239
15240if test "x$with_adds_and_overrides" != x; then
15241    with_add_source_root="$with_adds_and_overrides/adds"
15242    with_override_source_root="$with_adds_and_overrides/overrides"
15243fi
15244
15245if test "x$with_add_source_root" != x; then
15246    if ! test -d $with_add_source_root; then
15247       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15248    fi
15249    CURDIR="$PWD"
15250    cd "$with_add_source_root"
15251    ADD_SRC_ROOT="`pwd`"
15252    cd "$CURDIR"
15253    # Verify that the addon source root does not have any root makefiles.
15254    # If it does, then it is usually an error, prevent this.
15255    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15256       test -f $with_add_source_root/langtools/make/Makefile; then
15257        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
15258    fi
15259    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15260       test -f $with_add_source_root/corba/make/Makefile; then
15261        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
15262    fi
15263    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15264       test -f $with_add_source_root/jaxp/make/Makefile; then
15265        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
15266    fi
15267    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15268       test -f $with_add_source_root/jaxws/make/Makefile; then
15269        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
15270    fi
15271    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15272       test -f $with_add_source_root/hotspot/make/Makefile; then
15273        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
15274    fi
15275    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15276       test -f $with_add_source_root/jdk/make/Makefile; then
15277        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
15278    fi
15279fi
15280
15281
15282if test "x$with_override_source_root" != x; then
15283    if ! test -d $with_override_source_root; then
15284       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15285    fi
15286    CURDIR="$PWD"
15287    cd "$with_override_source_root"
15288    OVERRIDE_SRC_ROOT="`pwd`"
15289    cd "$CURDIR"
15290    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15291       test -f $with_override_source_root/langtools/make/Makefile; then
15292        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
15293    fi
15294    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15295       test -f $with_override_source_root/corba/make/Makefile; then
15296        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
15297    fi
15298    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15299       test -f $with_override_source_root/jaxp/make/Makefile; then
15300        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
15301    fi
15302    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15303       test -f $with_override_source_root/jaxws/make/Makefile; then
15304        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
15305    fi
15306    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15307       test -f $with_override_source_root/hotspot/make/Makefile; then
15308        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
15309    fi
15310    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15311       test -f $with_override_source_root/jdk/make/Makefile; then
15312        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
15313    fi
15314fi
15315
15316
15317###############################################################################
15318#
15319# Override a repo completely, this is used for example when you have 3 small
15320# development sandboxes of the langtools sources and want to avoid having 3 full
15321# OpenJDK sources checked out on disk.
15322#
15323# Assuming that the 3 langtools sandboxes are located here:
15324# /home/fredrik/sandbox1/langtools
15325# /home/fredrik/sandbox2/langtools
15326# /home/fredrik/sandbox3/langtools
15327#
15328# From the source root you create build subdirs manually:
15329#     mkdir -p build1 build2 build3
15330# in each build directory run:
15331#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15332#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15333#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15334#
15335
15336
15337# Check whether --with-override-langtools was given.
15338if test "${with_override_langtools+set}" = set; then :
15339  withval=$with_override_langtools;
15340fi
15341
15342
15343
15344# Check whether --with-override-corba was given.
15345if test "${with_override_corba+set}" = set; then :
15346  withval=$with_override_corba;
15347fi
15348
15349
15350
15351# Check whether --with-override-jaxp was given.
15352if test "${with_override_jaxp+set}" = set; then :
15353  withval=$with_override_jaxp;
15354fi
15355
15356
15357
15358# Check whether --with-override-jaxws was given.
15359if test "${with_override_jaxws+set}" = set; then :
15360  withval=$with_override_jaxws;
15361fi
15362
15363
15364
15365# Check whether --with-override-hotspot was given.
15366if test "${with_override_hotspot+set}" = set; then :
15367  withval=$with_override_hotspot;
15368fi
15369
15370
15371
15372# Check whether --with-override-jdk was given.
15373if test "${with_override_jdk+set}" = set; then :
15374  withval=$with_override_jdk;
15375fi
15376
15377
15378if test "x$with_override_langtools" != x; then
15379    CURDIR="$PWD"
15380    cd "$with_override_langtools"
15381    LANGTOOLS_TOPDIR="`pwd`"
15382    cd "$CURDIR"
15383    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15384        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15385    fi
15386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15387$as_echo_n "checking if langtools should be overridden... " >&6; }
15388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15389$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15390fi
15391if test "x$with_override_corba" != x; then
15392    CURDIR="$PWD"
15393    cd "$with_override_corba"
15394    CORBA_TOPDIR="`pwd`"
15395    cd "$CURDIR"
15396    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15397        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15398    fi
15399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15400$as_echo_n "checking if corba should be overridden... " >&6; }
15401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15402$as_echo "yes with $CORBA_TOPDIR" >&6; }
15403fi
15404if test "x$with_override_jaxp" != x; then
15405    CURDIR="$PWD"
15406    cd "$with_override_jaxp"
15407    JAXP_TOPDIR="`pwd`"
15408    cd "$CURDIR"
15409    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15410        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15411    fi
15412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15413$as_echo_n "checking if jaxp should be overridden... " >&6; }
15414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15415$as_echo "yes with $JAXP_TOPDIR" >&6; }
15416fi
15417if test "x$with_override_jaxws" != x; then
15418    CURDIR="$PWD"
15419    cd "$with_override_jaxws"
15420    JAXWS_TOPDIR="`pwd`"
15421    cd "$CURDIR"
15422    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15423        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15424    fi
15425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15426$as_echo_n "checking if jaxws should be overridden... " >&6; }
15427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15428$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15429fi
15430if test "x$with_override_hotspot" != x; then
15431    CURDIR="$PWD"
15432    cd "$with_override_hotspot"
15433    HOTSPOT_TOPDIR="`pwd`"
15434    cd "$CURDIR"
15435    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15436       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15437        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15438    fi
15439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15440$as_echo_n "checking if hotspot should be overridden... " >&6; }
15441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15442$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15443fi
15444if test "x$with_override_jdk" != x; then
15445    CURDIR="$PWD"
15446    cd "$with_override_jdk"
15447    JDK_TOPDIR="`pwd`"
15448    cd "$CURDIR"
15449    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15450        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15451    fi
15452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15453$as_echo_n "checking if JDK should be overridden... " >&6; }
15454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15455$as_echo "yes with $JDK_TOPDIR" >&6; }
15456fi
15457
15458
15459
15460BUILD_OUTPUT="$OUTPUT_ROOT"
15461
15462
15463JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15464
15465
15466###############################################################################
15467#
15468# Setup the toolchain (compilers etc), i.e. the tools that need to be
15469# cross-compilation aware.
15470#
15471###############################################################################
15472
15473
15474###############################################################################
15475#
15476# Configure the development tool paths and potential sysroot.
15477#
15478ac_ext=cpp
15479ac_cpp='$CXXCPP $CPPFLAGS'
15480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15483
15484
15485# The option used to specify the target .o,.a or .so file.
15486# When compiling, how to specify the to be created object file.
15487CC_OUT_OPTION='-o$(SPACE)'
15488# When linking, how to specify the to be created executable.
15489EXE_OUT_OPTION='-o$(SPACE)'
15490# When linking, how to specify the to be created dynamically linkable library.
15491LD_OUT_OPTION='-o$(SPACE)'
15492# When archiving, how to specify the to be create static archive for object files.
15493AR_OUT_OPTION='rcs$(SPACE)'
15494
15495
15496
15497
15498
15499# Locate the actual tools
15500
15501if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15502
15503  # Store path to cygwin link.exe to help excluding it when searching for
15504  # VS linker. This must be done before changing the PATH when looking for VS.
15505  # Extract the first word of "link", so it can be a program name with args.
15506set dummy link; ac_word=$2
15507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15508$as_echo_n "checking for $ac_word... " >&6; }
15509if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15510  $as_echo_n "(cached) " >&6
15511else
15512  case $CYGWIN_LINK in
15513  [\\/]* | ?:[\\/]*)
15514  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15515  ;;
15516  *)
15517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15518for as_dir in $PATH
15519do
15520  IFS=$as_save_IFS
15521  test -z "$as_dir" && as_dir=.
15522    for ac_exec_ext in '' $ac_executable_extensions; do
15523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15524    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15526    break 2
15527  fi
15528done
15529  done
15530IFS=$as_save_IFS
15531
15532  ;;
15533esac
15534fi
15535CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15536if test -n "$CYGWIN_LINK"; then
15537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15538$as_echo "$CYGWIN_LINK" >&6; }
15539else
15540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15541$as_echo "no" >&6; }
15542fi
15543
15544
15545  if test "x$CYGWIN_LINK" != x; then
15546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15547$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15548    "$CYGWIN_LINK" --version > /dev/null
15549    if test $? -eq 0 ; then
15550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15551$as_echo "yes" >&6; }
15552    else
15553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15554$as_echo "no" >&6; }
15555      # This might be the VS linker. Don't exclude it later on.
15556      CYGWIN_LINK=""
15557    fi
15558  fi
15559
15560  # First-hand choice is to locate and run the vsvars bat file.
15561
15562  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15563    VCVARSFILE="vc/bin/vcvars32.bat"
15564  else
15565    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15566  fi
15567
15568  VS_ENV_CMD=""
15569  VS_ENV_ARGS=""
15570  if test "x$with_toolsdir" != x; then
15571
15572  if test "x$VS_ENV_CMD" = x; then
15573    VS100BASE="$with_toolsdir/../.."
15574    METHOD="--with-tools-dir"
15575
15576  windows_path="$VS100BASE"
15577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15578    unix_path=`$CYGPATH -u "$windows_path"`
15579    VS100BASE="$unix_path"
15580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15582    VS100BASE="$unix_path"
15583  fi
15584
15585    if test -d "$VS100BASE"; then
15586      if test -f "$VS100BASE/$VCVARSFILE"; then
15587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15588$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15589        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15590      else
15591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15592$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15594$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15595      fi
15596    fi
15597  fi
15598
15599  fi
15600
15601  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15602    # Having specified an argument which is incorrect will produce an instant failure;
15603    # we should not go on looking
15604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15605$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15606    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15607$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15608    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15609  fi
15610
15611  if test "x$ProgramW6432" != x; then
15612
15613  if test "x$VS_ENV_CMD" = x; then
15614    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15615    METHOD="well-known name"
15616
15617  windows_path="$WIN_SDK_BASE"
15618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15619    unix_path=`$CYGPATH -u "$windows_path"`
15620    WIN_SDK_BASE="$unix_path"
15621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15623    WIN_SDK_BASE="$unix_path"
15624  fi
15625
15626    if test -d "$WIN_SDK_BASE"; then
15627      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15628        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15629$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15630        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15631        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15632          VS_ENV_ARGS="/x86"
15633        else
15634          VS_ENV_ARGS="/x64"
15635        fi
15636      else
15637        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15638$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15639        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15640$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15641      fi
15642    fi
15643  fi
15644
15645  fi
15646  if test "x$PROGRAMW6432" != x; then
15647
15648  if test "x$VS_ENV_CMD" = x; then
15649    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15650    METHOD="well-known name"
15651
15652  windows_path="$WIN_SDK_BASE"
15653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15654    unix_path=`$CYGPATH -u "$windows_path"`
15655    WIN_SDK_BASE="$unix_path"
15656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15658    WIN_SDK_BASE="$unix_path"
15659  fi
15660
15661    if test -d "$WIN_SDK_BASE"; then
15662      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15665        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15666        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15667          VS_ENV_ARGS="/x86"
15668        else
15669          VS_ENV_ARGS="/x64"
15670        fi
15671      else
15672        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15673$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15674        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15675$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15676      fi
15677    fi
15678  fi
15679
15680  fi
15681  if test "x$PROGRAMFILES" != x; then
15682
15683  if test "x$VS_ENV_CMD" = x; then
15684    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15685    METHOD="well-known name"
15686
15687  windows_path="$WIN_SDK_BASE"
15688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15689    unix_path=`$CYGPATH -u "$windows_path"`
15690    WIN_SDK_BASE="$unix_path"
15691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15693    WIN_SDK_BASE="$unix_path"
15694  fi
15695
15696    if test -d "$WIN_SDK_BASE"; then
15697      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15698        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15699$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15700        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15701        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15702          VS_ENV_ARGS="/x86"
15703        else
15704          VS_ENV_ARGS="/x64"
15705        fi
15706      else
15707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15708$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15709        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15710$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15711      fi
15712    fi
15713  fi
15714
15715  fi
15716
15717  if test "x$VS_ENV_CMD" = x; then
15718    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15719    METHOD="well-known name"
15720
15721  windows_path="$WIN_SDK_BASE"
15722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15723    unix_path=`$CYGPATH -u "$windows_path"`
15724    WIN_SDK_BASE="$unix_path"
15725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15727    WIN_SDK_BASE="$unix_path"
15728  fi
15729
15730    if test -d "$WIN_SDK_BASE"; then
15731      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15733$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15734        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15735        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15736          VS_ENV_ARGS="/x86"
15737        else
15738          VS_ENV_ARGS="/x64"
15739        fi
15740      else
15741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15742$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15743        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15744$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15745      fi
15746    fi
15747  fi
15748
15749
15750  if test "x$VS_ENV_CMD" = x; then
15751    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15752    METHOD="well-known name"
15753
15754  windows_path="$WIN_SDK_BASE"
15755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15756    unix_path=`$CYGPATH -u "$windows_path"`
15757    WIN_SDK_BASE="$unix_path"
15758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15760    WIN_SDK_BASE="$unix_path"
15761  fi
15762
15763    if test -d "$WIN_SDK_BASE"; then
15764      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15765        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15766$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15767        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15768        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15769          VS_ENV_ARGS="/x86"
15770        else
15771          VS_ENV_ARGS="/x64"
15772        fi
15773      else
15774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15775$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15777$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15778      fi
15779    fi
15780  fi
15781
15782
15783  if test "x$VS100COMNTOOLS" != x; then
15784
15785  if test "x$VS_ENV_CMD" = x; then
15786    VS100BASE="$VS100COMNTOOLS/../.."
15787    METHOD="VS100COMNTOOLS variable"
15788
15789  windows_path="$VS100BASE"
15790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15791    unix_path=`$CYGPATH -u "$windows_path"`
15792    VS100BASE="$unix_path"
15793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15795    VS100BASE="$unix_path"
15796  fi
15797
15798    if test -d "$VS100BASE"; then
15799      if test -f "$VS100BASE/$VCVARSFILE"; then
15800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15801$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15802        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15803      else
15804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15805$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15808      fi
15809    fi
15810  fi
15811
15812  fi
15813  if test "x$PROGRAMFILES" != x; then
15814
15815  if test "x$VS_ENV_CMD" = x; then
15816    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
15817    METHOD="well-known name"
15818
15819  windows_path="$VS100BASE"
15820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15821    unix_path=`$CYGPATH -u "$windows_path"`
15822    VS100BASE="$unix_path"
15823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15825    VS100BASE="$unix_path"
15826  fi
15827
15828    if test -d "$VS100BASE"; then
15829      if test -f "$VS100BASE/$VCVARSFILE"; then
15830        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15831$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15832        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15833      else
15834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15835$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15836        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15837$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15838      fi
15839    fi
15840  fi
15841
15842  fi
15843
15844  if test "x$VS_ENV_CMD" = x; then
15845    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
15846    METHOD="well-known name"
15847
15848  windows_path="$VS100BASE"
15849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15850    unix_path=`$CYGPATH -u "$windows_path"`
15851    VS100BASE="$unix_path"
15852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15854    VS100BASE="$unix_path"
15855  fi
15856
15857    if test -d "$VS100BASE"; then
15858      if test -f "$VS100BASE/$VCVARSFILE"; then
15859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15860$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15861        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15862      else
15863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15864$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15866$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15867      fi
15868    fi
15869  fi
15870
15871
15872  if test "x$VS_ENV_CMD" = x; then
15873    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
15874    METHOD="well-known name"
15875
15876  windows_path="$VS100BASE"
15877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15878    unix_path=`$CYGPATH -u "$windows_path"`
15879    VS100BASE="$unix_path"
15880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15882    VS100BASE="$unix_path"
15883  fi
15884
15885    if test -d "$VS100BASE"; then
15886      if test -f "$VS100BASE/$VCVARSFILE"; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15888$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15889        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15890      else
15891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15892$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15893        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15894$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15895      fi
15896    fi
15897  fi
15898
15899
15900  if test "x$VS_ENV_CMD" != x; then
15901    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
15902
15903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15904
15905  # First separate the path from the arguments. This will split at the first
15906  # space.
15907  complete="$VS_ENV_CMD"
15908  path="${complete%% *}"
15909  tmp="$complete EOL"
15910  arguments="${tmp#* }"
15911
15912  # Input might be given as Windows format, start by converting to
15913  # unix format.
15914  new_path=`$CYGPATH -u "$path"`
15915
15916  # Now try to locate executable using which
15917  new_path=`$WHICH "$new_path" 2> /dev/null`
15918  if test "x$new_path" = x; then
15919    # Oops. Which didn't find the executable.
15920    # The splitting of arguments from the executable at a space might have been incorrect,
15921    # since paths with space are more likely in Windows. Give it another try with the whole
15922    # argument.
15923    path="$complete"
15924    arguments="EOL"
15925    new_path=`$CYGPATH -u "$path"`
15926    new_path=`$WHICH "$new_path" 2> /dev/null`
15927    if test "x$new_path" = x; then
15928      # It's still not found. Now this is an unrecoverable error.
15929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
15930$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
15931      has_space=`$ECHO "$complete" | $GREP " "`
15932      if test "x$has_space" != x; then
15933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15935      fi
15936      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
15937    fi
15938  fi
15939
15940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15943  # "foo.exe" is OK but "foo" is an error.
15944  #
15945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15946  # It is also a way to make sure we got the proper file name for the real test later on.
15947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15948  if test "x$test_shortpath" = x; then
15949    # Short path failed, file does not exist as specified.
15950    # Try adding .exe or .cmd
15951    if test -f "${new_path}.exe"; then
15952       input_to_shortpath="${new_path}.exe"
15953    elif test -f "${new_path}.cmd"; then
15954       input_to_shortpath="${new_path}.cmd"
15955    else
15956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
15957$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
15958      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15960      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
15961    fi
15962  else
15963    input_to_shortpath="$new_path"
15964  fi
15965
15966  # Call helper function which possibly converts this using DOS-style short mode.
15967  # If so, the updated path is stored in $new_path.
15968  new_path="$input_to_shortpath"
15969
15970  input_path="$input_to_shortpath"
15971  # Check if we need to convert this using DOS-style short mode. If the path
15972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15973  # take no chances and rewrite it.
15974  # Note: m4 eats our [], so we need to use [ and ] instead.
15975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15976  if test "x$has_forbidden_chars" != x; then
15977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15981      # Going to short mode and back again did indeed matter. Since short mode is
15982      # case insensitive, let's make it lowercase to improve readability.
15983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15984      # Now convert it back to Unix-stile (cygpath)
15985      input_path=`$CYGPATH -u "$shortmode_path"`
15986      new_path="$input_path"
15987    fi
15988  fi
15989
15990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15991  if test "x$test_cygdrive_prefix" = x; then
15992    # As a simple fix, exclude /usr/bin since it's not a real path.
15993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15995      # a path prefixed by /cygdrive for fixpath to work.
15996      new_path="$CYGWIN_ROOT_PATH$input_path"
15997    fi
15998  fi
15999
16000  # remove trailing .exe if any
16001  new_path="${new_path/%.exe/}"
16002
16003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16004
16005  # First separate the path from the arguments. This will split at the first
16006  # space.
16007  complete="$VS_ENV_CMD"
16008  path="${complete%% *}"
16009  tmp="$complete EOL"
16010  arguments="${tmp#* }"
16011
16012  # Input might be given as Windows format, start by converting to
16013  # unix format.
16014  new_path="$path"
16015
16016  windows_path="$new_path"
16017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16018    unix_path=`$CYGPATH -u "$windows_path"`
16019    new_path="$unix_path"
16020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16022    new_path="$unix_path"
16023  fi
16024
16025
16026  # Now try to locate executable using which
16027  new_path=`$WHICH "$new_path" 2> /dev/null`
16028
16029  if test "x$new_path" = x; then
16030    # Oops. Which didn't find the executable.
16031    # The splitting of arguments from the executable at a space might have been incorrect,
16032    # since paths with space are more likely in Windows. Give it another try with the whole
16033    # argument.
16034    path="$complete"
16035    arguments="EOL"
16036    new_path="$path"
16037
16038  windows_path="$new_path"
16039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16040    unix_path=`$CYGPATH -u "$windows_path"`
16041    new_path="$unix_path"
16042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16044    new_path="$unix_path"
16045  fi
16046
16047
16048    new_path=`$WHICH "$new_path" 2> /dev/null`
16049
16050    if test "x$new_path" = x; then
16051      # It's still not found. Now this is an unrecoverable error.
16052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16053$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16054      has_space=`$ECHO "$complete" | $GREP " "`
16055      if test "x$has_space" != x; then
16056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16058      fi
16059      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16060    fi
16061  fi
16062
16063  # Now new_path has a complete unix path to the binary
16064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16065    # Keep paths in /bin as-is, but remove trailing .exe if any
16066    new_path="${new_path/%.exe/}"
16067    # Do not save /bin paths to all_fixpath_prefixes!
16068  else
16069    # Not in mixed or Windows style, start by that.
16070    new_path=`cmd //c echo $new_path`
16071
16072  input_path="$new_path"
16073  # Check if we need to convert this using DOS-style short mode. If the path
16074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16075  # take no chances and rewrite it.
16076  # Note: m4 eats our [], so we need to use [ and ] instead.
16077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16078  if test "x$has_forbidden_chars" != x; then
16079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16081  fi
16082
16083    # Output is in $new_path
16084
16085  windows_path="$new_path"
16086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16087    unix_path=`$CYGPATH -u "$windows_path"`
16088    new_path="$unix_path"
16089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16091    new_path="$unix_path"
16092  fi
16093
16094    # remove trailing .exe if any
16095    new_path="${new_path/%.exe/}"
16096
16097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16099  fi
16100
16101  else
16102    # We're on a posix platform. Hooray! :)
16103    # First separate the path from the arguments. This will split at the first
16104    # space.
16105    complete="$VS_ENV_CMD"
16106    path="${complete%% *}"
16107    tmp="$complete EOL"
16108    arguments="${tmp#* }"
16109
16110    new_path=`$WHICH $path 2> /dev/null`
16111    if test "x$new_path" = x; then
16112      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16113      if test "x$is_absolute_path" != x; then
16114        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16115$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16116        new_path="$path"
16117      else
16118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16119$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16120        has_space=`$ECHO "$complete" | $GREP " "`
16121        if test "x$has_space" != x; then
16122          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16123$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16124        fi
16125        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16126      fi
16127    fi
16128  fi
16129
16130  # Now join together the path and the arguments once again
16131  if test "x$arguments" != xEOL; then
16132      new_complete="$new_path ${arguments% *}"
16133  else
16134      new_complete="$new_path"
16135  fi
16136
16137  if test "x$complete" != "x$new_complete"; then
16138    VS_ENV_CMD="$new_complete"
16139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16140$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16141  fi
16142
16143
16144    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16145    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16146$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16147    cd $OUTPUT_ROOT
16148    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16149    # to autoconf standards.
16150
16151    #----
16152
16153    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16154    # but calculate the difference in Cygwin environment before/after running it and then
16155    # apply the diff.
16156
16157    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16158      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16159      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16160      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16161    else
16162      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16163      _dosbash=`cmd //c echo \`which bash\``
16164    fi
16165
16166    # generate the set of exported vars before/after the vs10 setup
16167    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16168    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16169    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16170    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16171
16172    # Now execute the newly created bat file.
16173    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16174    cmd /c localdevenvtmp.bat | cat
16175
16176    # apply the diff (less some non-vs10 vars named by "!")
16177    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16178    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16179    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16180
16181    # cleanup
16182    $RM localdevenvtmp*
16183    #----
16184    cd $CURDIR
16185    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16187$as_echo "no" >&6; }
16188      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16189$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16190      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16191$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16192      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16193$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16194      as_fn_error $? "Cannot continue" "$LINENO" 5
16195    fi
16196
16197    # Now set all paths and other env variables. This will allow the rest of
16198    # the configure script to find and run the compiler in the proper way.
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16200$as_echo "$as_me: Setting extracted environment variables" >&6;}
16201    . $OUTPUT_ROOT/localdevenv.sh
16202  else
16203    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16204    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16205$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16206  fi
16207
16208  # At this point, we should have corrent variables in the environment, or we can't continue.
16209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16210$as_echo_n "checking for Visual Studio variables... " >&6; }
16211
16212  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16213    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16215$as_echo "present but broken" >&6; }
16216      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16217    else
16218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16219$as_echo "ok" >&6; }
16220      VS_INCLUDE="$INCLUDE"
16221      VS_LIB="$LIB"
16222      VS_PATH="$PATH"
16223
16224
16225
16226    fi
16227  else
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16229$as_echo "not found" >&6; }
16230
16231    if test "x$VS_ENV_CMD" = x; then
16232      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16233$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16234      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16235$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16236    else
16237      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16238$as_echo "$as_me: Running the extraction script failed." >&6;}
16239    fi
16240    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16241$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16242    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16243$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16244    as_fn_error $? "Cannot continue" "$LINENO" 5
16245  fi
16246
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16248$as_echo_n "checking for msvcr100.dll... " >&6; }
16249
16250# Check whether --with-msvcr-dll was given.
16251if test "${with_msvcr_dll+set}" = set; then :
16252  withval=$with_msvcr_dll;
16253fi
16254
16255  if test "x$with_msvcr_dll" != x; then
16256    MSVCR_DLL="$with_msvcr_dll"
16257  else
16258    if test "x$VCINSTALLDIR" != x; then
16259      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16260        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16261      else
16262        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16263        if test "x$MSVCR_DLL" = x; then
16264          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16265        fi
16266      fi
16267      if test "x$MSVCR_DLL" != x; then
16268        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16269$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16270      else
16271        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16272$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16273      fi
16274    fi
16275    if test "x$MSVCR_DLL" = x; then
16276      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16278$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16279        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16280      fi
16281    fi
16282  fi
16283  if test "x$MSVCR_DLL" = x; then
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16285$as_echo "no" >&6; }
16286    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16287  fi
16288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16289$as_echo "$MSVCR_DLL" >&6; }
16290
16291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16292
16293  # Input might be given as Windows format, start by converting to
16294  # unix format.
16295  path="$MSVCR_DLL"
16296  new_path=`$CYGPATH -u "$path"`
16297
16298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16301  # "foo.exe" is OK but "foo" is an error.
16302  #
16303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16304  # It is also a way to make sure we got the proper file name for the real test later on.
16305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16306  if test "x$test_shortpath" = x; then
16307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16308$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16309    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16310  fi
16311
16312  # Call helper function which possibly converts this using DOS-style short mode.
16313  # If so, the updated path is stored in $new_path.
16314
16315  input_path="$new_path"
16316  # Check if we need to convert this using DOS-style short mode. If the path
16317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16318  # take no chances and rewrite it.
16319  # Note: m4 eats our [], so we need to use [ and ] instead.
16320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16321  if test "x$has_forbidden_chars" != x; then
16322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16326      # Going to short mode and back again did indeed matter. Since short mode is
16327      # case insensitive, let's make it lowercase to improve readability.
16328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16329      # Now convert it back to Unix-stile (cygpath)
16330      input_path=`$CYGPATH -u "$shortmode_path"`
16331      new_path="$input_path"
16332    fi
16333  fi
16334
16335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16336  if test "x$test_cygdrive_prefix" = x; then
16337    # As a simple fix, exclude /usr/bin since it's not a real path.
16338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16340      # a path prefixed by /cygdrive for fixpath to work.
16341      new_path="$CYGWIN_ROOT_PATH$input_path"
16342    fi
16343  fi
16344
16345
16346  if test "x$path" != "x$new_path"; then
16347    MSVCR_DLL="$new_path"
16348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16349$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16350  fi
16351
16352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16353
16354  path="$MSVCR_DLL"
16355  has_colon=`$ECHO $path | $GREP ^.:`
16356  new_path="$path"
16357  if test "x$has_colon" = x; then
16358    # Not in mixed or Windows style, start by that.
16359    new_path=`cmd //c echo $path`
16360  fi
16361
16362
16363  input_path="$new_path"
16364  # Check if we need to convert this using DOS-style short mode. If the path
16365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16366  # take no chances and rewrite it.
16367  # Note: m4 eats our [], so we need to use [ and ] instead.
16368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16369  if test "x$has_forbidden_chars" != x; then
16370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16372  fi
16373
16374
16375  windows_path="$new_path"
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    unix_path=`$CYGPATH -u "$windows_path"`
16378    new_path="$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    new_path="$unix_path"
16382  fi
16383
16384  if test "x$path" != "x$new_path"; then
16385    MSVCR_DLL="$new_path"
16386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16387$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16388  fi
16389
16390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16392
16393  else
16394    # We're on a posix platform. Hooray! :)
16395    path="$MSVCR_DLL"
16396
16397    if test ! -f "$path" && test ! -d "$path"; then
16398      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16399    fi
16400
16401    has_space=`$ECHO "$path" | $GREP " "`
16402    if test "x$has_space" != x; then
16403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16404$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16406    fi
16407  fi
16408
16409
16410fi
16411
16412
16413
16414# If --build AND --host is set, then the configure script will find any
16415# cross compilation tools in the PATH. Cross compilation tools
16416# follows the cross compilation standard where they are prefixed with ${host}.
16417# For example the binary i686-sun-solaris2.10-gcc
16418# will cross compile for i686-sun-solaris2.10
16419# If neither of build and host is not set, then build=host and the
16420# default compiler found in the path will be used.
16421# Setting only --host, does not seem to be really supported.
16422# Please set both --build and --host if you want to cross compile.
16423
16424if test "x$COMPILE_TYPE" = "xcross"; then
16425    # Now we to find a C/C++ compiler that can build executables for the build
16426    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16427    # once. Also, we need to do this before adding a tools dir to the path,
16428    # otherwise we might pick up cross-compilers which don't use standard naming.
16429    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16430    # to wait until they are properly discovered.
16431    for ac_prog in cl cc gcc
16432do
16433  # Extract the first word of "$ac_prog", so it can be a program name with args.
16434set dummy $ac_prog; ac_word=$2
16435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16436$as_echo_n "checking for $ac_word... " >&6; }
16437if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16438  $as_echo_n "(cached) " >&6
16439else
16440  case $BUILD_CC in
16441  [\\/]* | ?:[\\/]*)
16442  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16443  ;;
16444  *)
16445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16446for as_dir in $PATH
16447do
16448  IFS=$as_save_IFS
16449  test -z "$as_dir" && as_dir=.
16450    for ac_exec_ext in '' $ac_executable_extensions; do
16451  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16452    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16454    break 2
16455  fi
16456done
16457  done
16458IFS=$as_save_IFS
16459
16460  ;;
16461esac
16462fi
16463BUILD_CC=$ac_cv_path_BUILD_CC
16464if test -n "$BUILD_CC"; then
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16466$as_echo "$BUILD_CC" >&6; }
16467else
16468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16469$as_echo "no" >&6; }
16470fi
16471
16472
16473  test -n "$BUILD_CC" && break
16474done
16475
16476
16477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478
16479  # First separate the path from the arguments. This will split at the first
16480  # space.
16481  complete="$BUILD_CC"
16482  path="${complete%% *}"
16483  tmp="$complete EOL"
16484  arguments="${tmp#* }"
16485
16486  # Input might be given as Windows format, start by converting to
16487  # unix format.
16488  new_path=`$CYGPATH -u "$path"`
16489
16490  # Now try to locate executable using which
16491  new_path=`$WHICH "$new_path" 2> /dev/null`
16492  if test "x$new_path" = x; then
16493    # Oops. Which didn't find the executable.
16494    # The splitting of arguments from the executable at a space might have been incorrect,
16495    # since paths with space are more likely in Windows. Give it another try with the whole
16496    # argument.
16497    path="$complete"
16498    arguments="EOL"
16499    new_path=`$CYGPATH -u "$path"`
16500    new_path=`$WHICH "$new_path" 2> /dev/null`
16501    if test "x$new_path" = x; then
16502      # It's still not found. Now this is an unrecoverable error.
16503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16504$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16505      has_space=`$ECHO "$complete" | $GREP " "`
16506      if test "x$has_space" != x; then
16507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16509      fi
16510      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16511    fi
16512  fi
16513
16514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16517  # "foo.exe" is OK but "foo" is an error.
16518  #
16519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16520  # It is also a way to make sure we got the proper file name for the real test later on.
16521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16522  if test "x$test_shortpath" = x; then
16523    # Short path failed, file does not exist as specified.
16524    # Try adding .exe or .cmd
16525    if test -f "${new_path}.exe"; then
16526       input_to_shortpath="${new_path}.exe"
16527    elif test -f "${new_path}.cmd"; then
16528       input_to_shortpath="${new_path}.cmd"
16529    else
16530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16531$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16532      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16533$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16534      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16535    fi
16536  else
16537    input_to_shortpath="$new_path"
16538  fi
16539
16540  # Call helper function which possibly converts this using DOS-style short mode.
16541  # If so, the updated path is stored in $new_path.
16542  new_path="$input_to_shortpath"
16543
16544  input_path="$input_to_shortpath"
16545  # Check if we need to convert this using DOS-style short mode. If the path
16546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16547  # take no chances and rewrite it.
16548  # Note: m4 eats our [], so we need to use [ and ] instead.
16549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16550  if test "x$has_forbidden_chars" != x; then
16551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16555      # Going to short mode and back again did indeed matter. Since short mode is
16556      # case insensitive, let's make it lowercase to improve readability.
16557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16558      # Now convert it back to Unix-stile (cygpath)
16559      input_path=`$CYGPATH -u "$shortmode_path"`
16560      new_path="$input_path"
16561    fi
16562  fi
16563
16564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16565  if test "x$test_cygdrive_prefix" = x; then
16566    # As a simple fix, exclude /usr/bin since it's not a real path.
16567    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16569      # a path prefixed by /cygdrive for fixpath to work.
16570      new_path="$CYGWIN_ROOT_PATH$input_path"
16571    fi
16572  fi
16573
16574  # remove trailing .exe if any
16575  new_path="${new_path/%.exe/}"
16576
16577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16578
16579  # First separate the path from the arguments. This will split at the first
16580  # space.
16581  complete="$BUILD_CC"
16582  path="${complete%% *}"
16583  tmp="$complete EOL"
16584  arguments="${tmp#* }"
16585
16586  # Input might be given as Windows format, start by converting to
16587  # unix format.
16588  new_path="$path"
16589
16590  windows_path="$new_path"
16591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16592    unix_path=`$CYGPATH -u "$windows_path"`
16593    new_path="$unix_path"
16594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16596    new_path="$unix_path"
16597  fi
16598
16599
16600  # Now try to locate executable using which
16601  new_path=`$WHICH "$new_path" 2> /dev/null`
16602
16603  if test "x$new_path" = x; then
16604    # Oops. Which didn't find the executable.
16605    # The splitting of arguments from the executable at a space might have been incorrect,
16606    # since paths with space are more likely in Windows. Give it another try with the whole
16607    # argument.
16608    path="$complete"
16609    arguments="EOL"
16610    new_path="$path"
16611
16612  windows_path="$new_path"
16613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16614    unix_path=`$CYGPATH -u "$windows_path"`
16615    new_path="$unix_path"
16616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16618    new_path="$unix_path"
16619  fi
16620
16621
16622    new_path=`$WHICH "$new_path" 2> /dev/null`
16623
16624    if test "x$new_path" = x; then
16625      # It's still not found. Now this is an unrecoverable error.
16626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16627$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16628      has_space=`$ECHO "$complete" | $GREP " "`
16629      if test "x$has_space" != x; then
16630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16632      fi
16633      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16634    fi
16635  fi
16636
16637  # Now new_path has a complete unix path to the binary
16638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16639    # Keep paths in /bin as-is, but remove trailing .exe if any
16640    new_path="${new_path/%.exe/}"
16641    # Do not save /bin paths to all_fixpath_prefixes!
16642  else
16643    # Not in mixed or Windows style, start by that.
16644    new_path=`cmd //c echo $new_path`
16645
16646  input_path="$new_path"
16647  # Check if we need to convert this using DOS-style short mode. If the path
16648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16649  # take no chances and rewrite it.
16650  # Note: m4 eats our [], so we need to use [ and ] instead.
16651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16652  if test "x$has_forbidden_chars" != x; then
16653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16655  fi
16656
16657    # Output is in $new_path
16658
16659  windows_path="$new_path"
16660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16661    unix_path=`$CYGPATH -u "$windows_path"`
16662    new_path="$unix_path"
16663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16665    new_path="$unix_path"
16666  fi
16667
16668    # remove trailing .exe if any
16669    new_path="${new_path/%.exe/}"
16670
16671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16673  fi
16674
16675  else
16676    # We're on a posix platform. Hooray! :)
16677    # First separate the path from the arguments. This will split at the first
16678    # space.
16679    complete="$BUILD_CC"
16680    path="${complete%% *}"
16681    tmp="$complete EOL"
16682    arguments="${tmp#* }"
16683
16684    new_path=`$WHICH $path 2> /dev/null`
16685    if test "x$new_path" = x; then
16686      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16687      if test "x$is_absolute_path" != x; then
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16689$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16690        new_path="$path"
16691      else
16692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16693$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16694        has_space=`$ECHO "$complete" | $GREP " "`
16695        if test "x$has_space" != x; then
16696          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16697$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16698        fi
16699        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16700      fi
16701    fi
16702  fi
16703
16704  # Now join together the path and the arguments once again
16705  if test "x$arguments" != xEOL; then
16706      new_complete="$new_path ${arguments% *}"
16707  else
16708      new_complete="$new_path"
16709  fi
16710
16711  if test "x$complete" != "x$new_complete"; then
16712    BUILD_CC="$new_complete"
16713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16714$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16715  fi
16716
16717    for ac_prog in cl CC g++
16718do
16719  # Extract the first word of "$ac_prog", so it can be a program name with args.
16720set dummy $ac_prog; ac_word=$2
16721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16722$as_echo_n "checking for $ac_word... " >&6; }
16723if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
16724  $as_echo_n "(cached) " >&6
16725else
16726  case $BUILD_CXX in
16727  [\\/]* | ?:[\\/]*)
16728  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16729  ;;
16730  *)
16731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16732for as_dir in $PATH
16733do
16734  IFS=$as_save_IFS
16735  test -z "$as_dir" && as_dir=.
16736    for ac_exec_ext in '' $ac_executable_extensions; do
16737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16738    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16740    break 2
16741  fi
16742done
16743  done
16744IFS=$as_save_IFS
16745
16746  ;;
16747esac
16748fi
16749BUILD_CXX=$ac_cv_path_BUILD_CXX
16750if test -n "$BUILD_CXX"; then
16751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
16752$as_echo "$BUILD_CXX" >&6; }
16753else
16754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16755$as_echo "no" >&6; }
16756fi
16757
16758
16759  test -n "$BUILD_CXX" && break
16760done
16761
16762
16763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16764
16765  # First separate the path from the arguments. This will split at the first
16766  # space.
16767  complete="$BUILD_CXX"
16768  path="${complete%% *}"
16769  tmp="$complete EOL"
16770  arguments="${tmp#* }"
16771
16772  # Input might be given as Windows format, start by converting to
16773  # unix format.
16774  new_path=`$CYGPATH -u "$path"`
16775
16776  # Now try to locate executable using which
16777  new_path=`$WHICH "$new_path" 2> /dev/null`
16778  if test "x$new_path" = x; then
16779    # Oops. Which didn't find the executable.
16780    # The splitting of arguments from the executable at a space might have been incorrect,
16781    # since paths with space are more likely in Windows. Give it another try with the whole
16782    # argument.
16783    path="$complete"
16784    arguments="EOL"
16785    new_path=`$CYGPATH -u "$path"`
16786    new_path=`$WHICH "$new_path" 2> /dev/null`
16787    if test "x$new_path" = x; then
16788      # It's still not found. Now this is an unrecoverable error.
16789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16790$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16791      has_space=`$ECHO "$complete" | $GREP " "`
16792      if test "x$has_space" != x; then
16793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16795      fi
16796      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16797    fi
16798  fi
16799
16800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16803  # "foo.exe" is OK but "foo" is an error.
16804  #
16805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16806  # It is also a way to make sure we got the proper file name for the real test later on.
16807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16808  if test "x$test_shortpath" = x; then
16809    # Short path failed, file does not exist as specified.
16810    # Try adding .exe or .cmd
16811    if test -f "${new_path}.exe"; then
16812       input_to_shortpath="${new_path}.exe"
16813    elif test -f "${new_path}.cmd"; then
16814       input_to_shortpath="${new_path}.cmd"
16815    else
16816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
16817$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
16818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16820      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16821    fi
16822  else
16823    input_to_shortpath="$new_path"
16824  fi
16825
16826  # Call helper function which possibly converts this using DOS-style short mode.
16827  # If so, the updated path is stored in $new_path.
16828  new_path="$input_to_shortpath"
16829
16830  input_path="$input_to_shortpath"
16831  # Check if we need to convert this using DOS-style short mode. If the path
16832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16833  # take no chances and rewrite it.
16834  # Note: m4 eats our [], so we need to use [ and ] instead.
16835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16836  if test "x$has_forbidden_chars" != x; then
16837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16841      # Going to short mode and back again did indeed matter. Since short mode is
16842      # case insensitive, let's make it lowercase to improve readability.
16843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16844      # Now convert it back to Unix-stile (cygpath)
16845      input_path=`$CYGPATH -u "$shortmode_path"`
16846      new_path="$input_path"
16847    fi
16848  fi
16849
16850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16851  if test "x$test_cygdrive_prefix" = x; then
16852    # As a simple fix, exclude /usr/bin since it's not a real path.
16853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16855      # a path prefixed by /cygdrive for fixpath to work.
16856      new_path="$CYGWIN_ROOT_PATH$input_path"
16857    fi
16858  fi
16859
16860  # remove trailing .exe if any
16861  new_path="${new_path/%.exe/}"
16862
16863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16864
16865  # First separate the path from the arguments. This will split at the first
16866  # space.
16867  complete="$BUILD_CXX"
16868  path="${complete%% *}"
16869  tmp="$complete EOL"
16870  arguments="${tmp#* }"
16871
16872  # Input might be given as Windows format, start by converting to
16873  # unix format.
16874  new_path="$path"
16875
16876  windows_path="$new_path"
16877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16878    unix_path=`$CYGPATH -u "$windows_path"`
16879    new_path="$unix_path"
16880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16882    new_path="$unix_path"
16883  fi
16884
16885
16886  # Now try to locate executable using which
16887  new_path=`$WHICH "$new_path" 2> /dev/null`
16888
16889  if test "x$new_path" = x; then
16890    # Oops. Which didn't find the executable.
16891    # The splitting of arguments from the executable at a space might have been incorrect,
16892    # since paths with space are more likely in Windows. Give it another try with the whole
16893    # argument.
16894    path="$complete"
16895    arguments="EOL"
16896    new_path="$path"
16897
16898  windows_path="$new_path"
16899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16900    unix_path=`$CYGPATH -u "$windows_path"`
16901    new_path="$unix_path"
16902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16904    new_path="$unix_path"
16905  fi
16906
16907
16908    new_path=`$WHICH "$new_path" 2> /dev/null`
16909
16910    if test "x$new_path" = x; then
16911      # It's still not found. Now this is an unrecoverable error.
16912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16913$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16914      has_space=`$ECHO "$complete" | $GREP " "`
16915      if test "x$has_space" != x; then
16916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16918      fi
16919      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16920    fi
16921  fi
16922
16923  # Now new_path has a complete unix path to the binary
16924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16925    # Keep paths in /bin as-is, but remove trailing .exe if any
16926    new_path="${new_path/%.exe/}"
16927    # Do not save /bin paths to all_fixpath_prefixes!
16928  else
16929    # Not in mixed or Windows style, start by that.
16930    new_path=`cmd //c echo $new_path`
16931
16932  input_path="$new_path"
16933  # Check if we need to convert this using DOS-style short mode. If the path
16934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16935  # take no chances and rewrite it.
16936  # Note: m4 eats our [], so we need to use [ and ] instead.
16937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16938  if test "x$has_forbidden_chars" != x; then
16939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16941  fi
16942
16943    # Output is in $new_path
16944
16945  windows_path="$new_path"
16946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947    unix_path=`$CYGPATH -u "$windows_path"`
16948    new_path="$unix_path"
16949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16951    new_path="$unix_path"
16952  fi
16953
16954    # remove trailing .exe if any
16955    new_path="${new_path/%.exe/}"
16956
16957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16959  fi
16960
16961  else
16962    # We're on a posix platform. Hooray! :)
16963    # First separate the path from the arguments. This will split at the first
16964    # space.
16965    complete="$BUILD_CXX"
16966    path="${complete%% *}"
16967    tmp="$complete EOL"
16968    arguments="${tmp#* }"
16969
16970    new_path=`$WHICH $path 2> /dev/null`
16971    if test "x$new_path" = x; then
16972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16973      if test "x$is_absolute_path" != x; then
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
16975$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
16976        new_path="$path"
16977      else
16978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16979$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16980        has_space=`$ECHO "$complete" | $GREP " "`
16981        if test "x$has_space" != x; then
16982          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16983$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16984        fi
16985        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16986      fi
16987    fi
16988  fi
16989
16990  # Now join together the path and the arguments once again
16991  if test "x$arguments" != xEOL; then
16992      new_complete="$new_path ${arguments% *}"
16993  else
16994      new_complete="$new_path"
16995  fi
16996
16997  if test "x$complete" != "x$new_complete"; then
16998    BUILD_CXX="$new_complete"
16999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17000$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17001  fi
17002
17003    # Extract the first word of "ld", so it can be a program name with args.
17004set dummy ld; ac_word=$2
17005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17006$as_echo_n "checking for $ac_word... " >&6; }
17007if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17008  $as_echo_n "(cached) " >&6
17009else
17010  case $BUILD_LD in
17011  [\\/]* | ?:[\\/]*)
17012  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17013  ;;
17014  *)
17015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17016for as_dir in $PATH
17017do
17018  IFS=$as_save_IFS
17019  test -z "$as_dir" && as_dir=.
17020    for ac_exec_ext in '' $ac_executable_extensions; do
17021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17022    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17024    break 2
17025  fi
17026done
17027  done
17028IFS=$as_save_IFS
17029
17030  ;;
17031esac
17032fi
17033BUILD_LD=$ac_cv_path_BUILD_LD
17034if test -n "$BUILD_LD"; then
17035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17036$as_echo "$BUILD_LD" >&6; }
17037else
17038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17039$as_echo "no" >&6; }
17040fi
17041
17042
17043
17044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17045
17046  # First separate the path from the arguments. This will split at the first
17047  # space.
17048  complete="$BUILD_LD"
17049  path="${complete%% *}"
17050  tmp="$complete EOL"
17051  arguments="${tmp#* }"
17052
17053  # Input might be given as Windows format, start by converting to
17054  # unix format.
17055  new_path=`$CYGPATH -u "$path"`
17056
17057  # Now try to locate executable using which
17058  new_path=`$WHICH "$new_path" 2> /dev/null`
17059  if test "x$new_path" = x; then
17060    # Oops. Which didn't find the executable.
17061    # The splitting of arguments from the executable at a space might have been incorrect,
17062    # since paths with space are more likely in Windows. Give it another try with the whole
17063    # argument.
17064    path="$complete"
17065    arguments="EOL"
17066    new_path=`$CYGPATH -u "$path"`
17067    new_path=`$WHICH "$new_path" 2> /dev/null`
17068    if test "x$new_path" = x; then
17069      # It's still not found. Now this is an unrecoverable error.
17070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17071$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17072      has_space=`$ECHO "$complete" | $GREP " "`
17073      if test "x$has_space" != x; then
17074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17076      fi
17077      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17078    fi
17079  fi
17080
17081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17084  # "foo.exe" is OK but "foo" is an error.
17085  #
17086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17087  # It is also a way to make sure we got the proper file name for the real test later on.
17088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17089  if test "x$test_shortpath" = x; then
17090    # Short path failed, file does not exist as specified.
17091    # Try adding .exe or .cmd
17092    if test -f "${new_path}.exe"; then
17093       input_to_shortpath="${new_path}.exe"
17094    elif test -f "${new_path}.cmd"; then
17095       input_to_shortpath="${new_path}.cmd"
17096    else
17097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17098$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17101      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17102    fi
17103  else
17104    input_to_shortpath="$new_path"
17105  fi
17106
17107  # Call helper function which possibly converts this using DOS-style short mode.
17108  # If so, the updated path is stored in $new_path.
17109  new_path="$input_to_shortpath"
17110
17111  input_path="$input_to_shortpath"
17112  # Check if we need to convert this using DOS-style short mode. If the path
17113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17114  # take no chances and rewrite it.
17115  # Note: m4 eats our [], so we need to use [ and ] instead.
17116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17117  if test "x$has_forbidden_chars" != x; then
17118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17122      # Going to short mode and back again did indeed matter. Since short mode is
17123      # case insensitive, let's make it lowercase to improve readability.
17124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17125      # Now convert it back to Unix-stile (cygpath)
17126      input_path=`$CYGPATH -u "$shortmode_path"`
17127      new_path="$input_path"
17128    fi
17129  fi
17130
17131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17132  if test "x$test_cygdrive_prefix" = x; then
17133    # As a simple fix, exclude /usr/bin since it's not a real path.
17134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17136      # a path prefixed by /cygdrive for fixpath to work.
17137      new_path="$CYGWIN_ROOT_PATH$input_path"
17138    fi
17139  fi
17140
17141  # remove trailing .exe if any
17142  new_path="${new_path/%.exe/}"
17143
17144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17145
17146  # First separate the path from the arguments. This will split at the first
17147  # space.
17148  complete="$BUILD_LD"
17149  path="${complete%% *}"
17150  tmp="$complete EOL"
17151  arguments="${tmp#* }"
17152
17153  # Input might be given as Windows format, start by converting to
17154  # unix format.
17155  new_path="$path"
17156
17157  windows_path="$new_path"
17158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17159    unix_path=`$CYGPATH -u "$windows_path"`
17160    new_path="$unix_path"
17161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17163    new_path="$unix_path"
17164  fi
17165
17166
17167  # Now try to locate executable using which
17168  new_path=`$WHICH "$new_path" 2> /dev/null`
17169
17170  if test "x$new_path" = x; then
17171    # Oops. Which didn't find the executable.
17172    # The splitting of arguments from the executable at a space might have been incorrect,
17173    # since paths with space are more likely in Windows. Give it another try with the whole
17174    # argument.
17175    path="$complete"
17176    arguments="EOL"
17177    new_path="$path"
17178
17179  windows_path="$new_path"
17180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17181    unix_path=`$CYGPATH -u "$windows_path"`
17182    new_path="$unix_path"
17183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17185    new_path="$unix_path"
17186  fi
17187
17188
17189    new_path=`$WHICH "$new_path" 2> /dev/null`
17190
17191    if test "x$new_path" = x; then
17192      # It's still not found. Now this is an unrecoverable error.
17193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17194$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17195      has_space=`$ECHO "$complete" | $GREP " "`
17196      if test "x$has_space" != x; then
17197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17199      fi
17200      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17201    fi
17202  fi
17203
17204  # Now new_path has a complete unix path to the binary
17205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17206    # Keep paths in /bin as-is, but remove trailing .exe if any
17207    new_path="${new_path/%.exe/}"
17208    # Do not save /bin paths to all_fixpath_prefixes!
17209  else
17210    # Not in mixed or Windows style, start by that.
17211    new_path=`cmd //c echo $new_path`
17212
17213  input_path="$new_path"
17214  # Check if we need to convert this using DOS-style short mode. If the path
17215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17216  # take no chances and rewrite it.
17217  # Note: m4 eats our [], so we need to use [ and ] instead.
17218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17219  if test "x$has_forbidden_chars" != x; then
17220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17222  fi
17223
17224    # Output is in $new_path
17225
17226  windows_path="$new_path"
17227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17228    unix_path=`$CYGPATH -u "$windows_path"`
17229    new_path="$unix_path"
17230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17232    new_path="$unix_path"
17233  fi
17234
17235    # remove trailing .exe if any
17236    new_path="${new_path/%.exe/}"
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  fi
17241
17242  else
17243    # We're on a posix platform. Hooray! :)
17244    # First separate the path from the arguments. This will split at the first
17245    # space.
17246    complete="$BUILD_LD"
17247    path="${complete%% *}"
17248    tmp="$complete EOL"
17249    arguments="${tmp#* }"
17250
17251    new_path=`$WHICH $path 2> /dev/null`
17252    if test "x$new_path" = x; then
17253      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17254      if test "x$is_absolute_path" != x; then
17255        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17256$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17257        new_path="$path"
17258      else
17259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17260$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17261        has_space=`$ECHO "$complete" | $GREP " "`
17262        if test "x$has_space" != x; then
17263          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17264$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17265        fi
17266        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17267      fi
17268    fi
17269  fi
17270
17271  # Now join together the path and the arguments once again
17272  if test "x$arguments" != xEOL; then
17273      new_complete="$new_path ${arguments% *}"
17274  else
17275      new_complete="$new_path"
17276  fi
17277
17278  if test "x$complete" != "x$new_complete"; then
17279    BUILD_LD="$new_complete"
17280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17281$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17282  fi
17283
17284fi
17285
17286
17287
17288
17289# If a devkit is found on the builddeps server, then prepend its path to the
17290# PATH variable. If there are cross compilers available in the devkit, these
17291# will be found by AC_PROG_CC et al.
17292DEVKIT=
17293
17294
17295    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17296        # Source the builddeps file again, to make sure it uses the latest variables!
17297        . $builddepsfile
17298        # Look for a target and build machine specific resource!
17299        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17300        if test "x$resource" = x; then
17301            # Ok, lets instead look for a target specific resource
17302            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17303        fi
17304        if test "x$resource" = x; then
17305            # Ok, lets instead look for a build specific resource
17306            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17307        fi
17308        if test "x$resource" = x; then
17309            # Ok, lets instead look for a generic resource
17310            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17311            resource=${builddep_devkit}
17312        fi
17313        if test "x$resource" != x; then
17314            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17315$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17316	    # If the resource in the builddeps.conf file is an existing directory,
17317	    # for example /java/linux/cups
17318	    if test -d ${resource}; then
17319	       depdir=${resource}
17320	    else
17321
17322# devkit is for example mymodule
17323# $resource is for example libs/general/libmymod_1_2_3.zip
17324# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17325# $with_builddeps_dir is for example /localhome/builddeps
17326# depdir is the name of the variable into which we store the depdir, eg MYMOD
17327# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17328# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17329    filename=`basename $resource`
17330    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17331    filebase=${filename%%.*}
17332    extension=${filename#*.}
17333    installdir=$with_builddeps_dir/$filebase
17334    if test ! -f $installdir/$filename.unpacked; then
17335        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17336$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17337        if test ! -d $installdir; then
17338            mkdir -p $installdir
17339        fi
17340        if test ! -d $installdir; then
17341            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17342        fi
17343        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17344        touch $tmpfile
17345        if test ! -f $tmpfile; then
17346            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17347        fi
17348
17349    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17350    # $tmpfile is the local file name for the downloaded file.
17351    VALID_TOOL=no
17352    if test "x$BDEPS_FTP" = xwget; then
17353       VALID_TOOL=yes
17354       wget -O $tmpfile $with_builddeps_server/$resource
17355    fi
17356    if test "x$BDEPS_FTP" = xlftp; then
17357       VALID_TOOL=yes
17358       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17359    fi
17360    if test "x$BDEPS_FTP" = xftp; then
17361        VALID_TOOL=yes
17362        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17363        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17364        FTPUSERPWD=${FTPSERVER%%@*}
17365        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17366            FTPUSER=${userpwd%%:*}
17367            FTPPWD=${userpwd#*@}
17368            FTPSERVER=${FTPSERVER#*@}
17369        else
17370            FTPUSER=ftp
17371            FTPPWD=ftp
17372        fi
17373        # the "pass" command does not work on some
17374        # ftp clients (read ftp.exe) but if it works,
17375        # passive mode is better!
17376        (\
17377            echo "user $FTPUSER $FTPPWD"        ;\
17378            echo "pass"                         ;\
17379            echo "bin"                          ;\
17380            echo "get $FTPPATH $tmpfile"              ;\
17381        ) | ftp -in $FTPSERVER
17382    fi
17383    if test "x$VALID_TOOL" != xyes; then
17384       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17385    fi
17386
17387        mv $tmpfile $installdir/$filename
17388        if test ! -s $installdir/$filename; then
17389            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17390        fi
17391        case "$extension" in
17392            zip)  echo "Unzipping $installdir/$filename..."
17393               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17394            ;;
17395            tar.gz) echo "Untaring $installdir/$filename..."
17396               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17397            ;;
17398            tgz) echo "Untaring $installdir/$filename..."
17399               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17400            ;;
17401            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17402            ;;
17403        esac
17404    fi
17405    if test -f $installdir/$filename.unpacked; then
17406        depdir=$installdir
17407    fi
17408
17409	    fi
17410            # Source the builddeps file again, because in the previous command, the depdir
17411            # was updated to point at the current build dependency install directory.
17412            . $builddepsfile
17413            # Now extract variables from the builddeps.conf files.
17414            theroot=${builddep_devkit_ROOT}
17415            thecflags=${builddep_devkit_CFLAGS}
17416            thelibs=${builddep_devkit_LIBS}
17417            if test "x$depdir" = x; then
17418                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17419            fi
17420            DEVKIT=$depdir
17421            if test "x$theroot" != x; then
17422               DEVKIT="$theroot"
17423            fi
17424            if test "x$thecflags" != x; then
17425               DEVKIT_CFLAGS="$thecflags"
17426            fi
17427            if test "x$thelibs" != x; then
17428               DEVKIT_LIBS="$thelibs"
17429            fi
17430            # Found devkit
17431                     PATH="$DEVKIT/bin:$PATH"
17432                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17433                     if test "x$x_includes" = "xNONE"; then
17434                         x_includes="$SYS_ROOT/usr/include/X11"
17435                     fi
17436                     if test "x$x_libraries" = "xNONE"; then
17437                         x_libraries="$SYS_ROOT/usr/lib"
17438                     fi
17439
17440
17441        fi
17442
17443    fi
17444
17445
17446if test "x$SYS_ROOT" != "x/" ; then
17447    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17448    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17449    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17450    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17451    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17452    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17453fi
17454
17455# Store the CFLAGS etal passed to the configure script.
17456ORG_CFLAGS="$CFLAGS"
17457ORG_CXXFLAGS="$CXXFLAGS"
17458ORG_OBJCFLAGS="$OBJCFLAGS"
17459
17460# autoconf magic only relies on PATH, so update it if tools dir is specified
17461OLD_PATH="$PATH"
17462if test "x$TOOLS_DIR" != x; then
17463  PATH=$TOOLS_DIR:$PATH
17464fi
17465
17466
17467### Locate C compiler (CC)
17468
17469# gcc is almost always present, but on Windows we
17470# prefer cl.exe and on Solaris we prefer CC.
17471# Thus test for them in this order.
17472if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17473  # Do not probe for cc on MacOSX.
17474  COMPILER_CHECK_LIST="cl gcc"
17475else
17476  COMPILER_CHECK_LIST="cl cc gcc"
17477fi
17478
17479
17480  COMPILER_NAME=C
17481
17482  # Do a first initial attempt at searching the list of compiler names.
17483  # AC_PATH_PROGS can't be run multiple times with the same variable,
17484  # so create a new name for this run.
17485  for ac_prog in $COMPILER_CHECK_LIST
17486do
17487  # Extract the first word of "$ac_prog", so it can be a program name with args.
17488set dummy $ac_prog; ac_word=$2
17489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17490$as_echo_n "checking for $ac_word... " >&6; }
17491if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17492  $as_echo_n "(cached) " >&6
17493else
17494  case $POTENTIAL_CC in
17495  [\\/]* | ?:[\\/]*)
17496  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17497  ;;
17498  *)
17499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17500for as_dir in $PATH
17501do
17502  IFS=$as_save_IFS
17503  test -z "$as_dir" && as_dir=.
17504    for ac_exec_ext in '' $ac_executable_extensions; do
17505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17506    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17508    break 2
17509  fi
17510done
17511  done
17512IFS=$as_save_IFS
17513
17514  ;;
17515esac
17516fi
17517POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17518if test -n "$POTENTIAL_CC"; then
17519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17520$as_echo "$POTENTIAL_CC" >&6; }
17521else
17522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17523$as_echo "no" >&6; }
17524fi
17525
17526
17527  test -n "$POTENTIAL_CC" && break
17528done
17529
17530  CC=$POTENTIAL_CC
17531
17532  if test "x$$CC" = x; then
17533
17534    # Print a helpful message on how to acquire the necessary build dependency.
17535    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17536    MISSING_DEPENDENCY=devkit
17537    PKGHANDLER_COMMAND=
17538
17539    case $PKGHANDLER in
17540	apt-get)
17541                apt_help     $MISSING_DEPENDENCY ;;
17542    yum)
17543                yum_help     $MISSING_DEPENDENCY ;;
17544	port)
17545                port_help    $MISSING_DEPENDENCY ;;
17546	pkgutil)
17547                pkgutil_help $MISSING_DEPENDENCY ;;
17548	pkgadd)
17549                pkgadd_help  $MISSING_DEPENDENCY ;;
17550    * )
17551      break ;;
17552    esac
17553
17554    if test "x$PKGHANDLER_COMMAND" != x; then
17555        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17556    fi
17557
17558      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17559  fi
17560
17561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17562
17563  # First separate the path from the arguments. This will split at the first
17564  # space.
17565  complete="$CC"
17566  path="${complete%% *}"
17567  tmp="$complete EOL"
17568  arguments="${tmp#* }"
17569
17570  # Input might be given as Windows format, start by converting to
17571  # unix format.
17572  new_path=`$CYGPATH -u "$path"`
17573
17574  # Now try to locate executable using which
17575  new_path=`$WHICH "$new_path" 2> /dev/null`
17576  if test "x$new_path" = x; then
17577    # Oops. Which didn't find the executable.
17578    # The splitting of arguments from the executable at a space might have been incorrect,
17579    # since paths with space are more likely in Windows. Give it another try with the whole
17580    # argument.
17581    path="$complete"
17582    arguments="EOL"
17583    new_path=`$CYGPATH -u "$path"`
17584    new_path=`$WHICH "$new_path" 2> /dev/null`
17585    if test "x$new_path" = x; then
17586      # It's still not found. Now this is an unrecoverable error.
17587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17588$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17589      has_space=`$ECHO "$complete" | $GREP " "`
17590      if test "x$has_space" != x; then
17591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17593      fi
17594      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17595    fi
17596  fi
17597
17598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17601  # "foo.exe" is OK but "foo" is an error.
17602  #
17603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17604  # It is also a way to make sure we got the proper file name for the real test later on.
17605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17606  if test "x$test_shortpath" = x; then
17607    # Short path failed, file does not exist as specified.
17608    # Try adding .exe or .cmd
17609    if test -f "${new_path}.exe"; then
17610       input_to_shortpath="${new_path}.exe"
17611    elif test -f "${new_path}.cmd"; then
17612       input_to_shortpath="${new_path}.cmd"
17613    else
17614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17615$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17616      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17617$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17618      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17619    fi
17620  else
17621    input_to_shortpath="$new_path"
17622  fi
17623
17624  # Call helper function which possibly converts this using DOS-style short mode.
17625  # If so, the updated path is stored in $new_path.
17626  new_path="$input_to_shortpath"
17627
17628  input_path="$input_to_shortpath"
17629  # Check if we need to convert this using DOS-style short mode. If the path
17630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17631  # take no chances and rewrite it.
17632  # Note: m4 eats our [], so we need to use [ and ] instead.
17633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17634  if test "x$has_forbidden_chars" != x; then
17635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17639      # Going to short mode and back again did indeed matter. Since short mode is
17640      # case insensitive, let's make it lowercase to improve readability.
17641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17642      # Now convert it back to Unix-stile (cygpath)
17643      input_path=`$CYGPATH -u "$shortmode_path"`
17644      new_path="$input_path"
17645    fi
17646  fi
17647
17648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17649  if test "x$test_cygdrive_prefix" = x; then
17650    # As a simple fix, exclude /usr/bin since it's not a real path.
17651    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17653      # a path prefixed by /cygdrive for fixpath to work.
17654      new_path="$CYGWIN_ROOT_PATH$input_path"
17655    fi
17656  fi
17657
17658  # remove trailing .exe if any
17659  new_path="${new_path/%.exe/}"
17660
17661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17662
17663  # First separate the path from the arguments. This will split at the first
17664  # space.
17665  complete="$CC"
17666  path="${complete%% *}"
17667  tmp="$complete EOL"
17668  arguments="${tmp#* }"
17669
17670  # Input might be given as Windows format, start by converting to
17671  # unix format.
17672  new_path="$path"
17673
17674  windows_path="$new_path"
17675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17676    unix_path=`$CYGPATH -u "$windows_path"`
17677    new_path="$unix_path"
17678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17680    new_path="$unix_path"
17681  fi
17682
17683
17684  # Now try to locate executable using which
17685  new_path=`$WHICH "$new_path" 2> /dev/null`
17686
17687  if test "x$new_path" = x; then
17688    # Oops. Which didn't find the executable.
17689    # The splitting of arguments from the executable at a space might have been incorrect,
17690    # since paths with space are more likely in Windows. Give it another try with the whole
17691    # argument.
17692    path="$complete"
17693    arguments="EOL"
17694    new_path="$path"
17695
17696  windows_path="$new_path"
17697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17698    unix_path=`$CYGPATH -u "$windows_path"`
17699    new_path="$unix_path"
17700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17702    new_path="$unix_path"
17703  fi
17704
17705
17706    new_path=`$WHICH "$new_path" 2> /dev/null`
17707
17708    if test "x$new_path" = x; then
17709      # It's still not found. Now this is an unrecoverable error.
17710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17711$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17712      has_space=`$ECHO "$complete" | $GREP " "`
17713      if test "x$has_space" != x; then
17714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17716      fi
17717      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17718    fi
17719  fi
17720
17721  # Now new_path has a complete unix path to the binary
17722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17723    # Keep paths in /bin as-is, but remove trailing .exe if any
17724    new_path="${new_path/%.exe/}"
17725    # Do not save /bin paths to all_fixpath_prefixes!
17726  else
17727    # Not in mixed or Windows style, start by that.
17728    new_path=`cmd //c echo $new_path`
17729
17730  input_path="$new_path"
17731  # Check if we need to convert this using DOS-style short mode. If the path
17732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17733  # take no chances and rewrite it.
17734  # Note: m4 eats our [], so we need to use [ and ] instead.
17735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17736  if test "x$has_forbidden_chars" != x; then
17737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17739  fi
17740
17741    # Output is in $new_path
17742
17743  windows_path="$new_path"
17744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17745    unix_path=`$CYGPATH -u "$windows_path"`
17746    new_path="$unix_path"
17747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17749    new_path="$unix_path"
17750  fi
17751
17752    # remove trailing .exe if any
17753    new_path="${new_path/%.exe/}"
17754
17755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17757  fi
17758
17759  else
17760    # We're on a posix platform. Hooray! :)
17761    # First separate the path from the arguments. This will split at the first
17762    # space.
17763    complete="$CC"
17764    path="${complete%% *}"
17765    tmp="$complete EOL"
17766    arguments="${tmp#* }"
17767
17768    new_path=`$WHICH $path 2> /dev/null`
17769    if test "x$new_path" = x; then
17770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17771      if test "x$is_absolute_path" != x; then
17772        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
17773$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
17774        new_path="$path"
17775      else
17776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17777$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17778        has_space=`$ECHO "$complete" | $GREP " "`
17779        if test "x$has_space" != x; then
17780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17782        fi
17783        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17784      fi
17785    fi
17786  fi
17787
17788  # Now join together the path and the arguments once again
17789  if test "x$arguments" != xEOL; then
17790      new_complete="$new_path ${arguments% *}"
17791  else
17792      new_complete="$new_path"
17793  fi
17794
17795  if test "x$complete" != "x$new_complete"; then
17796    CC="$new_complete"
17797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
17798$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
17799  fi
17800
17801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
17802$as_echo_n "checking resolved symbolic links for CC... " >&6; }
17803  TEST_COMPILER="$CC"
17804
17805    if test "x$OPENJDK_BUILD_OS" != xwindows; then
17806        # Follow a chain of symbolic links. Use readlink
17807        # where it exists, else fall back to horribly
17808        # complicated shell code.
17809        if test "x$READLINK_TESTED" != yes; then
17810            # On MacOSX there is a readlink tool with a different
17811            # purpose than the GNU readlink tool. Check the found readlink.
17812            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
17813            if test "x$ISGNU" = x; then
17814                 # A readlink that we do not know how to use.
17815                 # Are there other non-GNU readlinks out there?
17816                 READLINK_TESTED=yes
17817                 READLINK=
17818            fi
17819        fi
17820
17821        if test "x$READLINK" != x; then
17822            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
17823        else
17824            STARTDIR=$PWD
17825            COUNTER=0
17826            DIR=`$DIRNAME $TEST_COMPILER`
17827            FILE=`$BASENAME $TEST_COMPILER`
17828            while test $COUNTER -lt 20; do
17829                ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
17830                if test "x$ISLINK" == x; then
17831                    # This is not a symbolic link! We are done!
17832                    break
17833                fi
17834                # The link might be relative! We have to use cd to travel safely.
17835                cd $DIR
17836                # ... and we must get the to the absolute path, not one using symbolic links.
17837                cd `pwd -P`
17838                cd `$DIRNAME $ISLINK`
17839                DIR=`$THEPWDCMD`
17840                FILE=`$BASENAME $ISLINK`
17841                let COUNTER=COUNTER+1
17842            done
17843            cd $STARTDIR
17844            TEST_COMPILER=$DIR/$FILE
17845        fi
17846    fi
17847
17848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
17849$as_echo "$TEST_COMPILER" >&6; }
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
17851$as_echo_n "checking if CC is disguised ccache... " >&6; }
17852
17853  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
17854  if test "x$COMPILER_BASENAME" = "xccache"; then
17855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
17856$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
17857    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
17858    # We want to control ccache invocation ourselves, so ignore this cc and try
17859    # searching again.
17860
17861    # Remove the path to the fake ccache cc from the PATH
17862    RETRY_COMPILER_SAVED_PATH="$PATH"
17863    COMPILER_DIRNAME=`$DIRNAME $CC`
17864    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
17865
17866    # Try again looking for our compiler
17867    if test -n "$ac_tool_prefix"; then
17868  for ac_prog in $COMPILER_CHECK_LIST
17869  do
17870    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17871set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17873$as_echo_n "checking for $ac_word... " >&6; }
17874if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
17875  $as_echo_n "(cached) " >&6
17876else
17877  if test -n "$PROPER_COMPILER_CC"; then
17878  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
17879else
17880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17881for as_dir in $PATH
17882do
17883  IFS=$as_save_IFS
17884  test -z "$as_dir" && as_dir=.
17885    for ac_exec_ext in '' $ac_executable_extensions; do
17886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17887    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
17888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17889    break 2
17890  fi
17891done
17892  done
17893IFS=$as_save_IFS
17894
17895fi
17896fi
17897PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
17898if test -n "$PROPER_COMPILER_CC"; then
17899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
17900$as_echo "$PROPER_COMPILER_CC" >&6; }
17901else
17902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17903$as_echo "no" >&6; }
17904fi
17905
17906
17907    test -n "$PROPER_COMPILER_CC" && break
17908  done
17909fi
17910if test -z "$PROPER_COMPILER_CC"; then
17911  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
17912  for ac_prog in $COMPILER_CHECK_LIST
17913do
17914  # Extract the first word of "$ac_prog", so it can be a program name with args.
17915set dummy $ac_prog; ac_word=$2
17916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17917$as_echo_n "checking for $ac_word... " >&6; }
17918if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
17919  $as_echo_n "(cached) " >&6
17920else
17921  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
17922  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
17923else
17924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17925for as_dir in $PATH
17926do
17927  IFS=$as_save_IFS
17928  test -z "$as_dir" && as_dir=.
17929    for ac_exec_ext in '' $ac_executable_extensions; do
17930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17931    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
17932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17933    break 2
17934  fi
17935done
17936  done
17937IFS=$as_save_IFS
17938
17939fi
17940fi
17941ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
17942if test -n "$ac_ct_PROPER_COMPILER_CC"; then
17943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
17944$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
17945else
17946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17947$as_echo "no" >&6; }
17948fi
17949
17950
17951  test -n "$ac_ct_PROPER_COMPILER_CC" && break
17952done
17953
17954  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
17955    PROPER_COMPILER_CC=""
17956  else
17957    case $cross_compiling:$ac_tool_warned in
17958yes:)
17959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17961ac_tool_warned=yes ;;
17962esac
17963    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
17964  fi
17965fi
17966
17967
17968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969
17970  # First separate the path from the arguments. This will split at the first
17971  # space.
17972  complete="$PROPER_COMPILER_CC"
17973  path="${complete%% *}"
17974  tmp="$complete EOL"
17975  arguments="${tmp#* }"
17976
17977  # Input might be given as Windows format, start by converting to
17978  # unix format.
17979  new_path=`$CYGPATH -u "$path"`
17980
17981  # Now try to locate executable using which
17982  new_path=`$WHICH "$new_path" 2> /dev/null`
17983  if test "x$new_path" = x; then
17984    # Oops. Which didn't find the executable.
17985    # The splitting of arguments from the executable at a space might have been incorrect,
17986    # since paths with space are more likely in Windows. Give it another try with the whole
17987    # argument.
17988    path="$complete"
17989    arguments="EOL"
17990    new_path=`$CYGPATH -u "$path"`
17991    new_path=`$WHICH "$new_path" 2> /dev/null`
17992    if test "x$new_path" = x; then
17993      # It's still not found. Now this is an unrecoverable error.
17994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
17995$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
17996      has_space=`$ECHO "$complete" | $GREP " "`
17997      if test "x$has_space" != x; then
17998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18000      fi
18001      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18002    fi
18003  fi
18004
18005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18008  # "foo.exe" is OK but "foo" is an error.
18009  #
18010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18011  # It is also a way to make sure we got the proper file name for the real test later on.
18012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18013  if test "x$test_shortpath" = x; then
18014    # Short path failed, file does not exist as specified.
18015    # Try adding .exe or .cmd
18016    if test -f "${new_path}.exe"; then
18017       input_to_shortpath="${new_path}.exe"
18018    elif test -f "${new_path}.cmd"; then
18019       input_to_shortpath="${new_path}.cmd"
18020    else
18021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18022$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18025      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18026    fi
18027  else
18028    input_to_shortpath="$new_path"
18029  fi
18030
18031  # Call helper function which possibly converts this using DOS-style short mode.
18032  # If so, the updated path is stored in $new_path.
18033  new_path="$input_to_shortpath"
18034
18035  input_path="$input_to_shortpath"
18036  # Check if we need to convert this using DOS-style short mode. If the path
18037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18038  # take no chances and rewrite it.
18039  # Note: m4 eats our [], so we need to use [ and ] instead.
18040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18041  if test "x$has_forbidden_chars" != x; then
18042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18046      # Going to short mode and back again did indeed matter. Since short mode is
18047      # case insensitive, let's make it lowercase to improve readability.
18048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18049      # Now convert it back to Unix-stile (cygpath)
18050      input_path=`$CYGPATH -u "$shortmode_path"`
18051      new_path="$input_path"
18052    fi
18053  fi
18054
18055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18056  if test "x$test_cygdrive_prefix" = x; then
18057    # As a simple fix, exclude /usr/bin since it's not a real path.
18058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18060      # a path prefixed by /cygdrive for fixpath to work.
18061      new_path="$CYGWIN_ROOT_PATH$input_path"
18062    fi
18063  fi
18064
18065  # remove trailing .exe if any
18066  new_path="${new_path/%.exe/}"
18067
18068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18069
18070  # First separate the path from the arguments. This will split at the first
18071  # space.
18072  complete="$PROPER_COMPILER_CC"
18073  path="${complete%% *}"
18074  tmp="$complete EOL"
18075  arguments="${tmp#* }"
18076
18077  # Input might be given as Windows format, start by converting to
18078  # unix format.
18079  new_path="$path"
18080
18081  windows_path="$new_path"
18082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18083    unix_path=`$CYGPATH -u "$windows_path"`
18084    new_path="$unix_path"
18085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18087    new_path="$unix_path"
18088  fi
18089
18090
18091  # Now try to locate executable using which
18092  new_path=`$WHICH "$new_path" 2> /dev/null`
18093
18094  if test "x$new_path" = x; then
18095    # Oops. Which didn't find the executable.
18096    # The splitting of arguments from the executable at a space might have been incorrect,
18097    # since paths with space are more likely in Windows. Give it another try with the whole
18098    # argument.
18099    path="$complete"
18100    arguments="EOL"
18101    new_path="$path"
18102
18103  windows_path="$new_path"
18104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105    unix_path=`$CYGPATH -u "$windows_path"`
18106    new_path="$unix_path"
18107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18109    new_path="$unix_path"
18110  fi
18111
18112
18113    new_path=`$WHICH "$new_path" 2> /dev/null`
18114
18115    if test "x$new_path" = x; then
18116      # It's still not found. Now this is an unrecoverable error.
18117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18118$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18119      has_space=`$ECHO "$complete" | $GREP " "`
18120      if test "x$has_space" != x; then
18121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18123      fi
18124      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18125    fi
18126  fi
18127
18128  # Now new_path has a complete unix path to the binary
18129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18130    # Keep paths in /bin as-is, but remove trailing .exe if any
18131    new_path="${new_path/%.exe/}"
18132    # Do not save /bin paths to all_fixpath_prefixes!
18133  else
18134    # Not in mixed or Windows style, start by that.
18135    new_path=`cmd //c echo $new_path`
18136
18137  input_path="$new_path"
18138  # Check if we need to convert this using DOS-style short mode. If the path
18139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18140  # take no chances and rewrite it.
18141  # Note: m4 eats our [], so we need to use [ and ] instead.
18142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18143  if test "x$has_forbidden_chars" != x; then
18144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18146  fi
18147
18148    # Output is in $new_path
18149
18150  windows_path="$new_path"
18151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18152    unix_path=`$CYGPATH -u "$windows_path"`
18153    new_path="$unix_path"
18154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18156    new_path="$unix_path"
18157  fi
18158
18159    # remove trailing .exe if any
18160    new_path="${new_path/%.exe/}"
18161
18162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18164  fi
18165
18166  else
18167    # We're on a posix platform. Hooray! :)
18168    # First separate the path from the arguments. This will split at the first
18169    # space.
18170    complete="$PROPER_COMPILER_CC"
18171    path="${complete%% *}"
18172    tmp="$complete EOL"
18173    arguments="${tmp#* }"
18174
18175    new_path=`$WHICH $path 2> /dev/null`
18176    if test "x$new_path" = x; then
18177      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18178      if test "x$is_absolute_path" != x; then
18179        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18180$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18181        new_path="$path"
18182      else
18183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18184$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18185        has_space=`$ECHO "$complete" | $GREP " "`
18186        if test "x$has_space" != x; then
18187          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18188$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18189        fi
18190        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18191      fi
18192    fi
18193  fi
18194
18195  # Now join together the path and the arguments once again
18196  if test "x$arguments" != xEOL; then
18197      new_complete="$new_path ${arguments% *}"
18198  else
18199      new_complete="$new_path"
18200  fi
18201
18202  if test "x$complete" != "x$new_complete"; then
18203    PROPER_COMPILER_CC="$new_complete"
18204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18205$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18206  fi
18207
18208    PATH="$RETRY_COMPILER_SAVED_PATH"
18209
18210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18211$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18212
18213    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18214        # Follow a chain of symbolic links. Use readlink
18215        # where it exists, else fall back to horribly
18216        # complicated shell code.
18217        if test "x$READLINK_TESTED" != yes; then
18218            # On MacOSX there is a readlink tool with a different
18219            # purpose than the GNU readlink tool. Check the found readlink.
18220            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18221            if test "x$ISGNU" = x; then
18222                 # A readlink that we do not know how to use.
18223                 # Are there other non-GNU readlinks out there?
18224                 READLINK_TESTED=yes
18225                 READLINK=
18226            fi
18227        fi
18228
18229        if test "x$READLINK" != x; then
18230            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18231        else
18232            STARTDIR=$PWD
18233            COUNTER=0
18234            DIR=`$DIRNAME $PROPER_COMPILER_CC`
18235            FILE=`$BASENAME $PROPER_COMPILER_CC`
18236            while test $COUNTER -lt 20; do
18237                ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18238                if test "x$ISLINK" == x; then
18239                    # This is not a symbolic link! We are done!
18240                    break
18241                fi
18242                # The link might be relative! We have to use cd to travel safely.
18243                cd $DIR
18244                # ... and we must get the to the absolute path, not one using symbolic links.
18245                cd `pwd -P`
18246                cd `$DIRNAME $ISLINK`
18247                DIR=`$THEPWDCMD`
18248                FILE=`$BASENAME $ISLINK`
18249                let COUNTER=COUNTER+1
18250            done
18251            cd $STARTDIR
18252            PROPER_COMPILER_CC=$DIR/$FILE
18253        fi
18254    fi
18255
18256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18257$as_echo "$PROPER_COMPILER_CC" >&6; }
18258    CC="$PROPER_COMPILER_CC"
18259  else
18260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18261$as_echo "no, keeping CC" >&6; }
18262    CC="$TEST_COMPILER"
18263  fi
18264
18265  COMPILER=$CC
18266  COMPILER_NAME=$COMPILER_NAME
18267
18268  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18269    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18270    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18271    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18272    if test $? -ne 0; then
18273      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18274
18275      { $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
18276$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18277      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18278$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18279      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18280    else
18281      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18282      COMPILER_VENDOR="Sun Studio"
18283    fi
18284  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18285    # First line typically looks something like:
18286    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18287    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18288    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18289    COMPILER_VENDOR="Microsoft CL.EXE"
18290    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18291    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18292      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18293        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18294      fi
18295    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18296      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18297        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18298      fi
18299    fi
18300  else
18301    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18302    # Check that this is likely to be GCC.
18303    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18304    if test $? -ne 0; then
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18306$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18307      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18308$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18309      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18310    fi
18311
18312    # First line typically looks something like:
18313    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18314    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18315    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18316  fi
18317  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18318  CC_VERSION="$COMPILER_VERSION"
18319  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18320  CC_VENDOR="$COMPILER_VENDOR"
18321
18322  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18323$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18324
18325
18326# Now that we have resolved CC ourself, let autoconf have it's go at it
18327ac_ext=c
18328ac_cpp='$CPP $CPPFLAGS'
18329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18331ac_compiler_gnu=$ac_cv_c_compiler_gnu
18332if test -n "$ac_tool_prefix"; then
18333  for ac_prog in $CC
18334  do
18335    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18336set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18338$as_echo_n "checking for $ac_word... " >&6; }
18339if test "${ac_cv_prog_CC+set}" = set; then :
18340  $as_echo_n "(cached) " >&6
18341else
18342  if test -n "$CC"; then
18343  ac_cv_prog_CC="$CC" # Let the user override the test.
18344else
18345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18346for as_dir in $PATH
18347do
18348  IFS=$as_save_IFS
18349  test -z "$as_dir" && as_dir=.
18350    for ac_exec_ext in '' $ac_executable_extensions; do
18351  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18352    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18354    break 2
18355  fi
18356done
18357  done
18358IFS=$as_save_IFS
18359
18360fi
18361fi
18362CC=$ac_cv_prog_CC
18363if test -n "$CC"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18365$as_echo "$CC" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372    test -n "$CC" && break
18373  done
18374fi
18375if test -z "$CC"; then
18376  ac_ct_CC=$CC
18377  for ac_prog in $CC
18378do
18379  # Extract the first word of "$ac_prog", so it can be a program name with args.
18380set dummy $ac_prog; ac_word=$2
18381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18382$as_echo_n "checking for $ac_word... " >&6; }
18383if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18384  $as_echo_n "(cached) " >&6
18385else
18386  if test -n "$ac_ct_CC"; then
18387  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18388else
18389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18390for as_dir in $PATH
18391do
18392  IFS=$as_save_IFS
18393  test -z "$as_dir" && as_dir=.
18394    for ac_exec_ext in '' $ac_executable_extensions; do
18395  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18396    ac_cv_prog_ac_ct_CC="$ac_prog"
18397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18398    break 2
18399  fi
18400done
18401  done
18402IFS=$as_save_IFS
18403
18404fi
18405fi
18406ac_ct_CC=$ac_cv_prog_ac_ct_CC
18407if test -n "$ac_ct_CC"; then
18408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18409$as_echo "$ac_ct_CC" >&6; }
18410else
18411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18412$as_echo "no" >&6; }
18413fi
18414
18415
18416  test -n "$ac_ct_CC" && break
18417done
18418
18419  if test "x$ac_ct_CC" = x; then
18420    CC=""
18421  else
18422    case $cross_compiling:$ac_tool_warned in
18423yes:)
18424{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18425$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18426ac_tool_warned=yes ;;
18427esac
18428    CC=$ac_ct_CC
18429  fi
18430fi
18431
18432
18433test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18435as_fn_error $? "no acceptable C compiler found in \$PATH
18436See \`config.log' for more details" "$LINENO" 5 ; }
18437
18438# Provide some information about the compiler.
18439$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18440set X $ac_compile
18441ac_compiler=$2
18442for ac_option in --version -v -V -qversion; do
18443  { { ac_try="$ac_compiler $ac_option >&5"
18444case "(($ac_try" in
18445  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18446  *) ac_try_echo=$ac_try;;
18447esac
18448eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18449$as_echo "$ac_try_echo"; } >&5
18450  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18451  ac_status=$?
18452  if test -s conftest.err; then
18453    sed '10a\
18454... rest of stderr output deleted ...
18455         10q' conftest.err >conftest.er1
18456    cat conftest.er1 >&5
18457  fi
18458  rm -f conftest.er1 conftest.err
18459  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18460  test $ac_status = 0; }
18461done
18462
18463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18464/* end confdefs.h.  */
18465
18466int
18467main ()
18468{
18469
18470  ;
18471  return 0;
18472}
18473_ACEOF
18474ac_clean_files_save=$ac_clean_files
18475ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18476# Try to create an executable without -o first, disregard a.out.
18477# It will help us diagnose broken compilers, and finding out an intuition
18478# of exeext.
18479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18480$as_echo_n "checking whether the C compiler works... " >&6; }
18481ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18482
18483# The possible output files:
18484ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18485
18486ac_rmfiles=
18487for ac_file in $ac_files
18488do
18489  case $ac_file in
18490    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18491    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18492  esac
18493done
18494rm -f $ac_rmfiles
18495
18496if { { ac_try="$ac_link_default"
18497case "(($ac_try" in
18498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18499  *) ac_try_echo=$ac_try;;
18500esac
18501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18502$as_echo "$ac_try_echo"; } >&5
18503  (eval "$ac_link_default") 2>&5
18504  ac_status=$?
18505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18506  test $ac_status = 0; }; then :
18507  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18508# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18509# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18510# so that the user can short-circuit this test for compilers unknown to
18511# Autoconf.
18512for ac_file in $ac_files ''
18513do
18514  test -f "$ac_file" || continue
18515  case $ac_file in
18516    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18517	;;
18518    [ab].out )
18519	# We found the default executable, but exeext='' is most
18520	# certainly right.
18521	break;;
18522    *.* )
18523	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18524	then :; else
18525	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18526	fi
18527	# We set ac_cv_exeext here because the later test for it is not
18528	# safe: cross compilers may not add the suffix if given an `-o'
18529	# argument, so we may need to know it at that point already.
18530	# Even if this section looks crufty: it has the advantage of
18531	# actually working.
18532	break;;
18533    * )
18534	break;;
18535  esac
18536done
18537test "$ac_cv_exeext" = no && ac_cv_exeext=
18538
18539else
18540  ac_file=''
18541fi
18542if test -z "$ac_file"; then :
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18544$as_echo "no" >&6; }
18545$as_echo "$as_me: failed program was:" >&5
18546sed 's/^/| /' conftest.$ac_ext >&5
18547
18548{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18550as_fn_error 77 "C compiler cannot create executables
18551See \`config.log' for more details" "$LINENO" 5 ; }
18552else
18553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18554$as_echo "yes" >&6; }
18555fi
18556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18557$as_echo_n "checking for C compiler default output file name... " >&6; }
18558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18559$as_echo "$ac_file" >&6; }
18560ac_exeext=$ac_cv_exeext
18561
18562rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18563ac_clean_files=$ac_clean_files_save
18564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18565$as_echo_n "checking for suffix of executables... " >&6; }
18566if { { ac_try="$ac_link"
18567case "(($ac_try" in
18568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18569  *) ac_try_echo=$ac_try;;
18570esac
18571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18572$as_echo "$ac_try_echo"; } >&5
18573  (eval "$ac_link") 2>&5
18574  ac_status=$?
18575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18576  test $ac_status = 0; }; then :
18577  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18578# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18579# work properly (i.e., refer to `conftest.exe'), while it won't with
18580# `rm'.
18581for ac_file in conftest.exe conftest conftest.*; do
18582  test -f "$ac_file" || continue
18583  case $ac_file in
18584    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18585    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18586	  break;;
18587    * ) break;;
18588  esac
18589done
18590else
18591  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18593as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18594See \`config.log' for more details" "$LINENO" 5 ; }
18595fi
18596rm -f conftest conftest$ac_cv_exeext
18597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18598$as_echo "$ac_cv_exeext" >&6; }
18599
18600rm -f conftest.$ac_ext
18601EXEEXT=$ac_cv_exeext
18602ac_exeext=$EXEEXT
18603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18604/* end confdefs.h.  */
18605#include <stdio.h>
18606int
18607main ()
18608{
18609FILE *f = fopen ("conftest.out", "w");
18610 return ferror (f) || fclose (f) != 0;
18611
18612  ;
18613  return 0;
18614}
18615_ACEOF
18616ac_clean_files="$ac_clean_files conftest.out"
18617# Check that the compiler produces executables we can run.  If not, either
18618# the compiler is broken, or we cross compile.
18619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18620$as_echo_n "checking whether we are cross compiling... " >&6; }
18621if test "$cross_compiling" != yes; then
18622  { { ac_try="$ac_link"
18623case "(($ac_try" in
18624  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18625  *) ac_try_echo=$ac_try;;
18626esac
18627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18628$as_echo "$ac_try_echo"; } >&5
18629  (eval "$ac_link") 2>&5
18630  ac_status=$?
18631  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18632  test $ac_status = 0; }
18633  if { ac_try='./conftest$ac_cv_exeext'
18634  { { case "(($ac_try" in
18635  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18636  *) ac_try_echo=$ac_try;;
18637esac
18638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18639$as_echo "$ac_try_echo"; } >&5
18640  (eval "$ac_try") 2>&5
18641  ac_status=$?
18642  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18643  test $ac_status = 0; }; }; then
18644    cross_compiling=no
18645  else
18646    if test "$cross_compiling" = maybe; then
18647	cross_compiling=yes
18648    else
18649	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18651as_fn_error $? "cannot run C compiled programs.
18652If you meant to cross compile, use \`--host'.
18653See \`config.log' for more details" "$LINENO" 5 ; }
18654    fi
18655  fi
18656fi
18657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
18658$as_echo "$cross_compiling" >&6; }
18659
18660rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
18661ac_clean_files=$ac_clean_files_save
18662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
18663$as_echo_n "checking for suffix of object files... " >&6; }
18664if test "${ac_cv_objext+set}" = set; then :
18665  $as_echo_n "(cached) " >&6
18666else
18667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18668/* end confdefs.h.  */
18669
18670int
18671main ()
18672{
18673
18674  ;
18675  return 0;
18676}
18677_ACEOF
18678rm -f conftest.o conftest.obj
18679if { { ac_try="$ac_compile"
18680case "(($ac_try" in
18681  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18682  *) ac_try_echo=$ac_try;;
18683esac
18684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18685$as_echo "$ac_try_echo"; } >&5
18686  (eval "$ac_compile") 2>&5
18687  ac_status=$?
18688  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18689  test $ac_status = 0; }; then :
18690  for ac_file in conftest.o conftest.obj conftest.*; do
18691  test -f "$ac_file" || continue;
18692  case $ac_file in
18693    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18694    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18695       break;;
18696  esac
18697done
18698else
18699  $as_echo "$as_me: failed program was:" >&5
18700sed 's/^/| /' conftest.$ac_ext >&5
18701
18702{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18704as_fn_error $? "cannot compute suffix of object files: cannot compile
18705See \`config.log' for more details" "$LINENO" 5 ; }
18706fi
18707rm -f conftest.$ac_cv_objext conftest.$ac_ext
18708fi
18709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
18710$as_echo "$ac_cv_objext" >&6; }
18711OBJEXT=$ac_cv_objext
18712ac_objext=$OBJEXT
18713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
18714$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18715if test "${ac_cv_c_compiler_gnu+set}" = set; then :
18716  $as_echo_n "(cached) " >&6
18717else
18718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18719/* end confdefs.h.  */
18720
18721int
18722main ()
18723{
18724#ifndef __GNUC__
18725       choke me
18726#endif
18727
18728  ;
18729  return 0;
18730}
18731_ACEOF
18732if ac_fn_c_try_compile "$LINENO"; then :
18733  ac_compiler_gnu=yes
18734else
18735  ac_compiler_gnu=no
18736fi
18737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18738ac_cv_c_compiler_gnu=$ac_compiler_gnu
18739
18740fi
18741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
18742$as_echo "$ac_cv_c_compiler_gnu" >&6; }
18743if test $ac_compiler_gnu = yes; then
18744  GCC=yes
18745else
18746  GCC=
18747fi
18748ac_test_CFLAGS=${CFLAGS+set}
18749ac_save_CFLAGS=$CFLAGS
18750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
18751$as_echo_n "checking whether $CC accepts -g... " >&6; }
18752if test "${ac_cv_prog_cc_g+set}" = set; then :
18753  $as_echo_n "(cached) " >&6
18754else
18755  ac_save_c_werror_flag=$ac_c_werror_flag
18756   ac_c_werror_flag=yes
18757   ac_cv_prog_cc_g=no
18758   CFLAGS="-g"
18759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18760/* end confdefs.h.  */
18761
18762int
18763main ()
18764{
18765
18766  ;
18767  return 0;
18768}
18769_ACEOF
18770if ac_fn_c_try_compile "$LINENO"; then :
18771  ac_cv_prog_cc_g=yes
18772else
18773  CFLAGS=""
18774      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18775/* end confdefs.h.  */
18776
18777int
18778main ()
18779{
18780
18781  ;
18782  return 0;
18783}
18784_ACEOF
18785if ac_fn_c_try_compile "$LINENO"; then :
18786
18787else
18788  ac_c_werror_flag=$ac_save_c_werror_flag
18789	 CFLAGS="-g"
18790	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18791/* end confdefs.h.  */
18792
18793int
18794main ()
18795{
18796
18797  ;
18798  return 0;
18799}
18800_ACEOF
18801if ac_fn_c_try_compile "$LINENO"; then :
18802  ac_cv_prog_cc_g=yes
18803fi
18804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18805fi
18806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18807fi
18808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18809   ac_c_werror_flag=$ac_save_c_werror_flag
18810fi
18811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
18812$as_echo "$ac_cv_prog_cc_g" >&6; }
18813if test "$ac_test_CFLAGS" = set; then
18814  CFLAGS=$ac_save_CFLAGS
18815elif test $ac_cv_prog_cc_g = yes; then
18816  if test "$GCC" = yes; then
18817    CFLAGS="-g -O2"
18818  else
18819    CFLAGS="-g"
18820  fi
18821else
18822  if test "$GCC" = yes; then
18823    CFLAGS="-O2"
18824  else
18825    CFLAGS=
18826  fi
18827fi
18828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
18829$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
18830if test "${ac_cv_prog_cc_c89+set}" = set; then :
18831  $as_echo_n "(cached) " >&6
18832else
18833  ac_cv_prog_cc_c89=no
18834ac_save_CC=$CC
18835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18836/* end confdefs.h.  */
18837#include <stdarg.h>
18838#include <stdio.h>
18839#include <sys/types.h>
18840#include <sys/stat.h>
18841/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
18842struct buf { int x; };
18843FILE * (*rcsopen) (struct buf *, struct stat *, int);
18844static char *e (p, i)
18845     char **p;
18846     int i;
18847{
18848  return p[i];
18849}
18850static char *f (char * (*g) (char **, int), char **p, ...)
18851{
18852  char *s;
18853  va_list v;
18854  va_start (v,p);
18855  s = g (p, va_arg (v,int));
18856  va_end (v);
18857  return s;
18858}
18859
18860/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
18861   function prototypes and stuff, but not '\xHH' hex character constants.
18862   These don't provoke an error unfortunately, instead are silently treated
18863   as 'x'.  The following induces an error, until -std is added to get
18864   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
18865   array size at least.  It's necessary to write '\x00'==0 to get something
18866   that's true only with -std.  */
18867int osf4_cc_array ['\x00' == 0 ? 1 : -1];
18868
18869/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
18870   inside strings and character constants.  */
18871#define FOO(x) 'x'
18872int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
18873
18874int test (int i, double x);
18875struct s1 {int (*f) (int a);};
18876struct s2 {int (*f) (double a);};
18877int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
18878int argc;
18879char **argv;
18880int
18881main ()
18882{
18883return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
18884  ;
18885  return 0;
18886}
18887_ACEOF
18888for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
18889	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
18890do
18891  CC="$ac_save_CC $ac_arg"
18892  if ac_fn_c_try_compile "$LINENO"; then :
18893  ac_cv_prog_cc_c89=$ac_arg
18894fi
18895rm -f core conftest.err conftest.$ac_objext
18896  test "x$ac_cv_prog_cc_c89" != "xno" && break
18897done
18898rm -f conftest.$ac_ext
18899CC=$ac_save_CC
18900
18901fi
18902# AC_CACHE_VAL
18903case "x$ac_cv_prog_cc_c89" in
18904  x)
18905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
18906$as_echo "none needed" >&6; } ;;
18907  xno)
18908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
18909$as_echo "unsupported" >&6; } ;;
18910  *)
18911    CC="$CC $ac_cv_prog_cc_c89"
18912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
18913$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
18914esac
18915if test "x$ac_cv_prog_cc_c89" != xno; then :
18916
18917fi
18918
18919ac_ext=cpp
18920ac_cpp='$CXXCPP $CPPFLAGS'
18921ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18922ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18923ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18924
18925
18926### Locate C++ compiler (CXX)
18927
18928if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18929  # Do not probe for CC on MacOSX.
18930  COMPILER_CHECK_LIST="cl g++"
18931else
18932  COMPILER_CHECK_LIST="cl CC g++"
18933fi
18934
18935  COMPILER_NAME=C++
18936
18937  # Do a first initial attempt at searching the list of compiler names.
18938  # AC_PATH_PROGS can't be run multiple times with the same variable,
18939  # so create a new name for this run.
18940  for ac_prog in $COMPILER_CHECK_LIST
18941do
18942  # Extract the first word of "$ac_prog", so it can be a program name with args.
18943set dummy $ac_prog; ac_word=$2
18944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18945$as_echo_n "checking for $ac_word... " >&6; }
18946if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
18947  $as_echo_n "(cached) " >&6
18948else
18949  case $POTENTIAL_CXX in
18950  [\\/]* | ?:[\\/]*)
18951  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
18952  ;;
18953  *)
18954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18955for as_dir in $PATH
18956do
18957  IFS=$as_save_IFS
18958  test -z "$as_dir" && as_dir=.
18959    for ac_exec_ext in '' $ac_executable_extensions; do
18960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18961    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
18962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18963    break 2
18964  fi
18965done
18966  done
18967IFS=$as_save_IFS
18968
18969  ;;
18970esac
18971fi
18972POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
18973if test -n "$POTENTIAL_CXX"; then
18974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
18975$as_echo "$POTENTIAL_CXX" >&6; }
18976else
18977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18978$as_echo "no" >&6; }
18979fi
18980
18981
18982  test -n "$POTENTIAL_CXX" && break
18983done
18984
18985  CXX=$POTENTIAL_CXX
18986
18987  if test "x$$CXX" = x; then
18988
18989    # Print a helpful message on how to acquire the necessary build dependency.
18990    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18991    MISSING_DEPENDENCY=devkit
18992    PKGHANDLER_COMMAND=
18993
18994    case $PKGHANDLER in
18995	apt-get)
18996                apt_help     $MISSING_DEPENDENCY ;;
18997    yum)
18998                yum_help     $MISSING_DEPENDENCY ;;
18999	port)
19000                port_help    $MISSING_DEPENDENCY ;;
19001	pkgutil)
19002                pkgutil_help $MISSING_DEPENDENCY ;;
19003	pkgadd)
19004                pkgadd_help  $MISSING_DEPENDENCY ;;
19005    * )
19006      break ;;
19007    esac
19008
19009    if test "x$PKGHANDLER_COMMAND" != x; then
19010        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19011    fi
19012
19013      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19014  fi
19015
19016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017
19018  # First separate the path from the arguments. This will split at the first
19019  # space.
19020  complete="$CXX"
19021  path="${complete%% *}"
19022  tmp="$complete EOL"
19023  arguments="${tmp#* }"
19024
19025  # Input might be given as Windows format, start by converting to
19026  # unix format.
19027  new_path=`$CYGPATH -u "$path"`
19028
19029  # Now try to locate executable using which
19030  new_path=`$WHICH "$new_path" 2> /dev/null`
19031  if test "x$new_path" = x; then
19032    # Oops. Which didn't find the executable.
19033    # The splitting of arguments from the executable at a space might have been incorrect,
19034    # since paths with space are more likely in Windows. Give it another try with the whole
19035    # argument.
19036    path="$complete"
19037    arguments="EOL"
19038    new_path=`$CYGPATH -u "$path"`
19039    new_path=`$WHICH "$new_path" 2> /dev/null`
19040    if test "x$new_path" = x; then
19041      # It's still not found. Now this is an unrecoverable error.
19042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19043$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19044      has_space=`$ECHO "$complete" | $GREP " "`
19045      if test "x$has_space" != x; then
19046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19048      fi
19049      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19050    fi
19051  fi
19052
19053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19056  # "foo.exe" is OK but "foo" is an error.
19057  #
19058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19059  # It is also a way to make sure we got the proper file name for the real test later on.
19060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19061  if test "x$test_shortpath" = x; then
19062    # Short path failed, file does not exist as specified.
19063    # Try adding .exe or .cmd
19064    if test -f "${new_path}.exe"; then
19065       input_to_shortpath="${new_path}.exe"
19066    elif test -f "${new_path}.cmd"; then
19067       input_to_shortpath="${new_path}.cmd"
19068    else
19069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19070$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19073      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19074    fi
19075  else
19076    input_to_shortpath="$new_path"
19077  fi
19078
19079  # Call helper function which possibly converts this using DOS-style short mode.
19080  # If so, the updated path is stored in $new_path.
19081  new_path="$input_to_shortpath"
19082
19083  input_path="$input_to_shortpath"
19084  # Check if we need to convert this using DOS-style short mode. If the path
19085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19086  # take no chances and rewrite it.
19087  # Note: m4 eats our [], so we need to use [ and ] instead.
19088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19089  if test "x$has_forbidden_chars" != x; then
19090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19094      # Going to short mode and back again did indeed matter. Since short mode is
19095      # case insensitive, let's make it lowercase to improve readability.
19096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19097      # Now convert it back to Unix-stile (cygpath)
19098      input_path=`$CYGPATH -u "$shortmode_path"`
19099      new_path="$input_path"
19100    fi
19101  fi
19102
19103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19104  if test "x$test_cygdrive_prefix" = x; then
19105    # As a simple fix, exclude /usr/bin since it's not a real path.
19106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19108      # a path prefixed by /cygdrive for fixpath to work.
19109      new_path="$CYGWIN_ROOT_PATH$input_path"
19110    fi
19111  fi
19112
19113  # remove trailing .exe if any
19114  new_path="${new_path/%.exe/}"
19115
19116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19117
19118  # First separate the path from the arguments. This will split at the first
19119  # space.
19120  complete="$CXX"
19121  path="${complete%% *}"
19122  tmp="$complete EOL"
19123  arguments="${tmp#* }"
19124
19125  # Input might be given as Windows format, start by converting to
19126  # unix format.
19127  new_path="$path"
19128
19129  windows_path="$new_path"
19130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19131    unix_path=`$CYGPATH -u "$windows_path"`
19132    new_path="$unix_path"
19133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19135    new_path="$unix_path"
19136  fi
19137
19138
19139  # Now try to locate executable using which
19140  new_path=`$WHICH "$new_path" 2> /dev/null`
19141
19142  if test "x$new_path" = x; then
19143    # Oops. Which didn't find the executable.
19144    # The splitting of arguments from the executable at a space might have been incorrect,
19145    # since paths with space are more likely in Windows. Give it another try with the whole
19146    # argument.
19147    path="$complete"
19148    arguments="EOL"
19149    new_path="$path"
19150
19151  windows_path="$new_path"
19152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19153    unix_path=`$CYGPATH -u "$windows_path"`
19154    new_path="$unix_path"
19155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19157    new_path="$unix_path"
19158  fi
19159
19160
19161    new_path=`$WHICH "$new_path" 2> /dev/null`
19162
19163    if test "x$new_path" = x; then
19164      # It's still not found. Now this is an unrecoverable error.
19165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19166$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19167      has_space=`$ECHO "$complete" | $GREP " "`
19168      if test "x$has_space" != x; then
19169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19171      fi
19172      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19173    fi
19174  fi
19175
19176  # Now new_path has a complete unix path to the binary
19177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19178    # Keep paths in /bin as-is, but remove trailing .exe if any
19179    new_path="${new_path/%.exe/}"
19180    # Do not save /bin paths to all_fixpath_prefixes!
19181  else
19182    # Not in mixed or Windows style, start by that.
19183    new_path=`cmd //c echo $new_path`
19184
19185  input_path="$new_path"
19186  # Check if we need to convert this using DOS-style short mode. If the path
19187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19188  # take no chances and rewrite it.
19189  # Note: m4 eats our [], so we need to use [ and ] instead.
19190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19191  if test "x$has_forbidden_chars" != x; then
19192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19194  fi
19195
19196    # Output is in $new_path
19197
19198  windows_path="$new_path"
19199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19200    unix_path=`$CYGPATH -u "$windows_path"`
19201    new_path="$unix_path"
19202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19204    new_path="$unix_path"
19205  fi
19206
19207    # remove trailing .exe if any
19208    new_path="${new_path/%.exe/}"
19209
19210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19212  fi
19213
19214  else
19215    # We're on a posix platform. Hooray! :)
19216    # First separate the path from the arguments. This will split at the first
19217    # space.
19218    complete="$CXX"
19219    path="${complete%% *}"
19220    tmp="$complete EOL"
19221    arguments="${tmp#* }"
19222
19223    new_path=`$WHICH $path 2> /dev/null`
19224    if test "x$new_path" = x; then
19225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19226      if test "x$is_absolute_path" != x; then
19227        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19228$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19229        new_path="$path"
19230      else
19231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19232$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19233        has_space=`$ECHO "$complete" | $GREP " "`
19234        if test "x$has_space" != x; then
19235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19237        fi
19238        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19239      fi
19240    fi
19241  fi
19242
19243  # Now join together the path and the arguments once again
19244  if test "x$arguments" != xEOL; then
19245      new_complete="$new_path ${arguments% *}"
19246  else
19247      new_complete="$new_path"
19248  fi
19249
19250  if test "x$complete" != "x$new_complete"; then
19251    CXX="$new_complete"
19252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19253$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19254  fi
19255
19256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19257$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19258  TEST_COMPILER="$CXX"
19259
19260    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19261        # Follow a chain of symbolic links. Use readlink
19262        # where it exists, else fall back to horribly
19263        # complicated shell code.
19264        if test "x$READLINK_TESTED" != yes; then
19265            # On MacOSX there is a readlink tool with a different
19266            # purpose than the GNU readlink tool. Check the found readlink.
19267            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19268            if test "x$ISGNU" = x; then
19269                 # A readlink that we do not know how to use.
19270                 # Are there other non-GNU readlinks out there?
19271                 READLINK_TESTED=yes
19272                 READLINK=
19273            fi
19274        fi
19275
19276        if test "x$READLINK" != x; then
19277            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19278        else
19279            STARTDIR=$PWD
19280            COUNTER=0
19281            DIR=`$DIRNAME $TEST_COMPILER`
19282            FILE=`$BASENAME $TEST_COMPILER`
19283            while test $COUNTER -lt 20; do
19284                ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19285                if test "x$ISLINK" == x; then
19286                    # This is not a symbolic link! We are done!
19287                    break
19288                fi
19289                # The link might be relative! We have to use cd to travel safely.
19290                cd $DIR
19291                # ... and we must get the to the absolute path, not one using symbolic links.
19292                cd `pwd -P`
19293                cd `$DIRNAME $ISLINK`
19294                DIR=`$THEPWDCMD`
19295                FILE=`$BASENAME $ISLINK`
19296                let COUNTER=COUNTER+1
19297            done
19298            cd $STARTDIR
19299            TEST_COMPILER=$DIR/$FILE
19300        fi
19301    fi
19302
19303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19304$as_echo "$TEST_COMPILER" >&6; }
19305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19306$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19307
19308  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19309  if test "x$COMPILER_BASENAME" = "xccache"; then
19310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19311$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19312    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19313    # We want to control ccache invocation ourselves, so ignore this cc and try
19314    # searching again.
19315
19316    # Remove the path to the fake ccache cc from the PATH
19317    RETRY_COMPILER_SAVED_PATH="$PATH"
19318    COMPILER_DIRNAME=`$DIRNAME $CXX`
19319    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19320
19321    # Try again looking for our compiler
19322    if test -n "$ac_tool_prefix"; then
19323  for ac_prog in $COMPILER_CHECK_LIST
19324  do
19325    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19326set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19328$as_echo_n "checking for $ac_word... " >&6; }
19329if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19330  $as_echo_n "(cached) " >&6
19331else
19332  if test -n "$PROPER_COMPILER_CXX"; then
19333  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19334else
19335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19336for as_dir in $PATH
19337do
19338  IFS=$as_save_IFS
19339  test -z "$as_dir" && as_dir=.
19340    for ac_exec_ext in '' $ac_executable_extensions; do
19341  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19342    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19344    break 2
19345  fi
19346done
19347  done
19348IFS=$as_save_IFS
19349
19350fi
19351fi
19352PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19353if test -n "$PROPER_COMPILER_CXX"; then
19354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19355$as_echo "$PROPER_COMPILER_CXX" >&6; }
19356else
19357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19358$as_echo "no" >&6; }
19359fi
19360
19361
19362    test -n "$PROPER_COMPILER_CXX" && break
19363  done
19364fi
19365if test -z "$PROPER_COMPILER_CXX"; then
19366  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19367  for ac_prog in $COMPILER_CHECK_LIST
19368do
19369  # Extract the first word of "$ac_prog", so it can be a program name with args.
19370set dummy $ac_prog; ac_word=$2
19371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19372$as_echo_n "checking for $ac_word... " >&6; }
19373if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19374  $as_echo_n "(cached) " >&6
19375else
19376  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19377  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19378else
19379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19380for as_dir in $PATH
19381do
19382  IFS=$as_save_IFS
19383  test -z "$as_dir" && as_dir=.
19384    for ac_exec_ext in '' $ac_executable_extensions; do
19385  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19386    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19388    break 2
19389  fi
19390done
19391  done
19392IFS=$as_save_IFS
19393
19394fi
19395fi
19396ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19397if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19399$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19400else
19401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19402$as_echo "no" >&6; }
19403fi
19404
19405
19406  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19407done
19408
19409  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19410    PROPER_COMPILER_CXX=""
19411  else
19412    case $cross_compiling:$ac_tool_warned in
19413yes:)
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19416ac_tool_warned=yes ;;
19417esac
19418    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19419  fi
19420fi
19421
19422
19423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19424
19425  # First separate the path from the arguments. This will split at the first
19426  # space.
19427  complete="$PROPER_COMPILER_CXX"
19428  path="${complete%% *}"
19429  tmp="$complete EOL"
19430  arguments="${tmp#* }"
19431
19432  # Input might be given as Windows format, start by converting to
19433  # unix format.
19434  new_path=`$CYGPATH -u "$path"`
19435
19436  # Now try to locate executable using which
19437  new_path=`$WHICH "$new_path" 2> /dev/null`
19438  if test "x$new_path" = x; then
19439    # Oops. Which didn't find the executable.
19440    # The splitting of arguments from the executable at a space might have been incorrect,
19441    # since paths with space are more likely in Windows. Give it another try with the whole
19442    # argument.
19443    path="$complete"
19444    arguments="EOL"
19445    new_path=`$CYGPATH -u "$path"`
19446    new_path=`$WHICH "$new_path" 2> /dev/null`
19447    if test "x$new_path" = x; then
19448      # It's still not found. Now this is an unrecoverable error.
19449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19450$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19451      has_space=`$ECHO "$complete" | $GREP " "`
19452      if test "x$has_space" != x; then
19453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19455      fi
19456      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19457    fi
19458  fi
19459
19460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19463  # "foo.exe" is OK but "foo" is an error.
19464  #
19465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19466  # It is also a way to make sure we got the proper file name for the real test later on.
19467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19468  if test "x$test_shortpath" = x; then
19469    # Short path failed, file does not exist as specified.
19470    # Try adding .exe or .cmd
19471    if test -f "${new_path}.exe"; then
19472       input_to_shortpath="${new_path}.exe"
19473    elif test -f "${new_path}.cmd"; then
19474       input_to_shortpath="${new_path}.cmd"
19475    else
19476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19477$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19480      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19481    fi
19482  else
19483    input_to_shortpath="$new_path"
19484  fi
19485
19486  # Call helper function which possibly converts this using DOS-style short mode.
19487  # If so, the updated path is stored in $new_path.
19488  new_path="$input_to_shortpath"
19489
19490  input_path="$input_to_shortpath"
19491  # Check if we need to convert this using DOS-style short mode. If the path
19492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19493  # take no chances and rewrite it.
19494  # Note: m4 eats our [], so we need to use [ and ] instead.
19495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19496  if test "x$has_forbidden_chars" != x; then
19497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19501      # Going to short mode and back again did indeed matter. Since short mode is
19502      # case insensitive, let's make it lowercase to improve readability.
19503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19504      # Now convert it back to Unix-stile (cygpath)
19505      input_path=`$CYGPATH -u "$shortmode_path"`
19506      new_path="$input_path"
19507    fi
19508  fi
19509
19510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19511  if test "x$test_cygdrive_prefix" = x; then
19512    # As a simple fix, exclude /usr/bin since it's not a real path.
19513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19515      # a path prefixed by /cygdrive for fixpath to work.
19516      new_path="$CYGWIN_ROOT_PATH$input_path"
19517    fi
19518  fi
19519
19520  # remove trailing .exe if any
19521  new_path="${new_path/%.exe/}"
19522
19523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19524
19525  # First separate the path from the arguments. This will split at the first
19526  # space.
19527  complete="$PROPER_COMPILER_CXX"
19528  path="${complete%% *}"
19529  tmp="$complete EOL"
19530  arguments="${tmp#* }"
19531
19532  # Input might be given as Windows format, start by converting to
19533  # unix format.
19534  new_path="$path"
19535
19536  windows_path="$new_path"
19537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19538    unix_path=`$CYGPATH -u "$windows_path"`
19539    new_path="$unix_path"
19540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19542    new_path="$unix_path"
19543  fi
19544
19545
19546  # Now try to locate executable using which
19547  new_path=`$WHICH "$new_path" 2> /dev/null`
19548
19549  if test "x$new_path" = x; then
19550    # Oops. Which didn't find the executable.
19551    # The splitting of arguments from the executable at a space might have been incorrect,
19552    # since paths with space are more likely in Windows. Give it another try with the whole
19553    # argument.
19554    path="$complete"
19555    arguments="EOL"
19556    new_path="$path"
19557
19558  windows_path="$new_path"
19559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19560    unix_path=`$CYGPATH -u "$windows_path"`
19561    new_path="$unix_path"
19562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19564    new_path="$unix_path"
19565  fi
19566
19567
19568    new_path=`$WHICH "$new_path" 2> /dev/null`
19569
19570    if test "x$new_path" = x; then
19571      # It's still not found. Now this is an unrecoverable error.
19572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19573$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19574      has_space=`$ECHO "$complete" | $GREP " "`
19575      if test "x$has_space" != x; then
19576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19578      fi
19579      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19580    fi
19581  fi
19582
19583  # Now new_path has a complete unix path to the binary
19584  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19585    # Keep paths in /bin as-is, but remove trailing .exe if any
19586    new_path="${new_path/%.exe/}"
19587    # Do not save /bin paths to all_fixpath_prefixes!
19588  else
19589    # Not in mixed or Windows style, start by that.
19590    new_path=`cmd //c echo $new_path`
19591
19592  input_path="$new_path"
19593  # Check if we need to convert this using DOS-style short mode. If the path
19594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19595  # take no chances and rewrite it.
19596  # Note: m4 eats our [], so we need to use [ and ] instead.
19597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19598  if test "x$has_forbidden_chars" != x; then
19599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19601  fi
19602
19603    # Output is in $new_path
19604
19605  windows_path="$new_path"
19606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19607    unix_path=`$CYGPATH -u "$windows_path"`
19608    new_path="$unix_path"
19609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19611    new_path="$unix_path"
19612  fi
19613
19614    # remove trailing .exe if any
19615    new_path="${new_path/%.exe/}"
19616
19617    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19618    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19619  fi
19620
19621  else
19622    # We're on a posix platform. Hooray! :)
19623    # First separate the path from the arguments. This will split at the first
19624    # space.
19625    complete="$PROPER_COMPILER_CXX"
19626    path="${complete%% *}"
19627    tmp="$complete EOL"
19628    arguments="${tmp#* }"
19629
19630    new_path=`$WHICH $path 2> /dev/null`
19631    if test "x$new_path" = x; then
19632      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19633      if test "x$is_absolute_path" != x; then
19634        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19635$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19636        new_path="$path"
19637      else
19638        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19639$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19640        has_space=`$ECHO "$complete" | $GREP " "`
19641        if test "x$has_space" != x; then
19642          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19644        fi
19645        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19646      fi
19647    fi
19648  fi
19649
19650  # Now join together the path and the arguments once again
19651  if test "x$arguments" != xEOL; then
19652      new_complete="$new_path ${arguments% *}"
19653  else
19654      new_complete="$new_path"
19655  fi
19656
19657  if test "x$complete" != "x$new_complete"; then
19658    PROPER_COMPILER_CXX="$new_complete"
19659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
19660$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
19661  fi
19662
19663    PATH="$RETRY_COMPILER_SAVED_PATH"
19664
19665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
19666$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
19667
19668    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19669        # Follow a chain of symbolic links. Use readlink
19670        # where it exists, else fall back to horribly
19671        # complicated shell code.
19672        if test "x$READLINK_TESTED" != yes; then
19673            # On MacOSX there is a readlink tool with a different
19674            # purpose than the GNU readlink tool. Check the found readlink.
19675            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19676            if test "x$ISGNU" = x; then
19677                 # A readlink that we do not know how to use.
19678                 # Are there other non-GNU readlinks out there?
19679                 READLINK_TESTED=yes
19680                 READLINK=
19681            fi
19682        fi
19683
19684        if test "x$READLINK" != x; then
19685            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
19686        else
19687            STARTDIR=$PWD
19688            COUNTER=0
19689            DIR=`$DIRNAME $PROPER_COMPILER_CXX`
19690            FILE=`$BASENAME $PROPER_COMPILER_CXX`
19691            while test $COUNTER -lt 20; do
19692                ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19693                if test "x$ISLINK" == x; then
19694                    # This is not a symbolic link! We are done!
19695                    break
19696                fi
19697                # The link might be relative! We have to use cd to travel safely.
19698                cd $DIR
19699                # ... and we must get the to the absolute path, not one using symbolic links.
19700                cd `pwd -P`
19701                cd `$DIRNAME $ISLINK`
19702                DIR=`$THEPWDCMD`
19703                FILE=`$BASENAME $ISLINK`
19704                let COUNTER=COUNTER+1
19705            done
19706            cd $STARTDIR
19707            PROPER_COMPILER_CXX=$DIR/$FILE
19708        fi
19709    fi
19710
19711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19712$as_echo "$PROPER_COMPILER_CXX" >&6; }
19713    CXX="$PROPER_COMPILER_CXX"
19714  else
19715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
19716$as_echo "no, keeping CXX" >&6; }
19717    CXX="$TEST_COMPILER"
19718  fi
19719
19720  COMPILER=$CXX
19721  COMPILER_NAME=$COMPILER_NAME
19722
19723  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19724    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19725    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19726    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19727    if test $? -ne 0; then
19728      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19729
19730      { $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
19731$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19732      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19733$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19734      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19735    else
19736      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19737      COMPILER_VENDOR="Sun Studio"
19738    fi
19739  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19740    # First line typically looks something like:
19741    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19742    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19743    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19744    COMPILER_VENDOR="Microsoft CL.EXE"
19745    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19746    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19747      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19748        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19749      fi
19750    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19751      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19752        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19753      fi
19754    fi
19755  else
19756    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19757    # Check that this is likely to be GCC.
19758    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19759    if test $? -ne 0; then
19760      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19761$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19762      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19763$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19764      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19765    fi
19766
19767    # First line typically looks something like:
19768    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19769    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19770    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19771  fi
19772  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19773  CXX_VERSION="$COMPILER_VERSION"
19774  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19775  CXX_VENDOR="$COMPILER_VENDOR"
19776
19777  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19778$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19779
19780
19781# Now that we have resolved CXX ourself, let autoconf have it's go at it
19782ac_ext=cpp
19783ac_cpp='$CXXCPP $CPPFLAGS'
19784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19787if test -z "$CXX"; then
19788  if test -n "$CCC"; then
19789    CXX=$CCC
19790  else
19791    if test -n "$ac_tool_prefix"; then
19792  for ac_prog in $CXX
19793  do
19794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19797$as_echo_n "checking for $ac_word... " >&6; }
19798if test "${ac_cv_prog_CXX+set}" = set; then :
19799  $as_echo_n "(cached) " >&6
19800else
19801  if test -n "$CXX"; then
19802  ac_cv_prog_CXX="$CXX" # Let the user override the test.
19803else
19804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19805for as_dir in $PATH
19806do
19807  IFS=$as_save_IFS
19808  test -z "$as_dir" && as_dir=.
19809    for ac_exec_ext in '' $ac_executable_extensions; do
19810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19811    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
19812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19813    break 2
19814  fi
19815done
19816  done
19817IFS=$as_save_IFS
19818
19819fi
19820fi
19821CXX=$ac_cv_prog_CXX
19822if test -n "$CXX"; then
19823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
19824$as_echo "$CXX" >&6; }
19825else
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19827$as_echo "no" >&6; }
19828fi
19829
19830
19831    test -n "$CXX" && break
19832  done
19833fi
19834if test -z "$CXX"; then
19835  ac_ct_CXX=$CXX
19836  for ac_prog in $CXX
19837do
19838  # Extract the first word of "$ac_prog", so it can be a program name with args.
19839set dummy $ac_prog; ac_word=$2
19840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19841$as_echo_n "checking for $ac_word... " >&6; }
19842if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
19843  $as_echo_n "(cached) " >&6
19844else
19845  if test -n "$ac_ct_CXX"; then
19846  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
19847else
19848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19849for as_dir in $PATH
19850do
19851  IFS=$as_save_IFS
19852  test -z "$as_dir" && as_dir=.
19853    for ac_exec_ext in '' $ac_executable_extensions; do
19854  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19855    ac_cv_prog_ac_ct_CXX="$ac_prog"
19856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19857    break 2
19858  fi
19859done
19860  done
19861IFS=$as_save_IFS
19862
19863fi
19864fi
19865ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
19866if test -n "$ac_ct_CXX"; then
19867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
19868$as_echo "$ac_ct_CXX" >&6; }
19869else
19870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19871$as_echo "no" >&6; }
19872fi
19873
19874
19875  test -n "$ac_ct_CXX" && break
19876done
19877
19878  if test "x$ac_ct_CXX" = x; then
19879    CXX="g++"
19880  else
19881    case $cross_compiling:$ac_tool_warned in
19882yes:)
19883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19885ac_tool_warned=yes ;;
19886esac
19887    CXX=$ac_ct_CXX
19888  fi
19889fi
19890
19891  fi
19892fi
19893# Provide some information about the compiler.
19894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
19895set X $ac_compile
19896ac_compiler=$2
19897for ac_option in --version -v -V -qversion; do
19898  { { ac_try="$ac_compiler $ac_option >&5"
19899case "(($ac_try" in
19900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19901  *) ac_try_echo=$ac_try;;
19902esac
19903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19904$as_echo "$ac_try_echo"; } >&5
19905  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19906  ac_status=$?
19907  if test -s conftest.err; then
19908    sed '10a\
19909... rest of stderr output deleted ...
19910         10q' conftest.err >conftest.er1
19911    cat conftest.er1 >&5
19912  fi
19913  rm -f conftest.er1 conftest.err
19914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19915  test $ac_status = 0; }
19916done
19917
19918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
19919$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
19920if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
19921  $as_echo_n "(cached) " >&6
19922else
19923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19924/* end confdefs.h.  */
19925
19926int
19927main ()
19928{
19929#ifndef __GNUC__
19930       choke me
19931#endif
19932
19933  ;
19934  return 0;
19935}
19936_ACEOF
19937if ac_fn_cxx_try_compile "$LINENO"; then :
19938  ac_compiler_gnu=yes
19939else
19940  ac_compiler_gnu=no
19941fi
19942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19943ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
19944
19945fi
19946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
19947$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
19948if test $ac_compiler_gnu = yes; then
19949  GXX=yes
19950else
19951  GXX=
19952fi
19953ac_test_CXXFLAGS=${CXXFLAGS+set}
19954ac_save_CXXFLAGS=$CXXFLAGS
19955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
19956$as_echo_n "checking whether $CXX accepts -g... " >&6; }
19957if test "${ac_cv_prog_cxx_g+set}" = set; then :
19958  $as_echo_n "(cached) " >&6
19959else
19960  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
19961   ac_cxx_werror_flag=yes
19962   ac_cv_prog_cxx_g=no
19963   CXXFLAGS="-g"
19964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19965/* end confdefs.h.  */
19966
19967int
19968main ()
19969{
19970
19971  ;
19972  return 0;
19973}
19974_ACEOF
19975if ac_fn_cxx_try_compile "$LINENO"; then :
19976  ac_cv_prog_cxx_g=yes
19977else
19978  CXXFLAGS=""
19979      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19980/* end confdefs.h.  */
19981
19982int
19983main ()
19984{
19985
19986  ;
19987  return 0;
19988}
19989_ACEOF
19990if ac_fn_cxx_try_compile "$LINENO"; then :
19991
19992else
19993  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
19994	 CXXFLAGS="-g"
19995	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19996/* end confdefs.h.  */
19997
19998int
19999main ()
20000{
20001
20002  ;
20003  return 0;
20004}
20005_ACEOF
20006if ac_fn_cxx_try_compile "$LINENO"; then :
20007  ac_cv_prog_cxx_g=yes
20008fi
20009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20010fi
20011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20012fi
20013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20014   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20015fi
20016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20017$as_echo "$ac_cv_prog_cxx_g" >&6; }
20018if test "$ac_test_CXXFLAGS" = set; then
20019  CXXFLAGS=$ac_save_CXXFLAGS
20020elif test $ac_cv_prog_cxx_g = yes; then
20021  if test "$GXX" = yes; then
20022    CXXFLAGS="-g -O2"
20023  else
20024    CXXFLAGS="-g"
20025  fi
20026else
20027  if test "$GXX" = yes; then
20028    CXXFLAGS="-O2"
20029  else
20030    CXXFLAGS=
20031  fi
20032fi
20033ac_ext=cpp
20034ac_cpp='$CXXCPP $CPPFLAGS'
20035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20038
20039
20040### Locate other tools
20041
20042if test "x$OPENJDK_TARGET_OS" != xwindows; then
20043    ac_ext=m
20044ac_cpp='$OBJCPP $CPPFLAGS'
20045ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20046ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20047ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20048if test -n "$ac_tool_prefix"; then
20049  for ac_prog in gcc objcc objc cc CC
20050  do
20051    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20054$as_echo_n "checking for $ac_word... " >&6; }
20055if test "${ac_cv_prog_OBJC+set}" = set; then :
20056  $as_echo_n "(cached) " >&6
20057else
20058  if test -n "$OBJC"; then
20059  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20060else
20061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20062for as_dir in $PATH
20063do
20064  IFS=$as_save_IFS
20065  test -z "$as_dir" && as_dir=.
20066    for ac_exec_ext in '' $ac_executable_extensions; do
20067  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20068    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20070    break 2
20071  fi
20072done
20073  done
20074IFS=$as_save_IFS
20075
20076fi
20077fi
20078OBJC=$ac_cv_prog_OBJC
20079if test -n "$OBJC"; then
20080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20081$as_echo "$OBJC" >&6; }
20082else
20083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20084$as_echo "no" >&6; }
20085fi
20086
20087
20088    test -n "$OBJC" && break
20089  done
20090fi
20091if test -z "$OBJC"; then
20092  ac_ct_OBJC=$OBJC
20093  for ac_prog in gcc objcc objc cc CC
20094do
20095  # Extract the first word of "$ac_prog", so it can be a program name with args.
20096set dummy $ac_prog; ac_word=$2
20097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20098$as_echo_n "checking for $ac_word... " >&6; }
20099if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20100  $as_echo_n "(cached) " >&6
20101else
20102  if test -n "$ac_ct_OBJC"; then
20103  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20104else
20105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20106for as_dir in $PATH
20107do
20108  IFS=$as_save_IFS
20109  test -z "$as_dir" && as_dir=.
20110    for ac_exec_ext in '' $ac_executable_extensions; do
20111  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20112    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20114    break 2
20115  fi
20116done
20117  done
20118IFS=$as_save_IFS
20119
20120fi
20121fi
20122ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20123if test -n "$ac_ct_OBJC"; then
20124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20125$as_echo "$ac_ct_OBJC" >&6; }
20126else
20127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20128$as_echo "no" >&6; }
20129fi
20130
20131
20132  test -n "$ac_ct_OBJC" && break
20133done
20134
20135  if test "x$ac_ct_OBJC" = x; then
20136    OBJC="gcc"
20137  else
20138    case $cross_compiling:$ac_tool_warned in
20139yes:)
20140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20142ac_tool_warned=yes ;;
20143esac
20144    OBJC=$ac_ct_OBJC
20145  fi
20146fi
20147
20148# Provide some information about the compiler.
20149$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20150set X $ac_compile
20151ac_compiler=$2
20152for ac_option in --version -v -V -qversion; do
20153  { { ac_try="$ac_compiler $ac_option >&5"
20154case "(($ac_try" in
20155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20156  *) ac_try_echo=$ac_try;;
20157esac
20158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20159$as_echo "$ac_try_echo"; } >&5
20160  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20161  ac_status=$?
20162  if test -s conftest.err; then
20163    sed '10a\
20164... rest of stderr output deleted ...
20165         10q' conftest.err >conftest.er1
20166    cat conftest.er1 >&5
20167  fi
20168  rm -f conftest.er1 conftest.err
20169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20170  test $ac_status = 0; }
20171done
20172
20173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20174$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20175if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20176  $as_echo_n "(cached) " >&6
20177else
20178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20179/* end confdefs.h.  */
20180
20181int
20182main ()
20183{
20184#ifndef __GNUC__
20185       choke me
20186#endif
20187
20188  ;
20189  return 0;
20190}
20191_ACEOF
20192if ac_fn_objc_try_compile "$LINENO"; then :
20193  ac_compiler_gnu=yes
20194else
20195  ac_compiler_gnu=no
20196fi
20197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20198ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20199
20200fi
20201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20202$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20203if test $ac_compiler_gnu = yes; then
20204  GOBJC=yes
20205else
20206  GOBJC=
20207fi
20208ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20209ac_save_OBJCFLAGS=$OBJCFLAGS
20210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20211$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20212if test "${ac_cv_prog_objc_g+set}" = set; then :
20213  $as_echo_n "(cached) " >&6
20214else
20215  ac_save_objc_werror_flag=$ac_objc_werror_flag
20216   ac_objc_werror_flag=yes
20217   ac_cv_prog_objc_g=no
20218   OBJCFLAGS="-g"
20219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20220/* end confdefs.h.  */
20221
20222int
20223main ()
20224{
20225
20226  ;
20227  return 0;
20228}
20229_ACEOF
20230if ac_fn_objc_try_compile "$LINENO"; then :
20231  ac_cv_prog_objc_g=yes
20232else
20233  OBJCFLAGS=""
20234      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20235/* end confdefs.h.  */
20236
20237int
20238main ()
20239{
20240
20241  ;
20242  return 0;
20243}
20244_ACEOF
20245if ac_fn_objc_try_compile "$LINENO"; then :
20246
20247else
20248  ac_objc_werror_flag=$ac_save_objc_werror_flag
20249	 OBJCFLAGS="-g"
20250	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20251/* end confdefs.h.  */
20252
20253int
20254main ()
20255{
20256
20257  ;
20258  return 0;
20259}
20260_ACEOF
20261if ac_fn_objc_try_compile "$LINENO"; then :
20262  ac_cv_prog_objc_g=yes
20263fi
20264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20265fi
20266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20267fi
20268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20269   ac_objc_werror_flag=$ac_save_objc_werror_flag
20270fi
20271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20272$as_echo "$ac_cv_prog_objc_g" >&6; }
20273if test "$ac_test_OBJCFLAGS" = set; then
20274  OBJCFLAGS=$ac_save_OBJCFLAGS
20275elif test $ac_cv_prog_objc_g = yes; then
20276  if test "$GOBJC" = yes; then
20277    OBJCFLAGS="-g -O2"
20278  else
20279    OBJCFLAGS="-g"
20280  fi
20281else
20282  if test "$GOBJC" = yes; then
20283    OBJCFLAGS="-O2"
20284  else
20285    OBJCFLAGS=
20286  fi
20287fi
20288ac_ext=cpp
20289ac_cpp='$CXXCPP $CPPFLAGS'
20290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20293
20294
20295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20296
20297  # First separate the path from the arguments. This will split at the first
20298  # space.
20299  complete="$OBJC"
20300  path="${complete%% *}"
20301  tmp="$complete EOL"
20302  arguments="${tmp#* }"
20303
20304  # Input might be given as Windows format, start by converting to
20305  # unix format.
20306  new_path=`$CYGPATH -u "$path"`
20307
20308  # Now try to locate executable using which
20309  new_path=`$WHICH "$new_path" 2> /dev/null`
20310  if test "x$new_path" = x; then
20311    # Oops. Which didn't find the executable.
20312    # The splitting of arguments from the executable at a space might have been incorrect,
20313    # since paths with space are more likely in Windows. Give it another try with the whole
20314    # argument.
20315    path="$complete"
20316    arguments="EOL"
20317    new_path=`$CYGPATH -u "$path"`
20318    new_path=`$WHICH "$new_path" 2> /dev/null`
20319    if test "x$new_path" = x; then
20320      # It's still not found. Now this is an unrecoverable error.
20321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20322$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20323      has_space=`$ECHO "$complete" | $GREP " "`
20324      if test "x$has_space" != x; then
20325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20327      fi
20328      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20329    fi
20330  fi
20331
20332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20335  # "foo.exe" is OK but "foo" is an error.
20336  #
20337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20338  # It is also a way to make sure we got the proper file name for the real test later on.
20339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20340  if test "x$test_shortpath" = x; then
20341    # Short path failed, file does not exist as specified.
20342    # Try adding .exe or .cmd
20343    if test -f "${new_path}.exe"; then
20344       input_to_shortpath="${new_path}.exe"
20345    elif test -f "${new_path}.cmd"; then
20346       input_to_shortpath="${new_path}.cmd"
20347    else
20348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20349$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20352      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20353    fi
20354  else
20355    input_to_shortpath="$new_path"
20356  fi
20357
20358  # Call helper function which possibly converts this using DOS-style short mode.
20359  # If so, the updated path is stored in $new_path.
20360  new_path="$input_to_shortpath"
20361
20362  input_path="$input_to_shortpath"
20363  # Check if we need to convert this using DOS-style short mode. If the path
20364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20365  # take no chances and rewrite it.
20366  # Note: m4 eats our [], so we need to use [ and ] instead.
20367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20368  if test "x$has_forbidden_chars" != x; then
20369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20373      # Going to short mode and back again did indeed matter. Since short mode is
20374      # case insensitive, let's make it lowercase to improve readability.
20375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20376      # Now convert it back to Unix-stile (cygpath)
20377      input_path=`$CYGPATH -u "$shortmode_path"`
20378      new_path="$input_path"
20379    fi
20380  fi
20381
20382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20383  if test "x$test_cygdrive_prefix" = x; then
20384    # As a simple fix, exclude /usr/bin since it's not a real path.
20385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20387      # a path prefixed by /cygdrive for fixpath to work.
20388      new_path="$CYGWIN_ROOT_PATH$input_path"
20389    fi
20390  fi
20391
20392  # remove trailing .exe if any
20393  new_path="${new_path/%.exe/}"
20394
20395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20396
20397  # First separate the path from the arguments. This will split at the first
20398  # space.
20399  complete="$OBJC"
20400  path="${complete%% *}"
20401  tmp="$complete EOL"
20402  arguments="${tmp#* }"
20403
20404  # Input might be given as Windows format, start by converting to
20405  # unix format.
20406  new_path="$path"
20407
20408  windows_path="$new_path"
20409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20410    unix_path=`$CYGPATH -u "$windows_path"`
20411    new_path="$unix_path"
20412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20414    new_path="$unix_path"
20415  fi
20416
20417
20418  # Now try to locate executable using which
20419  new_path=`$WHICH "$new_path" 2> /dev/null`
20420
20421  if test "x$new_path" = x; then
20422    # Oops. Which didn't find the executable.
20423    # The splitting of arguments from the executable at a space might have been incorrect,
20424    # since paths with space are more likely in Windows. Give it another try with the whole
20425    # argument.
20426    path="$complete"
20427    arguments="EOL"
20428    new_path="$path"
20429
20430  windows_path="$new_path"
20431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20432    unix_path=`$CYGPATH -u "$windows_path"`
20433    new_path="$unix_path"
20434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20436    new_path="$unix_path"
20437  fi
20438
20439
20440    new_path=`$WHICH "$new_path" 2> /dev/null`
20441
20442    if test "x$new_path" = x; then
20443      # It's still not found. Now this is an unrecoverable error.
20444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20445$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20446      has_space=`$ECHO "$complete" | $GREP " "`
20447      if test "x$has_space" != x; then
20448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20450      fi
20451      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20452    fi
20453  fi
20454
20455  # Now new_path has a complete unix path to the binary
20456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20457    # Keep paths in /bin as-is, but remove trailing .exe if any
20458    new_path="${new_path/%.exe/}"
20459    # Do not save /bin paths to all_fixpath_prefixes!
20460  else
20461    # Not in mixed or Windows style, start by that.
20462    new_path=`cmd //c echo $new_path`
20463
20464  input_path="$new_path"
20465  # Check if we need to convert this using DOS-style short mode. If the path
20466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20467  # take no chances and rewrite it.
20468  # Note: m4 eats our [], so we need to use [ and ] instead.
20469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20470  if test "x$has_forbidden_chars" != x; then
20471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20473  fi
20474
20475    # Output is in $new_path
20476
20477  windows_path="$new_path"
20478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20479    unix_path=`$CYGPATH -u "$windows_path"`
20480    new_path="$unix_path"
20481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20483    new_path="$unix_path"
20484  fi
20485
20486    # remove trailing .exe if any
20487    new_path="${new_path/%.exe/}"
20488
20489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20491  fi
20492
20493  else
20494    # We're on a posix platform. Hooray! :)
20495    # First separate the path from the arguments. This will split at the first
20496    # space.
20497    complete="$OBJC"
20498    path="${complete%% *}"
20499    tmp="$complete EOL"
20500    arguments="${tmp#* }"
20501
20502    new_path=`$WHICH $path 2> /dev/null`
20503    if test "x$new_path" = x; then
20504      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20505      if test "x$is_absolute_path" != x; then
20506        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20507$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20508        new_path="$path"
20509      else
20510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20511$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20512        has_space=`$ECHO "$complete" | $GREP " "`
20513        if test "x$has_space" != x; then
20514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20516        fi
20517        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20518      fi
20519    fi
20520  fi
20521
20522  # Now join together the path and the arguments once again
20523  if test "x$arguments" != xEOL; then
20524      new_complete="$new_path ${arguments% *}"
20525  else
20526      new_complete="$new_path"
20527  fi
20528
20529  if test "x$complete" != "x$new_complete"; then
20530    OBJC="$new_complete"
20531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20532$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20533  fi
20534
20535else
20536    OBJC=
20537fi
20538
20539# Restore the flags to the user specified values.
20540# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20541CFLAGS="$ORG_CFLAGS"
20542CXXFLAGS="$ORG_CXXFLAGS"
20543OBJCFLAGS="$ORG_OBJCFLAGS"
20544
20545LD="$CC"
20546LDEXE="$CC"
20547LDCXX="$CXX"
20548LDEXECXX="$CXX"
20549
20550# LDEXE is the linker to use, when creating executables.
20551
20552# Linking C++ libraries.
20553
20554# Linking C++ executables.
20555
20556
20557if test "x$OPENJDK_TARGET_OS" != xwindows; then
20558    if test -n "$ac_tool_prefix"; then
20559  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20560set dummy ${ac_tool_prefix}ar; ac_word=$2
20561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20562$as_echo_n "checking for $ac_word... " >&6; }
20563if test "${ac_cv_prog_AR+set}" = set; then :
20564  $as_echo_n "(cached) " >&6
20565else
20566  if test -n "$AR"; then
20567  ac_cv_prog_AR="$AR" # Let the user override the test.
20568else
20569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20570for as_dir in $PATH
20571do
20572  IFS=$as_save_IFS
20573  test -z "$as_dir" && as_dir=.
20574    for ac_exec_ext in '' $ac_executable_extensions; do
20575  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20576    ac_cv_prog_AR="${ac_tool_prefix}ar"
20577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20578    break 2
20579  fi
20580done
20581  done
20582IFS=$as_save_IFS
20583
20584fi
20585fi
20586AR=$ac_cv_prog_AR
20587if test -n "$AR"; then
20588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20589$as_echo "$AR" >&6; }
20590else
20591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20592$as_echo "no" >&6; }
20593fi
20594
20595
20596fi
20597if test -z "$ac_cv_prog_AR"; then
20598  ac_ct_AR=$AR
20599  # Extract the first word of "ar", so it can be a program name with args.
20600set dummy ar; ac_word=$2
20601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20602$as_echo_n "checking for $ac_word... " >&6; }
20603if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20604  $as_echo_n "(cached) " >&6
20605else
20606  if test -n "$ac_ct_AR"; then
20607  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20608else
20609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20610for as_dir in $PATH
20611do
20612  IFS=$as_save_IFS
20613  test -z "$as_dir" && as_dir=.
20614    for ac_exec_ext in '' $ac_executable_extensions; do
20615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20616    ac_cv_prog_ac_ct_AR="ar"
20617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20618    break 2
20619  fi
20620done
20621  done
20622IFS=$as_save_IFS
20623
20624fi
20625fi
20626ac_ct_AR=$ac_cv_prog_ac_ct_AR
20627if test -n "$ac_ct_AR"; then
20628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20629$as_echo "$ac_ct_AR" >&6; }
20630else
20631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20632$as_echo "no" >&6; }
20633fi
20634
20635  if test "x$ac_ct_AR" = x; then
20636    AR=""
20637  else
20638    case $cross_compiling:$ac_tool_warned in
20639yes:)
20640{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20641$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20642ac_tool_warned=yes ;;
20643esac
20644    AR=$ac_ct_AR
20645  fi
20646else
20647  AR="$ac_cv_prog_AR"
20648fi
20649
20650
20651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20652
20653  # First separate the path from the arguments. This will split at the first
20654  # space.
20655  complete="$AR"
20656  path="${complete%% *}"
20657  tmp="$complete EOL"
20658  arguments="${tmp#* }"
20659
20660  # Input might be given as Windows format, start by converting to
20661  # unix format.
20662  new_path=`$CYGPATH -u "$path"`
20663
20664  # Now try to locate executable using which
20665  new_path=`$WHICH "$new_path" 2> /dev/null`
20666  if test "x$new_path" = x; then
20667    # Oops. Which didn't find the executable.
20668    # The splitting of arguments from the executable at a space might have been incorrect,
20669    # since paths with space are more likely in Windows. Give it another try with the whole
20670    # argument.
20671    path="$complete"
20672    arguments="EOL"
20673    new_path=`$CYGPATH -u "$path"`
20674    new_path=`$WHICH "$new_path" 2> /dev/null`
20675    if test "x$new_path" = x; then
20676      # It's still not found. Now this is an unrecoverable error.
20677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20678$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20679      has_space=`$ECHO "$complete" | $GREP " "`
20680      if test "x$has_space" != x; then
20681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20683      fi
20684      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20685    fi
20686  fi
20687
20688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20691  # "foo.exe" is OK but "foo" is an error.
20692  #
20693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20694  # It is also a way to make sure we got the proper file name for the real test later on.
20695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20696  if test "x$test_shortpath" = x; then
20697    # Short path failed, file does not exist as specified.
20698    # Try adding .exe or .cmd
20699    if test -f "${new_path}.exe"; then
20700       input_to_shortpath="${new_path}.exe"
20701    elif test -f "${new_path}.cmd"; then
20702       input_to_shortpath="${new_path}.cmd"
20703    else
20704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
20705$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
20706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20708      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20709    fi
20710  else
20711    input_to_shortpath="$new_path"
20712  fi
20713
20714  # Call helper function which possibly converts this using DOS-style short mode.
20715  # If so, the updated path is stored in $new_path.
20716  new_path="$input_to_shortpath"
20717
20718  input_path="$input_to_shortpath"
20719  # Check if we need to convert this using DOS-style short mode. If the path
20720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20721  # take no chances and rewrite it.
20722  # Note: m4 eats our [], so we need to use [ and ] instead.
20723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20724  if test "x$has_forbidden_chars" != x; then
20725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20729      # Going to short mode and back again did indeed matter. Since short mode is
20730      # case insensitive, let's make it lowercase to improve readability.
20731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20732      # Now convert it back to Unix-stile (cygpath)
20733      input_path=`$CYGPATH -u "$shortmode_path"`
20734      new_path="$input_path"
20735    fi
20736  fi
20737
20738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20739  if test "x$test_cygdrive_prefix" = x; then
20740    # As a simple fix, exclude /usr/bin since it's not a real path.
20741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20743      # a path prefixed by /cygdrive for fixpath to work.
20744      new_path="$CYGWIN_ROOT_PATH$input_path"
20745    fi
20746  fi
20747
20748  # remove trailing .exe if any
20749  new_path="${new_path/%.exe/}"
20750
20751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20752
20753  # First separate the path from the arguments. This will split at the first
20754  # space.
20755  complete="$AR"
20756  path="${complete%% *}"
20757  tmp="$complete EOL"
20758  arguments="${tmp#* }"
20759
20760  # Input might be given as Windows format, start by converting to
20761  # unix format.
20762  new_path="$path"
20763
20764  windows_path="$new_path"
20765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20766    unix_path=`$CYGPATH -u "$windows_path"`
20767    new_path="$unix_path"
20768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20770    new_path="$unix_path"
20771  fi
20772
20773
20774  # Now try to locate executable using which
20775  new_path=`$WHICH "$new_path" 2> /dev/null`
20776
20777  if test "x$new_path" = x; then
20778    # Oops. Which didn't find the executable.
20779    # The splitting of arguments from the executable at a space might have been incorrect,
20780    # since paths with space are more likely in Windows. Give it another try with the whole
20781    # argument.
20782    path="$complete"
20783    arguments="EOL"
20784    new_path="$path"
20785
20786  windows_path="$new_path"
20787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20788    unix_path=`$CYGPATH -u "$windows_path"`
20789    new_path="$unix_path"
20790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20792    new_path="$unix_path"
20793  fi
20794
20795
20796    new_path=`$WHICH "$new_path" 2> /dev/null`
20797
20798    if test "x$new_path" = x; then
20799      # It's still not found. Now this is an unrecoverable error.
20800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20801$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20802      has_space=`$ECHO "$complete" | $GREP " "`
20803      if test "x$has_space" != x; then
20804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20806      fi
20807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20808    fi
20809  fi
20810
20811  # Now new_path has a complete unix path to the binary
20812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20813    # Keep paths in /bin as-is, but remove trailing .exe if any
20814    new_path="${new_path/%.exe/}"
20815    # Do not save /bin paths to all_fixpath_prefixes!
20816  else
20817    # Not in mixed or Windows style, start by that.
20818    new_path=`cmd //c echo $new_path`
20819
20820  input_path="$new_path"
20821  # Check if we need to convert this using DOS-style short mode. If the path
20822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20823  # take no chances and rewrite it.
20824  # Note: m4 eats our [], so we need to use [ and ] instead.
20825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20826  if test "x$has_forbidden_chars" != x; then
20827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20829  fi
20830
20831    # Output is in $new_path
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842    # remove trailing .exe if any
20843    new_path="${new_path/%.exe/}"
20844
20845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20847  fi
20848
20849  else
20850    # We're on a posix platform. Hooray! :)
20851    # First separate the path from the arguments. This will split at the first
20852    # space.
20853    complete="$AR"
20854    path="${complete%% *}"
20855    tmp="$complete EOL"
20856    arguments="${tmp#* }"
20857
20858    new_path=`$WHICH $path 2> /dev/null`
20859    if test "x$new_path" = x; then
20860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20861      if test "x$is_absolute_path" != x; then
20862        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
20863$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
20864        new_path="$path"
20865      else
20866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20867$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20868        has_space=`$ECHO "$complete" | $GREP " "`
20869        if test "x$has_space" != x; then
20870          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20872        fi
20873        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20874      fi
20875    fi
20876  fi
20877
20878  # Now join together the path and the arguments once again
20879  if test "x$arguments" != xEOL; then
20880      new_complete="$new_path ${arguments% *}"
20881  else
20882      new_complete="$new_path"
20883  fi
20884
20885  if test "x$complete" != "x$new_complete"; then
20886    AR="$new_complete"
20887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
20888$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
20889  fi
20890
20891fi
20892if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20893    ARFLAGS="-r"
20894else
20895    ARFLAGS=""
20896fi
20897
20898
20899# For hotspot, we need these in Windows mixed path; other platforms keep them the same
20900HOTSPOT_CXX="$CXX"
20901HOTSPOT_LD="$LD"
20902
20903
20904
20905COMPILER_NAME=gcc
20906COMPILER_TYPE=CC
20907if test "x$OPENJDK_TARGET_OS" = xwindows; then :
20908
20909    # For now, assume that we are always compiling using cl.exe.
20910    CC_OUT_OPTION=-Fo
20911    EXE_OUT_OPTION=-out:
20912    LD_OUT_OPTION=-out:
20913    AR_OUT_OPTION=-out:
20914    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
20915    # program for something completely different.
20916    # Extract the first word of "link", so it can be a program name with args.
20917set dummy link; ac_word=$2
20918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20919$as_echo_n "checking for $ac_word... " >&6; }
20920if test "${ac_cv_prog_WINLD+set}" = set; then :
20921  $as_echo_n "(cached) " >&6
20922else
20923  if test -n "$WINLD"; then
20924  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
20925else
20926  ac_prog_rejected=no
20927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20928for as_dir in $PATH
20929do
20930  IFS=$as_save_IFS
20931  test -z "$as_dir" && as_dir=.
20932    for ac_exec_ext in '' $ac_executable_extensions; do
20933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20934    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
20935       ac_prog_rejected=yes
20936       continue
20937     fi
20938    ac_cv_prog_WINLD="link"
20939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20940    break 2
20941  fi
20942done
20943  done
20944IFS=$as_save_IFS
20945
20946if test $ac_prog_rejected = yes; then
20947  # We found a bogon in the path, so make sure we never use it.
20948  set dummy $ac_cv_prog_WINLD
20949  shift
20950  if test $# != 0; then
20951    # We chose a different compiler from the bogus one.
20952    # However, it has the same basename, so the bogon will be chosen
20953    # first if we set WINLD to just the basename; use the full file name.
20954    shift
20955    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
20956  fi
20957fi
20958fi
20959fi
20960WINLD=$ac_cv_prog_WINLD
20961if test -n "$WINLD"; then
20962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
20963$as_echo "$WINLD" >&6; }
20964else
20965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20966$as_echo "no" >&6; }
20967fi
20968
20969
20970    # Since we must ignore the first found link, WINLD will contain
20971    # the full path to the link.exe program.
20972
20973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20974
20975  # First separate the path from the arguments. This will split at the first
20976  # space.
20977  complete="$WINLD"
20978  path="${complete%% *}"
20979  tmp="$complete EOL"
20980  arguments="${tmp#* }"
20981
20982  # Input might be given as Windows format, start by converting to
20983  # unix format.
20984  new_path=`$CYGPATH -u "$path"`
20985
20986  # Now try to locate executable using which
20987  new_path=`$WHICH "$new_path" 2> /dev/null`
20988  if test "x$new_path" = x; then
20989    # Oops. Which didn't find the executable.
20990    # The splitting of arguments from the executable at a space might have been incorrect,
20991    # since paths with space are more likely in Windows. Give it another try with the whole
20992    # argument.
20993    path="$complete"
20994    arguments="EOL"
20995    new_path=`$CYGPATH -u "$path"`
20996    new_path=`$WHICH "$new_path" 2> /dev/null`
20997    if test "x$new_path" = x; then
20998      # It's still not found. Now this is an unrecoverable error.
20999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21000$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21001      has_space=`$ECHO "$complete" | $GREP " "`
21002      if test "x$has_space" != x; then
21003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21005      fi
21006      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21007    fi
21008  fi
21009
21010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21013  # "foo.exe" is OK but "foo" is an error.
21014  #
21015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21016  # It is also a way to make sure we got the proper file name for the real test later on.
21017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21018  if test "x$test_shortpath" = x; then
21019    # Short path failed, file does not exist as specified.
21020    # Try adding .exe or .cmd
21021    if test -f "${new_path}.exe"; then
21022       input_to_shortpath="${new_path}.exe"
21023    elif test -f "${new_path}.cmd"; then
21024       input_to_shortpath="${new_path}.cmd"
21025    else
21026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21027$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21028      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21029$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21030      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21031    fi
21032  else
21033    input_to_shortpath="$new_path"
21034  fi
21035
21036  # Call helper function which possibly converts this using DOS-style short mode.
21037  # If so, the updated path is stored in $new_path.
21038  new_path="$input_to_shortpath"
21039
21040  input_path="$input_to_shortpath"
21041  # Check if we need to convert this using DOS-style short mode. If the path
21042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21043  # take no chances and rewrite it.
21044  # Note: m4 eats our [], so we need to use [ and ] instead.
21045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21046  if test "x$has_forbidden_chars" != x; then
21047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21051      # Going to short mode and back again did indeed matter. Since short mode is
21052      # case insensitive, let's make it lowercase to improve readability.
21053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21054      # Now convert it back to Unix-stile (cygpath)
21055      input_path=`$CYGPATH -u "$shortmode_path"`
21056      new_path="$input_path"
21057    fi
21058  fi
21059
21060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21061  if test "x$test_cygdrive_prefix" = x; then
21062    # As a simple fix, exclude /usr/bin since it's not a real path.
21063    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21065      # a path prefixed by /cygdrive for fixpath to work.
21066      new_path="$CYGWIN_ROOT_PATH$input_path"
21067    fi
21068  fi
21069
21070  # remove trailing .exe if any
21071  new_path="${new_path/%.exe/}"
21072
21073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21074
21075  # First separate the path from the arguments. This will split at the first
21076  # space.
21077  complete="$WINLD"
21078  path="${complete%% *}"
21079  tmp="$complete EOL"
21080  arguments="${tmp#* }"
21081
21082  # Input might be given as Windows format, start by converting to
21083  # unix format.
21084  new_path="$path"
21085
21086  windows_path="$new_path"
21087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21088    unix_path=`$CYGPATH -u "$windows_path"`
21089    new_path="$unix_path"
21090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21092    new_path="$unix_path"
21093  fi
21094
21095
21096  # Now try to locate executable using which
21097  new_path=`$WHICH "$new_path" 2> /dev/null`
21098
21099  if test "x$new_path" = x; then
21100    # Oops. Which didn't find the executable.
21101    # The splitting of arguments from the executable at a space might have been incorrect,
21102    # since paths with space are more likely in Windows. Give it another try with the whole
21103    # argument.
21104    path="$complete"
21105    arguments="EOL"
21106    new_path="$path"
21107
21108  windows_path="$new_path"
21109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21110    unix_path=`$CYGPATH -u "$windows_path"`
21111    new_path="$unix_path"
21112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21114    new_path="$unix_path"
21115  fi
21116
21117
21118    new_path=`$WHICH "$new_path" 2> /dev/null`
21119
21120    if test "x$new_path" = x; then
21121      # It's still not found. Now this is an unrecoverable error.
21122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21123$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21124      has_space=`$ECHO "$complete" | $GREP " "`
21125      if test "x$has_space" != x; then
21126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21128      fi
21129      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21130    fi
21131  fi
21132
21133  # Now new_path has a complete unix path to the binary
21134  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21135    # Keep paths in /bin as-is, but remove trailing .exe if any
21136    new_path="${new_path/%.exe/}"
21137    # Do not save /bin paths to all_fixpath_prefixes!
21138  else
21139    # Not in mixed or Windows style, start by that.
21140    new_path=`cmd //c echo $new_path`
21141
21142  input_path="$new_path"
21143  # Check if we need to convert this using DOS-style short mode. If the path
21144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21145  # take no chances and rewrite it.
21146  # Note: m4 eats our [], so we need to use [ and ] instead.
21147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21148  if test "x$has_forbidden_chars" != x; then
21149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21151  fi
21152
21153    # Output is in $new_path
21154
21155  windows_path="$new_path"
21156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21157    unix_path=`$CYGPATH -u "$windows_path"`
21158    new_path="$unix_path"
21159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21161    new_path="$unix_path"
21162  fi
21163
21164    # remove trailing .exe if any
21165    new_path="${new_path/%.exe/}"
21166
21167    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21168    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21169  fi
21170
21171  else
21172    # We're on a posix platform. Hooray! :)
21173    # First separate the path from the arguments. This will split at the first
21174    # space.
21175    complete="$WINLD"
21176    path="${complete%% *}"
21177    tmp="$complete EOL"
21178    arguments="${tmp#* }"
21179
21180    new_path=`$WHICH $path 2> /dev/null`
21181    if test "x$new_path" = x; then
21182      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21183      if test "x$is_absolute_path" != x; then
21184        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21185$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21186        new_path="$path"
21187      else
21188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21189$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21190        has_space=`$ECHO "$complete" | $GREP " "`
21191        if test "x$has_space" != x; then
21192          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21194        fi
21195        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21196      fi
21197    fi
21198  fi
21199
21200  # Now join together the path and the arguments once again
21201  if test "x$arguments" != xEOL; then
21202      new_complete="$new_path ${arguments% *}"
21203  else
21204      new_complete="$new_path"
21205  fi
21206
21207  if test "x$complete" != "x$new_complete"; then
21208    WINLD="$new_complete"
21209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21210$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21211  fi
21212
21213    printf "Windows linker was found at $WINLD\n"
21214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21215$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21216    "$WINLD" --version > /dev/null
21217    if test $? -eq 0 ; then
21218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21219$as_echo "no" >&6; }
21220      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21221    else
21222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21223$as_echo "yes" >&6; }
21224    fi
21225    LD="$WINLD"
21226    LDEXE="$WINLD"
21227    LDCXX="$WINLD"
21228    LDEXECXX="$WINLD"
21229
21230    # Extract the first word of "mt", so it can be a program name with args.
21231set dummy mt; ac_word=$2
21232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21233$as_echo_n "checking for $ac_word... " >&6; }
21234if test "${ac_cv_prog_MT+set}" = set; then :
21235  $as_echo_n "(cached) " >&6
21236else
21237  if test -n "$MT"; then
21238  ac_cv_prog_MT="$MT" # Let the user override the test.
21239else
21240  ac_prog_rejected=no
21241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21242for as_dir in $PATH
21243do
21244  IFS=$as_save_IFS
21245  test -z "$as_dir" && as_dir=.
21246    for ac_exec_ext in '' $ac_executable_extensions; do
21247  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21248    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21249       ac_prog_rejected=yes
21250       continue
21251     fi
21252    ac_cv_prog_MT="mt"
21253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21254    break 2
21255  fi
21256done
21257  done
21258IFS=$as_save_IFS
21259
21260if test $ac_prog_rejected = yes; then
21261  # We found a bogon in the path, so make sure we never use it.
21262  set dummy $ac_cv_prog_MT
21263  shift
21264  if test $# != 0; then
21265    # We chose a different compiler from the bogus one.
21266    # However, it has the same basename, so the bogon will be chosen
21267    # first if we set MT to just the basename; use the full file name.
21268    shift
21269    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21270  fi
21271fi
21272fi
21273fi
21274MT=$ac_cv_prog_MT
21275if test -n "$MT"; then
21276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21277$as_echo "$MT" >&6; }
21278else
21279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21280$as_echo "no" >&6; }
21281fi
21282
21283
21284
21285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21286
21287  # First separate the path from the arguments. This will split at the first
21288  # space.
21289  complete="$MT"
21290  path="${complete%% *}"
21291  tmp="$complete EOL"
21292  arguments="${tmp#* }"
21293
21294  # Input might be given as Windows format, start by converting to
21295  # unix format.
21296  new_path=`$CYGPATH -u "$path"`
21297
21298  # Now try to locate executable using which
21299  new_path=`$WHICH "$new_path" 2> /dev/null`
21300  if test "x$new_path" = x; then
21301    # Oops. Which didn't find the executable.
21302    # The splitting of arguments from the executable at a space might have been incorrect,
21303    # since paths with space are more likely in Windows. Give it another try with the whole
21304    # argument.
21305    path="$complete"
21306    arguments="EOL"
21307    new_path=`$CYGPATH -u "$path"`
21308    new_path=`$WHICH "$new_path" 2> /dev/null`
21309    if test "x$new_path" = x; then
21310      # It's still not found. Now this is an unrecoverable error.
21311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21312$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21313      has_space=`$ECHO "$complete" | $GREP " "`
21314      if test "x$has_space" != x; then
21315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21317      fi
21318      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21319    fi
21320  fi
21321
21322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21325  # "foo.exe" is OK but "foo" is an error.
21326  #
21327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21328  # It is also a way to make sure we got the proper file name for the real test later on.
21329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21330  if test "x$test_shortpath" = x; then
21331    # Short path failed, file does not exist as specified.
21332    # Try adding .exe or .cmd
21333    if test -f "${new_path}.exe"; then
21334       input_to_shortpath="${new_path}.exe"
21335    elif test -f "${new_path}.cmd"; then
21336       input_to_shortpath="${new_path}.cmd"
21337    else
21338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21339$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21342      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21343    fi
21344  else
21345    input_to_shortpath="$new_path"
21346  fi
21347
21348  # Call helper function which possibly converts this using DOS-style short mode.
21349  # If so, the updated path is stored in $new_path.
21350  new_path="$input_to_shortpath"
21351
21352  input_path="$input_to_shortpath"
21353  # Check if we need to convert this using DOS-style short mode. If the path
21354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21355  # take no chances and rewrite it.
21356  # Note: m4 eats our [], so we need to use [ and ] instead.
21357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21358  if test "x$has_forbidden_chars" != x; then
21359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21363      # Going to short mode and back again did indeed matter. Since short mode is
21364      # case insensitive, let's make it lowercase to improve readability.
21365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21366      # Now convert it back to Unix-stile (cygpath)
21367      input_path=`$CYGPATH -u "$shortmode_path"`
21368      new_path="$input_path"
21369    fi
21370  fi
21371
21372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21373  if test "x$test_cygdrive_prefix" = x; then
21374    # As a simple fix, exclude /usr/bin since it's not a real path.
21375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21377      # a path prefixed by /cygdrive for fixpath to work.
21378      new_path="$CYGWIN_ROOT_PATH$input_path"
21379    fi
21380  fi
21381
21382  # remove trailing .exe if any
21383  new_path="${new_path/%.exe/}"
21384
21385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21386
21387  # First separate the path from the arguments. This will split at the first
21388  # space.
21389  complete="$MT"
21390  path="${complete%% *}"
21391  tmp="$complete EOL"
21392  arguments="${tmp#* }"
21393
21394  # Input might be given as Windows format, start by converting to
21395  # unix format.
21396  new_path="$path"
21397
21398  windows_path="$new_path"
21399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21400    unix_path=`$CYGPATH -u "$windows_path"`
21401    new_path="$unix_path"
21402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21404    new_path="$unix_path"
21405  fi
21406
21407
21408  # Now try to locate executable using which
21409  new_path=`$WHICH "$new_path" 2> /dev/null`
21410
21411  if test "x$new_path" = x; then
21412    # Oops. Which didn't find the executable.
21413    # The splitting of arguments from the executable at a space might have been incorrect,
21414    # since paths with space are more likely in Windows. Give it another try with the whole
21415    # argument.
21416    path="$complete"
21417    arguments="EOL"
21418    new_path="$path"
21419
21420  windows_path="$new_path"
21421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21422    unix_path=`$CYGPATH -u "$windows_path"`
21423    new_path="$unix_path"
21424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21426    new_path="$unix_path"
21427  fi
21428
21429
21430    new_path=`$WHICH "$new_path" 2> /dev/null`
21431
21432    if test "x$new_path" = x; then
21433      # It's still not found. Now this is an unrecoverable error.
21434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21435$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21436      has_space=`$ECHO "$complete" | $GREP " "`
21437      if test "x$has_space" != x; then
21438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21440      fi
21441      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21442    fi
21443  fi
21444
21445  # Now new_path has a complete unix path to the binary
21446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21447    # Keep paths in /bin as-is, but remove trailing .exe if any
21448    new_path="${new_path/%.exe/}"
21449    # Do not save /bin paths to all_fixpath_prefixes!
21450  else
21451    # Not in mixed or Windows style, start by that.
21452    new_path=`cmd //c echo $new_path`
21453
21454  input_path="$new_path"
21455  # Check if we need to convert this using DOS-style short mode. If the path
21456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21457  # take no chances and rewrite it.
21458  # Note: m4 eats our [], so we need to use [ and ] instead.
21459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21460  if test "x$has_forbidden_chars" != x; then
21461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21463  fi
21464
21465    # Output is in $new_path
21466
21467  windows_path="$new_path"
21468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21469    unix_path=`$CYGPATH -u "$windows_path"`
21470    new_path="$unix_path"
21471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21473    new_path="$unix_path"
21474  fi
21475
21476    # remove trailing .exe if any
21477    new_path="${new_path/%.exe/}"
21478
21479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21481  fi
21482
21483  else
21484    # We're on a posix platform. Hooray! :)
21485    # First separate the path from the arguments. This will split at the first
21486    # space.
21487    complete="$MT"
21488    path="${complete%% *}"
21489    tmp="$complete EOL"
21490    arguments="${tmp#* }"
21491
21492    new_path=`$WHICH $path 2> /dev/null`
21493    if test "x$new_path" = x; then
21494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21495      if test "x$is_absolute_path" != x; then
21496        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21497$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21498        new_path="$path"
21499      else
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21501$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21502        has_space=`$ECHO "$complete" | $GREP " "`
21503        if test "x$has_space" != x; then
21504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21506        fi
21507        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21508      fi
21509    fi
21510  fi
21511
21512  # Now join together the path and the arguments once again
21513  if test "x$arguments" != xEOL; then
21514      new_complete="$new_path ${arguments% *}"
21515  else
21516      new_complete="$new_path"
21517  fi
21518
21519  if test "x$complete" != "x$new_complete"; then
21520    MT="$new_complete"
21521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21522$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21523  fi
21524
21525    # The resource compiler
21526    # Extract the first word of "rc", so it can be a program name with args.
21527set dummy rc; 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_RC+set}" = set; then :
21531  $as_echo_n "(cached) " >&6
21532else
21533  if test -n "$RC"; then
21534  ac_cv_prog_RC="$RC" # Let the user override the test.
21535else
21536  ac_prog_rejected=no
21537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21538for as_dir in $PATH
21539do
21540  IFS=$as_save_IFS
21541  test -z "$as_dir" && as_dir=.
21542    for ac_exec_ext in '' $ac_executable_extensions; do
21543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21544    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21545       ac_prog_rejected=yes
21546       continue
21547     fi
21548    ac_cv_prog_RC="rc"
21549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21550    break 2
21551  fi
21552done
21553  done
21554IFS=$as_save_IFS
21555
21556if test $ac_prog_rejected = yes; then
21557  # We found a bogon in the path, so make sure we never use it.
21558  set dummy $ac_cv_prog_RC
21559  shift
21560  if test $# != 0; then
21561    # We chose a different compiler from the bogus one.
21562    # However, it has the same basename, so the bogon will be chosen
21563    # first if we set RC to just the basename; use the full file name.
21564    shift
21565    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
21566  fi
21567fi
21568fi
21569fi
21570RC=$ac_cv_prog_RC
21571if test -n "$RC"; then
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
21573$as_echo "$RC" >&6; }
21574else
21575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21576$as_echo "no" >&6; }
21577fi
21578
21579
21580
21581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21582
21583  # First separate the path from the arguments. This will split at the first
21584  # space.
21585  complete="$RC"
21586  path="${complete%% *}"
21587  tmp="$complete EOL"
21588  arguments="${tmp#* }"
21589
21590  # Input might be given as Windows format, start by converting to
21591  # unix format.
21592  new_path=`$CYGPATH -u "$path"`
21593
21594  # Now try to locate executable using which
21595  new_path=`$WHICH "$new_path" 2> /dev/null`
21596  if test "x$new_path" = x; then
21597    # Oops. Which didn't find the executable.
21598    # The splitting of arguments from the executable at a space might have been incorrect,
21599    # since paths with space are more likely in Windows. Give it another try with the whole
21600    # argument.
21601    path="$complete"
21602    arguments="EOL"
21603    new_path=`$CYGPATH -u "$path"`
21604    new_path=`$WHICH "$new_path" 2> /dev/null`
21605    if test "x$new_path" = x; then
21606      # It's still not found. Now this is an unrecoverable error.
21607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21608$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21609      has_space=`$ECHO "$complete" | $GREP " "`
21610      if test "x$has_space" != x; then
21611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21613      fi
21614      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21615    fi
21616  fi
21617
21618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21621  # "foo.exe" is OK but "foo" is an error.
21622  #
21623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21624  # It is also a way to make sure we got the proper file name for the real test later on.
21625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21626  if test "x$test_shortpath" = x; then
21627    # Short path failed, file does not exist as specified.
21628    # Try adding .exe or .cmd
21629    if test -f "${new_path}.exe"; then
21630       input_to_shortpath="${new_path}.exe"
21631    elif test -f "${new_path}.cmd"; then
21632       input_to_shortpath="${new_path}.cmd"
21633    else
21634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
21635$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
21636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21638      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21639    fi
21640  else
21641    input_to_shortpath="$new_path"
21642  fi
21643
21644  # Call helper function which possibly converts this using DOS-style short mode.
21645  # If so, the updated path is stored in $new_path.
21646  new_path="$input_to_shortpath"
21647
21648  input_path="$input_to_shortpath"
21649  # Check if we need to convert this using DOS-style short mode. If the path
21650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21651  # take no chances and rewrite it.
21652  # Note: m4 eats our [], so we need to use [ and ] instead.
21653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21654  if test "x$has_forbidden_chars" != x; then
21655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21659      # Going to short mode and back again did indeed matter. Since short mode is
21660      # case insensitive, let's make it lowercase to improve readability.
21661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21662      # Now convert it back to Unix-stile (cygpath)
21663      input_path=`$CYGPATH -u "$shortmode_path"`
21664      new_path="$input_path"
21665    fi
21666  fi
21667
21668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21669  if test "x$test_cygdrive_prefix" = x; then
21670    # As a simple fix, exclude /usr/bin since it's not a real path.
21671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21673      # a path prefixed by /cygdrive for fixpath to work.
21674      new_path="$CYGWIN_ROOT_PATH$input_path"
21675    fi
21676  fi
21677
21678  # remove trailing .exe if any
21679  new_path="${new_path/%.exe/}"
21680
21681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21682
21683  # First separate the path from the arguments. This will split at the first
21684  # space.
21685  complete="$RC"
21686  path="${complete%% *}"
21687  tmp="$complete EOL"
21688  arguments="${tmp#* }"
21689
21690  # Input might be given as Windows format, start by converting to
21691  # unix format.
21692  new_path="$path"
21693
21694  windows_path="$new_path"
21695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21696    unix_path=`$CYGPATH -u "$windows_path"`
21697    new_path="$unix_path"
21698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21700    new_path="$unix_path"
21701  fi
21702
21703
21704  # Now try to locate executable using which
21705  new_path=`$WHICH "$new_path" 2> /dev/null`
21706
21707  if test "x$new_path" = x; then
21708    # Oops. Which didn't find the executable.
21709    # The splitting of arguments from the executable at a space might have been incorrect,
21710    # since paths with space are more likely in Windows. Give it another try with the whole
21711    # argument.
21712    path="$complete"
21713    arguments="EOL"
21714    new_path="$path"
21715
21716  windows_path="$new_path"
21717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21718    unix_path=`$CYGPATH -u "$windows_path"`
21719    new_path="$unix_path"
21720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21722    new_path="$unix_path"
21723  fi
21724
21725
21726    new_path=`$WHICH "$new_path" 2> /dev/null`
21727
21728    if test "x$new_path" = x; then
21729      # It's still not found. Now this is an unrecoverable error.
21730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21731$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21732      has_space=`$ECHO "$complete" | $GREP " "`
21733      if test "x$has_space" != x; then
21734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21736      fi
21737      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21738    fi
21739  fi
21740
21741  # Now new_path has a complete unix path to the binary
21742  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21743    # Keep paths in /bin as-is, but remove trailing .exe if any
21744    new_path="${new_path/%.exe/}"
21745    # Do not save /bin paths to all_fixpath_prefixes!
21746  else
21747    # Not in mixed or Windows style, start by that.
21748    new_path=`cmd //c echo $new_path`
21749
21750  input_path="$new_path"
21751  # Check if we need to convert this using DOS-style short mode. If the path
21752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21753  # take no chances and rewrite it.
21754  # Note: m4 eats our [], so we need to use [ and ] instead.
21755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21756  if test "x$has_forbidden_chars" != x; then
21757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21759  fi
21760
21761    # Output is in $new_path
21762
21763  windows_path="$new_path"
21764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21765    unix_path=`$CYGPATH -u "$windows_path"`
21766    new_path="$unix_path"
21767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21769    new_path="$unix_path"
21770  fi
21771
21772    # remove trailing .exe if any
21773    new_path="${new_path/%.exe/}"
21774
21775    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21776    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21777  fi
21778
21779  else
21780    # We're on a posix platform. Hooray! :)
21781    # First separate the path from the arguments. This will split at the first
21782    # space.
21783    complete="$RC"
21784    path="${complete%% *}"
21785    tmp="$complete EOL"
21786    arguments="${tmp#* }"
21787
21788    new_path=`$WHICH $path 2> /dev/null`
21789    if test "x$new_path" = x; then
21790      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21791      if test "x$is_absolute_path" != x; then
21792        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
21793$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
21794        new_path="$path"
21795      else
21796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21797$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21798        has_space=`$ECHO "$complete" | $GREP " "`
21799        if test "x$has_space" != x; then
21800          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21801$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21802        fi
21803        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21804      fi
21805    fi
21806  fi
21807
21808  # Now join together the path and the arguments once again
21809  if test "x$arguments" != xEOL; then
21810      new_complete="$new_path ${arguments% *}"
21811  else
21812      new_complete="$new_path"
21813  fi
21814
21815  if test "x$complete" != "x$new_complete"; then
21816    RC="$new_complete"
21817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
21818$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
21819  fi
21820
21821
21822    # For hotspot, we need these in Windows mixed path,
21823    # so rewrite them all. Need added .exe suffix.
21824    HOTSPOT_CXX="$CXX.exe"
21825    HOTSPOT_LD="$LD.exe"
21826    HOTSPOT_MT="$MT.exe"
21827    HOTSPOT_RC="$RC.exe"
21828
21829  unix_path="$HOTSPOT_CXX"
21830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21831    windows_path=`$CYGPATH -m "$unix_path"`
21832    HOTSPOT_CXX="$windows_path"
21833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21834    windows_path=`cmd //c echo $unix_path`
21835    HOTSPOT_CXX="$windows_path"
21836  fi
21837
21838
21839  unix_path="$HOTSPOT_LD"
21840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21841    windows_path=`$CYGPATH -m "$unix_path"`
21842    HOTSPOT_LD="$windows_path"
21843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21844    windows_path=`cmd //c echo $unix_path`
21845    HOTSPOT_LD="$windows_path"
21846  fi
21847
21848
21849  unix_path="$HOTSPOT_MT"
21850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21851    windows_path=`$CYGPATH -m "$unix_path"`
21852    HOTSPOT_MT="$windows_path"
21853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21854    windows_path=`cmd //c echo $unix_path`
21855    HOTSPOT_MT="$windows_path"
21856  fi
21857
21858
21859  unix_path="$HOTSPOT_RC"
21860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21861    windows_path=`$CYGPATH -m "$unix_path"`
21862    HOTSPOT_RC="$windows_path"
21863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21864    windows_path=`cmd //c echo $unix_path`
21865    HOTSPOT_RC="$windows_path"
21866  fi
21867
21868
21869
21870
21871    RC_FLAGS="-nologo -l 0x409 -r"
21872    if test "x$VARIANT" = xOPT; then :
21873
21874        RC_FLAGS="$RC_FLAGS -d NDEBUG"
21875
21876fi
21877    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
21878    if test "x$JDK_UPDATE_VERSION" = x; then :
21879
21880        JDK_UPDATE_VERSION_NOTNULL=0
21881
21882fi
21883    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
21884    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
21885    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
21886    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
21887    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
21888    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
21889    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
21890
21891    # lib.exe is used to create static libraries.
21892    # Extract the first word of "lib", so it can be a program name with args.
21893set dummy lib; ac_word=$2
21894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21895$as_echo_n "checking for $ac_word... " >&6; }
21896if test "${ac_cv_prog_WINAR+set}" = set; then :
21897  $as_echo_n "(cached) " >&6
21898else
21899  if test -n "$WINAR"; then
21900  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
21901else
21902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21903for as_dir in $PATH
21904do
21905  IFS=$as_save_IFS
21906  test -z "$as_dir" && as_dir=.
21907    for ac_exec_ext in '' $ac_executable_extensions; do
21908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21909    ac_cv_prog_WINAR="lib"
21910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21911    break 2
21912  fi
21913done
21914  done
21915IFS=$as_save_IFS
21916
21917fi
21918fi
21919WINAR=$ac_cv_prog_WINAR
21920if test -n "$WINAR"; then
21921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
21922$as_echo "$WINAR" >&6; }
21923else
21924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21925$as_echo "no" >&6; }
21926fi
21927
21928
21929
21930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21931
21932  # First separate the path from the arguments. This will split at the first
21933  # space.
21934  complete="$WINAR"
21935  path="${complete%% *}"
21936  tmp="$complete EOL"
21937  arguments="${tmp#* }"
21938
21939  # Input might be given as Windows format, start by converting to
21940  # unix format.
21941  new_path=`$CYGPATH -u "$path"`
21942
21943  # Now try to locate executable using which
21944  new_path=`$WHICH "$new_path" 2> /dev/null`
21945  if test "x$new_path" = x; then
21946    # Oops. Which didn't find the executable.
21947    # The splitting of arguments from the executable at a space might have been incorrect,
21948    # since paths with space are more likely in Windows. Give it another try with the whole
21949    # argument.
21950    path="$complete"
21951    arguments="EOL"
21952    new_path=`$CYGPATH -u "$path"`
21953    new_path=`$WHICH "$new_path" 2> /dev/null`
21954    if test "x$new_path" = x; then
21955      # It's still not found. Now this is an unrecoverable error.
21956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
21957$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
21958      has_space=`$ECHO "$complete" | $GREP " "`
21959      if test "x$has_space" != x; then
21960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21962      fi
21963      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
21964    fi
21965  fi
21966
21967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21970  # "foo.exe" is OK but "foo" is an error.
21971  #
21972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21973  # It is also a way to make sure we got the proper file name for the real test later on.
21974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21975  if test "x$test_shortpath" = x; then
21976    # Short path failed, file does not exist as specified.
21977    # Try adding .exe or .cmd
21978    if test -f "${new_path}.exe"; then
21979       input_to_shortpath="${new_path}.exe"
21980    elif test -f "${new_path}.cmd"; then
21981       input_to_shortpath="${new_path}.cmd"
21982    else
21983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
21984$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
21985      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21986$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21987      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
21988    fi
21989  else
21990    input_to_shortpath="$new_path"
21991  fi
21992
21993  # Call helper function which possibly converts this using DOS-style short mode.
21994  # If so, the updated path is stored in $new_path.
21995  new_path="$input_to_shortpath"
21996
21997  input_path="$input_to_shortpath"
21998  # Check if we need to convert this using DOS-style short mode. If the path
21999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22000  # take no chances and rewrite it.
22001  # Note: m4 eats our [], so we need to use [ and ] instead.
22002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22003  if test "x$has_forbidden_chars" != x; then
22004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22008      # Going to short mode and back again did indeed matter. Since short mode is
22009      # case insensitive, let's make it lowercase to improve readability.
22010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22011      # Now convert it back to Unix-stile (cygpath)
22012      input_path=`$CYGPATH -u "$shortmode_path"`
22013      new_path="$input_path"
22014    fi
22015  fi
22016
22017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22018  if test "x$test_cygdrive_prefix" = x; then
22019    # As a simple fix, exclude /usr/bin since it's not a real path.
22020    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22022      # a path prefixed by /cygdrive for fixpath to work.
22023      new_path="$CYGWIN_ROOT_PATH$input_path"
22024    fi
22025  fi
22026
22027  # remove trailing .exe if any
22028  new_path="${new_path/%.exe/}"
22029
22030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22031
22032  # First separate the path from the arguments. This will split at the first
22033  # space.
22034  complete="$WINAR"
22035  path="${complete%% *}"
22036  tmp="$complete EOL"
22037  arguments="${tmp#* }"
22038
22039  # Input might be given as Windows format, start by converting to
22040  # unix format.
22041  new_path="$path"
22042
22043  windows_path="$new_path"
22044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22045    unix_path=`$CYGPATH -u "$windows_path"`
22046    new_path="$unix_path"
22047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22049    new_path="$unix_path"
22050  fi
22051
22052
22053  # Now try to locate executable using which
22054  new_path=`$WHICH "$new_path" 2> /dev/null`
22055
22056  if test "x$new_path" = x; then
22057    # Oops. Which didn't find the executable.
22058    # The splitting of arguments from the executable at a space might have been incorrect,
22059    # since paths with space are more likely in Windows. Give it another try with the whole
22060    # argument.
22061    path="$complete"
22062    arguments="EOL"
22063    new_path="$path"
22064
22065  windows_path="$new_path"
22066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22067    unix_path=`$CYGPATH -u "$windows_path"`
22068    new_path="$unix_path"
22069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22071    new_path="$unix_path"
22072  fi
22073
22074
22075    new_path=`$WHICH "$new_path" 2> /dev/null`
22076
22077    if test "x$new_path" = x; then
22078      # It's still not found. Now this is an unrecoverable error.
22079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22080$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22081      has_space=`$ECHO "$complete" | $GREP " "`
22082      if test "x$has_space" != x; then
22083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22085      fi
22086      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22087    fi
22088  fi
22089
22090  # Now new_path has a complete unix path to the binary
22091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22092    # Keep paths in /bin as-is, but remove trailing .exe if any
22093    new_path="${new_path/%.exe/}"
22094    # Do not save /bin paths to all_fixpath_prefixes!
22095  else
22096    # Not in mixed or Windows style, start by that.
22097    new_path=`cmd //c echo $new_path`
22098
22099  input_path="$new_path"
22100  # Check if we need to convert this using DOS-style short mode. If the path
22101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22102  # take no chances and rewrite it.
22103  # Note: m4 eats our [], so we need to use [ and ] instead.
22104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22105  if test "x$has_forbidden_chars" != x; then
22106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22108  fi
22109
22110    # Output is in $new_path
22111
22112  windows_path="$new_path"
22113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22114    unix_path=`$CYGPATH -u "$windows_path"`
22115    new_path="$unix_path"
22116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22118    new_path="$unix_path"
22119  fi
22120
22121    # remove trailing .exe if any
22122    new_path="${new_path/%.exe/}"
22123
22124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22126  fi
22127
22128  else
22129    # We're on a posix platform. Hooray! :)
22130    # First separate the path from the arguments. This will split at the first
22131    # space.
22132    complete="$WINAR"
22133    path="${complete%% *}"
22134    tmp="$complete EOL"
22135    arguments="${tmp#* }"
22136
22137    new_path=`$WHICH $path 2> /dev/null`
22138    if test "x$new_path" = x; then
22139      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22140      if test "x$is_absolute_path" != x; then
22141        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22142$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22143        new_path="$path"
22144      else
22145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22146$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22147        has_space=`$ECHO "$complete" | $GREP " "`
22148        if test "x$has_space" != x; then
22149          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22151        fi
22152        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22153      fi
22154    fi
22155  fi
22156
22157  # Now join together the path and the arguments once again
22158  if test "x$arguments" != xEOL; then
22159      new_complete="$new_path ${arguments% *}"
22160  else
22161      new_complete="$new_path"
22162  fi
22163
22164  if test "x$complete" != "x$new_complete"; then
22165    WINAR="$new_complete"
22166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22167$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22168  fi
22169
22170    AR="$WINAR"
22171    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22172
22173    # Extract the first word of "dumpbin", so it can be a program name with args.
22174set dummy dumpbin; ac_word=$2
22175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22176$as_echo_n "checking for $ac_word... " >&6; }
22177if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22178  $as_echo_n "(cached) " >&6
22179else
22180  if test -n "$DUMPBIN"; then
22181  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22182else
22183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22184for as_dir in $PATH
22185do
22186  IFS=$as_save_IFS
22187  test -z "$as_dir" && as_dir=.
22188    for ac_exec_ext in '' $ac_executable_extensions; do
22189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22190    ac_cv_prog_DUMPBIN="dumpbin"
22191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22192    break 2
22193  fi
22194done
22195  done
22196IFS=$as_save_IFS
22197
22198fi
22199fi
22200DUMPBIN=$ac_cv_prog_DUMPBIN
22201if test -n "$DUMPBIN"; then
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22203$as_echo "$DUMPBIN" >&6; }
22204else
22205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22206$as_echo "no" >&6; }
22207fi
22208
22209
22210
22211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22212
22213  # First separate the path from the arguments. This will split at the first
22214  # space.
22215  complete="$DUMPBIN"
22216  path="${complete%% *}"
22217  tmp="$complete EOL"
22218  arguments="${tmp#* }"
22219
22220  # Input might be given as Windows format, start by converting to
22221  # unix format.
22222  new_path=`$CYGPATH -u "$path"`
22223
22224  # Now try to locate executable using which
22225  new_path=`$WHICH "$new_path" 2> /dev/null`
22226  if test "x$new_path" = x; then
22227    # Oops. Which didn't find the executable.
22228    # The splitting of arguments from the executable at a space might have been incorrect,
22229    # since paths with space are more likely in Windows. Give it another try with the whole
22230    # argument.
22231    path="$complete"
22232    arguments="EOL"
22233    new_path=`$CYGPATH -u "$path"`
22234    new_path=`$WHICH "$new_path" 2> /dev/null`
22235    if test "x$new_path" = x; then
22236      # It's still not found. Now this is an unrecoverable error.
22237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22238$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22239      has_space=`$ECHO "$complete" | $GREP " "`
22240      if test "x$has_space" != x; then
22241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22243      fi
22244      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22245    fi
22246  fi
22247
22248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22251  # "foo.exe" is OK but "foo" is an error.
22252  #
22253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22254  # It is also a way to make sure we got the proper file name for the real test later on.
22255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22256  if test "x$test_shortpath" = x; then
22257    # Short path failed, file does not exist as specified.
22258    # Try adding .exe or .cmd
22259    if test -f "${new_path}.exe"; then
22260       input_to_shortpath="${new_path}.exe"
22261    elif test -f "${new_path}.cmd"; then
22262       input_to_shortpath="${new_path}.cmd"
22263    else
22264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22265$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22266      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22267$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22268      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22269    fi
22270  else
22271    input_to_shortpath="$new_path"
22272  fi
22273
22274  # Call helper function which possibly converts this using DOS-style short mode.
22275  # If so, the updated path is stored in $new_path.
22276  new_path="$input_to_shortpath"
22277
22278  input_path="$input_to_shortpath"
22279  # Check if we need to convert this using DOS-style short mode. If the path
22280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22281  # take no chances and rewrite it.
22282  # Note: m4 eats our [], so we need to use [ and ] instead.
22283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22284  if test "x$has_forbidden_chars" != x; then
22285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22289      # Going to short mode and back again did indeed matter. Since short mode is
22290      # case insensitive, let's make it lowercase to improve readability.
22291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22292      # Now convert it back to Unix-stile (cygpath)
22293      input_path=`$CYGPATH -u "$shortmode_path"`
22294      new_path="$input_path"
22295    fi
22296  fi
22297
22298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22299  if test "x$test_cygdrive_prefix" = x; then
22300    # As a simple fix, exclude /usr/bin since it's not a real path.
22301    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22303      # a path prefixed by /cygdrive for fixpath to work.
22304      new_path="$CYGWIN_ROOT_PATH$input_path"
22305    fi
22306  fi
22307
22308  # remove trailing .exe if any
22309  new_path="${new_path/%.exe/}"
22310
22311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22312
22313  # First separate the path from the arguments. This will split at the first
22314  # space.
22315  complete="$DUMPBIN"
22316  path="${complete%% *}"
22317  tmp="$complete EOL"
22318  arguments="${tmp#* }"
22319
22320  # Input might be given as Windows format, start by converting to
22321  # unix format.
22322  new_path="$path"
22323
22324  windows_path="$new_path"
22325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22326    unix_path=`$CYGPATH -u "$windows_path"`
22327    new_path="$unix_path"
22328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22330    new_path="$unix_path"
22331  fi
22332
22333
22334  # Now try to locate executable using which
22335  new_path=`$WHICH "$new_path" 2> /dev/null`
22336
22337  if test "x$new_path" = x; then
22338    # Oops. Which didn't find the executable.
22339    # The splitting of arguments from the executable at a space might have been incorrect,
22340    # since paths with space are more likely in Windows. Give it another try with the whole
22341    # argument.
22342    path="$complete"
22343    arguments="EOL"
22344    new_path="$path"
22345
22346  windows_path="$new_path"
22347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22348    unix_path=`$CYGPATH -u "$windows_path"`
22349    new_path="$unix_path"
22350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22352    new_path="$unix_path"
22353  fi
22354
22355
22356    new_path=`$WHICH "$new_path" 2> /dev/null`
22357
22358    if test "x$new_path" = x; then
22359      # It's still not found. Now this is an unrecoverable error.
22360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22361$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22362      has_space=`$ECHO "$complete" | $GREP " "`
22363      if test "x$has_space" != x; then
22364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22366      fi
22367      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22368    fi
22369  fi
22370
22371  # Now new_path has a complete unix path to the binary
22372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22373    # Keep paths in /bin as-is, but remove trailing .exe if any
22374    new_path="${new_path/%.exe/}"
22375    # Do not save /bin paths to all_fixpath_prefixes!
22376  else
22377    # Not in mixed or Windows style, start by that.
22378    new_path=`cmd //c echo $new_path`
22379
22380  input_path="$new_path"
22381  # Check if we need to convert this using DOS-style short mode. If the path
22382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22383  # take no chances and rewrite it.
22384  # Note: m4 eats our [], so we need to use [ and ] instead.
22385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22386  if test "x$has_forbidden_chars" != x; then
22387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22389  fi
22390
22391    # Output is in $new_path
22392
22393  windows_path="$new_path"
22394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22395    unix_path=`$CYGPATH -u "$windows_path"`
22396    new_path="$unix_path"
22397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22399    new_path="$unix_path"
22400  fi
22401
22402    # remove trailing .exe if any
22403    new_path="${new_path/%.exe/}"
22404
22405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22407  fi
22408
22409  else
22410    # We're on a posix platform. Hooray! :)
22411    # First separate the path from the arguments. This will split at the first
22412    # space.
22413    complete="$DUMPBIN"
22414    path="${complete%% *}"
22415    tmp="$complete EOL"
22416    arguments="${tmp#* }"
22417
22418    new_path=`$WHICH $path 2> /dev/null`
22419    if test "x$new_path" = x; then
22420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22421      if test "x$is_absolute_path" != x; then
22422        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22423$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22424        new_path="$path"
22425      else
22426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22427$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22428        has_space=`$ECHO "$complete" | $GREP " "`
22429        if test "x$has_space" != x; then
22430          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22431$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22432        fi
22433        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22434      fi
22435    fi
22436  fi
22437
22438  # Now join together the path and the arguments once again
22439  if test "x$arguments" != xEOL; then
22440      new_complete="$new_path ${arguments% *}"
22441  else
22442      new_complete="$new_path"
22443  fi
22444
22445  if test "x$complete" != "x$new_complete"; then
22446    DUMPBIN="$new_complete"
22447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22448$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22449  fi
22450
22451
22452    COMPILER_TYPE=CL
22453    CCXXFLAGS="$CCXXFLAGS -nologo"
22454
22455fi
22456
22457
22458
22459ac_ext=c
22460ac_cpp='$CPP $CPPFLAGS'
22461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22463ac_compiler_gnu=$ac_cv_c_compiler_gnu
22464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22465$as_echo_n "checking how to run the C preprocessor... " >&6; }
22466# On Suns, sometimes $CPP names a directory.
22467if test -n "$CPP" && test -d "$CPP"; then
22468  CPP=
22469fi
22470if test -z "$CPP"; then
22471  if test "${ac_cv_prog_CPP+set}" = set; then :
22472  $as_echo_n "(cached) " >&6
22473else
22474      # Double quotes because CPP needs to be expanded
22475    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22476    do
22477      ac_preproc_ok=false
22478for ac_c_preproc_warn_flag in '' yes
22479do
22480  # Use a header file that comes with gcc, so configuring glibc
22481  # with a fresh cross-compiler works.
22482  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22483  # <limits.h> exists even on freestanding compilers.
22484  # On the NeXT, cc -E runs the code through the compiler's parser,
22485  # not just through cpp. "Syntax error" is here to catch this case.
22486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22487/* end confdefs.h.  */
22488#ifdef __STDC__
22489# include <limits.h>
22490#else
22491# include <assert.h>
22492#endif
22493		     Syntax error
22494_ACEOF
22495if ac_fn_c_try_cpp "$LINENO"; then :
22496
22497else
22498  # Broken: fails on valid input.
22499continue
22500fi
22501rm -f conftest.err conftest.i conftest.$ac_ext
22502
22503  # OK, works on sane cases.  Now check whether nonexistent headers
22504  # can be detected and how.
22505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22506/* end confdefs.h.  */
22507#include <ac_nonexistent.h>
22508_ACEOF
22509if ac_fn_c_try_cpp "$LINENO"; then :
22510  # Broken: success on invalid input.
22511continue
22512else
22513  # Passes both tests.
22514ac_preproc_ok=:
22515break
22516fi
22517rm -f conftest.err conftest.i conftest.$ac_ext
22518
22519done
22520# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22521rm -f conftest.i conftest.err conftest.$ac_ext
22522if $ac_preproc_ok; then :
22523  break
22524fi
22525
22526    done
22527    ac_cv_prog_CPP=$CPP
22528
22529fi
22530  CPP=$ac_cv_prog_CPP
22531else
22532  ac_cv_prog_CPP=$CPP
22533fi
22534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
22535$as_echo "$CPP" >&6; }
22536ac_preproc_ok=false
22537for ac_c_preproc_warn_flag in '' yes
22538do
22539  # Use a header file that comes with gcc, so configuring glibc
22540  # with a fresh cross-compiler works.
22541  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22542  # <limits.h> exists even on freestanding compilers.
22543  # On the NeXT, cc -E runs the code through the compiler's parser,
22544  # not just through cpp. "Syntax error" is here to catch this case.
22545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22546/* end confdefs.h.  */
22547#ifdef __STDC__
22548# include <limits.h>
22549#else
22550# include <assert.h>
22551#endif
22552		     Syntax error
22553_ACEOF
22554if ac_fn_c_try_cpp "$LINENO"; then :
22555
22556else
22557  # Broken: fails on valid input.
22558continue
22559fi
22560rm -f conftest.err conftest.i conftest.$ac_ext
22561
22562  # OK, works on sane cases.  Now check whether nonexistent headers
22563  # can be detected and how.
22564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22565/* end confdefs.h.  */
22566#include <ac_nonexistent.h>
22567_ACEOF
22568if ac_fn_c_try_cpp "$LINENO"; then :
22569  # Broken: success on invalid input.
22570continue
22571else
22572  # Passes both tests.
22573ac_preproc_ok=:
22574break
22575fi
22576rm -f conftest.err conftest.i conftest.$ac_ext
22577
22578done
22579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22580rm -f conftest.i conftest.err conftest.$ac_ext
22581if $ac_preproc_ok; then :
22582
22583else
22584  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22586as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
22587See \`config.log' for more details" "$LINENO" 5 ; }
22588fi
22589
22590ac_ext=cpp
22591ac_cpp='$CXXCPP $CPPFLAGS'
22592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22595
22596
22597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22598
22599  # First separate the path from the arguments. This will split at the first
22600  # space.
22601  complete="$CPP"
22602  path="${complete%% *}"
22603  tmp="$complete EOL"
22604  arguments="${tmp#* }"
22605
22606  # Input might be given as Windows format, start by converting to
22607  # unix format.
22608  new_path=`$CYGPATH -u "$path"`
22609
22610  # Now try to locate executable using which
22611  new_path=`$WHICH "$new_path" 2> /dev/null`
22612  if test "x$new_path" = x; then
22613    # Oops. Which didn't find the executable.
22614    # The splitting of arguments from the executable at a space might have been incorrect,
22615    # since paths with space are more likely in Windows. Give it another try with the whole
22616    # argument.
22617    path="$complete"
22618    arguments="EOL"
22619    new_path=`$CYGPATH -u "$path"`
22620    new_path=`$WHICH "$new_path" 2> /dev/null`
22621    if test "x$new_path" = x; then
22622      # It's still not found. Now this is an unrecoverable error.
22623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22624$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22625      has_space=`$ECHO "$complete" | $GREP " "`
22626      if test "x$has_space" != x; then
22627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22629      fi
22630      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22631    fi
22632  fi
22633
22634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22637  # "foo.exe" is OK but "foo" is an error.
22638  #
22639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22640  # It is also a way to make sure we got the proper file name for the real test later on.
22641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22642  if test "x$test_shortpath" = x; then
22643    # Short path failed, file does not exist as specified.
22644    # Try adding .exe or .cmd
22645    if test -f "${new_path}.exe"; then
22646       input_to_shortpath="${new_path}.exe"
22647    elif test -f "${new_path}.cmd"; then
22648       input_to_shortpath="${new_path}.cmd"
22649    else
22650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
22651$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
22652      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22653$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22654      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22655    fi
22656  else
22657    input_to_shortpath="$new_path"
22658  fi
22659
22660  # Call helper function which possibly converts this using DOS-style short mode.
22661  # If so, the updated path is stored in $new_path.
22662  new_path="$input_to_shortpath"
22663
22664  input_path="$input_to_shortpath"
22665  # Check if we need to convert this using DOS-style short mode. If the path
22666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22667  # take no chances and rewrite it.
22668  # Note: m4 eats our [], so we need to use [ and ] instead.
22669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22670  if test "x$has_forbidden_chars" != x; then
22671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22675      # Going to short mode and back again did indeed matter. Since short mode is
22676      # case insensitive, let's make it lowercase to improve readability.
22677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22678      # Now convert it back to Unix-stile (cygpath)
22679      input_path=`$CYGPATH -u "$shortmode_path"`
22680      new_path="$input_path"
22681    fi
22682  fi
22683
22684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22685  if test "x$test_cygdrive_prefix" = x; then
22686    # As a simple fix, exclude /usr/bin since it's not a real path.
22687    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22689      # a path prefixed by /cygdrive for fixpath to work.
22690      new_path="$CYGWIN_ROOT_PATH$input_path"
22691    fi
22692  fi
22693
22694  # remove trailing .exe if any
22695  new_path="${new_path/%.exe/}"
22696
22697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22698
22699  # First separate the path from the arguments. This will split at the first
22700  # space.
22701  complete="$CPP"
22702  path="${complete%% *}"
22703  tmp="$complete EOL"
22704  arguments="${tmp#* }"
22705
22706  # Input might be given as Windows format, start by converting to
22707  # unix format.
22708  new_path="$path"
22709
22710  windows_path="$new_path"
22711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22712    unix_path=`$CYGPATH -u "$windows_path"`
22713    new_path="$unix_path"
22714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22716    new_path="$unix_path"
22717  fi
22718
22719
22720  # Now try to locate executable using which
22721  new_path=`$WHICH "$new_path" 2> /dev/null`
22722
22723  if test "x$new_path" = x; then
22724    # Oops. Which didn't find the executable.
22725    # The splitting of arguments from the executable at a space might have been incorrect,
22726    # since paths with space are more likely in Windows. Give it another try with the whole
22727    # argument.
22728    path="$complete"
22729    arguments="EOL"
22730    new_path="$path"
22731
22732  windows_path="$new_path"
22733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22734    unix_path=`$CYGPATH -u "$windows_path"`
22735    new_path="$unix_path"
22736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22738    new_path="$unix_path"
22739  fi
22740
22741
22742    new_path=`$WHICH "$new_path" 2> /dev/null`
22743
22744    if test "x$new_path" = x; then
22745      # It's still not found. Now this is an unrecoverable error.
22746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22747$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22748      has_space=`$ECHO "$complete" | $GREP " "`
22749      if test "x$has_space" != x; then
22750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22752      fi
22753      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22754    fi
22755  fi
22756
22757  # Now new_path has a complete unix path to the binary
22758  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22759    # Keep paths in /bin as-is, but remove trailing .exe if any
22760    new_path="${new_path/%.exe/}"
22761    # Do not save /bin paths to all_fixpath_prefixes!
22762  else
22763    # Not in mixed or Windows style, start by that.
22764    new_path=`cmd //c echo $new_path`
22765
22766  input_path="$new_path"
22767  # Check if we need to convert this using DOS-style short mode. If the path
22768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22769  # take no chances and rewrite it.
22770  # Note: m4 eats our [], so we need to use [ and ] instead.
22771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22772  if test "x$has_forbidden_chars" != x; then
22773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22775  fi
22776
22777    # Output is in $new_path
22778
22779  windows_path="$new_path"
22780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22781    unix_path=`$CYGPATH -u "$windows_path"`
22782    new_path="$unix_path"
22783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22785    new_path="$unix_path"
22786  fi
22787
22788    # remove trailing .exe if any
22789    new_path="${new_path/%.exe/}"
22790
22791    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22792    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22793  fi
22794
22795  else
22796    # We're on a posix platform. Hooray! :)
22797    # First separate the path from the arguments. This will split at the first
22798    # space.
22799    complete="$CPP"
22800    path="${complete%% *}"
22801    tmp="$complete EOL"
22802    arguments="${tmp#* }"
22803
22804    new_path=`$WHICH $path 2> /dev/null`
22805    if test "x$new_path" = x; then
22806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22807      if test "x$is_absolute_path" != x; then
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
22809$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
22810        new_path="$path"
22811      else
22812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22813$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22814        has_space=`$ECHO "$complete" | $GREP " "`
22815        if test "x$has_space" != x; then
22816          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22818        fi
22819        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22820      fi
22821    fi
22822  fi
22823
22824  # Now join together the path and the arguments once again
22825  if test "x$arguments" != xEOL; then
22826      new_complete="$new_path ${arguments% *}"
22827  else
22828      new_complete="$new_path"
22829  fi
22830
22831  if test "x$complete" != "x$new_complete"; then
22832    CPP="$new_complete"
22833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
22834$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
22835  fi
22836
22837
22838ac_ext=cpp
22839ac_cpp='$CXXCPP $CPPFLAGS'
22840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
22844$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
22845if test -z "$CXXCPP"; then
22846  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
22847  $as_echo_n "(cached) " >&6
22848else
22849      # Double quotes because CXXCPP needs to be expanded
22850    for CXXCPP in "$CXX -E" "/lib/cpp"
22851    do
22852      ac_preproc_ok=false
22853for ac_cxx_preproc_warn_flag in '' yes
22854do
22855  # Use a header file that comes with gcc, so configuring glibc
22856  # with a fresh cross-compiler works.
22857  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22858  # <limits.h> exists even on freestanding compilers.
22859  # On the NeXT, cc -E runs the code through the compiler's parser,
22860  # not just through cpp. "Syntax error" is here to catch this case.
22861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22862/* end confdefs.h.  */
22863#ifdef __STDC__
22864# include <limits.h>
22865#else
22866# include <assert.h>
22867#endif
22868		     Syntax error
22869_ACEOF
22870if ac_fn_cxx_try_cpp "$LINENO"; then :
22871
22872else
22873  # Broken: fails on valid input.
22874continue
22875fi
22876rm -f conftest.err conftest.i conftest.$ac_ext
22877
22878  # OK, works on sane cases.  Now check whether nonexistent headers
22879  # can be detected and how.
22880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22881/* end confdefs.h.  */
22882#include <ac_nonexistent.h>
22883_ACEOF
22884if ac_fn_cxx_try_cpp "$LINENO"; then :
22885  # Broken: success on invalid input.
22886continue
22887else
22888  # Passes both tests.
22889ac_preproc_ok=:
22890break
22891fi
22892rm -f conftest.err conftest.i conftest.$ac_ext
22893
22894done
22895# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22896rm -f conftest.i conftest.err conftest.$ac_ext
22897if $ac_preproc_ok; then :
22898  break
22899fi
22900
22901    done
22902    ac_cv_prog_CXXCPP=$CXXCPP
22903
22904fi
22905  CXXCPP=$ac_cv_prog_CXXCPP
22906else
22907  ac_cv_prog_CXXCPP=$CXXCPP
22908fi
22909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
22910$as_echo "$CXXCPP" >&6; }
22911ac_preproc_ok=false
22912for ac_cxx_preproc_warn_flag in '' yes
22913do
22914  # Use a header file that comes with gcc, so configuring glibc
22915  # with a fresh cross-compiler works.
22916  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22917  # <limits.h> exists even on freestanding compilers.
22918  # On the NeXT, cc -E runs the code through the compiler's parser,
22919  # not just through cpp. "Syntax error" is here to catch this case.
22920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22921/* end confdefs.h.  */
22922#ifdef __STDC__
22923# include <limits.h>
22924#else
22925# include <assert.h>
22926#endif
22927		     Syntax error
22928_ACEOF
22929if ac_fn_cxx_try_cpp "$LINENO"; then :
22930
22931else
22932  # Broken: fails on valid input.
22933continue
22934fi
22935rm -f conftest.err conftest.i conftest.$ac_ext
22936
22937  # OK, works on sane cases.  Now check whether nonexistent headers
22938  # can be detected and how.
22939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22940/* end confdefs.h.  */
22941#include <ac_nonexistent.h>
22942_ACEOF
22943if ac_fn_cxx_try_cpp "$LINENO"; then :
22944  # Broken: success on invalid input.
22945continue
22946else
22947  # Passes both tests.
22948ac_preproc_ok=:
22949break
22950fi
22951rm -f conftest.err conftest.i conftest.$ac_ext
22952
22953done
22954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22955rm -f conftest.i conftest.err conftest.$ac_ext
22956if $ac_preproc_ok; then :
22957
22958else
22959  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22961as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
22962See \`config.log' for more details" "$LINENO" 5 ; }
22963fi
22964
22965ac_ext=cpp
22966ac_cpp='$CXXCPP $CPPFLAGS'
22967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22970
22971
22972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22973
22974  # First separate the path from the arguments. This will split at the first
22975  # space.
22976  complete="$CXXCPP"
22977  path="${complete%% *}"
22978  tmp="$complete EOL"
22979  arguments="${tmp#* }"
22980
22981  # Input might be given as Windows format, start by converting to
22982  # unix format.
22983  new_path=`$CYGPATH -u "$path"`
22984
22985  # Now try to locate executable using which
22986  new_path=`$WHICH "$new_path" 2> /dev/null`
22987  if test "x$new_path" = x; then
22988    # Oops. Which didn't find the executable.
22989    # The splitting of arguments from the executable at a space might have been incorrect,
22990    # since paths with space are more likely in Windows. Give it another try with the whole
22991    # argument.
22992    path="$complete"
22993    arguments="EOL"
22994    new_path=`$CYGPATH -u "$path"`
22995    new_path=`$WHICH "$new_path" 2> /dev/null`
22996    if test "x$new_path" = x; then
22997      # It's still not found. Now this is an unrecoverable error.
22998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
22999$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23000      has_space=`$ECHO "$complete" | $GREP " "`
23001      if test "x$has_space" != x; then
23002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23004      fi
23005      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23006    fi
23007  fi
23008
23009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23012  # "foo.exe" is OK but "foo" is an error.
23013  #
23014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23015  # It is also a way to make sure we got the proper file name for the real test later on.
23016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23017  if test "x$test_shortpath" = x; then
23018    # Short path failed, file does not exist as specified.
23019    # Try adding .exe or .cmd
23020    if test -f "${new_path}.exe"; then
23021       input_to_shortpath="${new_path}.exe"
23022    elif test -f "${new_path}.cmd"; then
23023       input_to_shortpath="${new_path}.cmd"
23024    else
23025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23026$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23029      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23030    fi
23031  else
23032    input_to_shortpath="$new_path"
23033  fi
23034
23035  # Call helper function which possibly converts this using DOS-style short mode.
23036  # If so, the updated path is stored in $new_path.
23037  new_path="$input_to_shortpath"
23038
23039  input_path="$input_to_shortpath"
23040  # Check if we need to convert this using DOS-style short mode. If the path
23041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23042  # take no chances and rewrite it.
23043  # Note: m4 eats our [], so we need to use [ and ] instead.
23044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23045  if test "x$has_forbidden_chars" != x; then
23046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23050      # Going to short mode and back again did indeed matter. Since short mode is
23051      # case insensitive, let's make it lowercase to improve readability.
23052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23053      # Now convert it back to Unix-stile (cygpath)
23054      input_path=`$CYGPATH -u "$shortmode_path"`
23055      new_path="$input_path"
23056    fi
23057  fi
23058
23059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23060  if test "x$test_cygdrive_prefix" = x; then
23061    # As a simple fix, exclude /usr/bin since it's not a real path.
23062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23064      # a path prefixed by /cygdrive for fixpath to work.
23065      new_path="$CYGWIN_ROOT_PATH$input_path"
23066    fi
23067  fi
23068
23069  # remove trailing .exe if any
23070  new_path="${new_path/%.exe/}"
23071
23072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23073
23074  # First separate the path from the arguments. This will split at the first
23075  # space.
23076  complete="$CXXCPP"
23077  path="${complete%% *}"
23078  tmp="$complete EOL"
23079  arguments="${tmp#* }"
23080
23081  # Input might be given as Windows format, start by converting to
23082  # unix format.
23083  new_path="$path"
23084
23085  windows_path="$new_path"
23086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23087    unix_path=`$CYGPATH -u "$windows_path"`
23088    new_path="$unix_path"
23089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23091    new_path="$unix_path"
23092  fi
23093
23094
23095  # Now try to locate executable using which
23096  new_path=`$WHICH "$new_path" 2> /dev/null`
23097
23098  if test "x$new_path" = x; then
23099    # Oops. Which didn't find the executable.
23100    # The splitting of arguments from the executable at a space might have been incorrect,
23101    # since paths with space are more likely in Windows. Give it another try with the whole
23102    # argument.
23103    path="$complete"
23104    arguments="EOL"
23105    new_path="$path"
23106
23107  windows_path="$new_path"
23108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23109    unix_path=`$CYGPATH -u "$windows_path"`
23110    new_path="$unix_path"
23111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23113    new_path="$unix_path"
23114  fi
23115
23116
23117    new_path=`$WHICH "$new_path" 2> /dev/null`
23118
23119    if test "x$new_path" = x; then
23120      # It's still not found. Now this is an unrecoverable error.
23121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23122$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23123      has_space=`$ECHO "$complete" | $GREP " "`
23124      if test "x$has_space" != x; then
23125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23127      fi
23128      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23129    fi
23130  fi
23131
23132  # Now new_path has a complete unix path to the binary
23133  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23134    # Keep paths in /bin as-is, but remove trailing .exe if any
23135    new_path="${new_path/%.exe/}"
23136    # Do not save /bin paths to all_fixpath_prefixes!
23137  else
23138    # Not in mixed or Windows style, start by that.
23139    new_path=`cmd //c echo $new_path`
23140
23141  input_path="$new_path"
23142  # Check if we need to convert this using DOS-style short mode. If the path
23143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23144  # take no chances and rewrite it.
23145  # Note: m4 eats our [], so we need to use [ and ] instead.
23146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23147  if test "x$has_forbidden_chars" != x; then
23148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23150  fi
23151
23152    # Output is in $new_path
23153
23154  windows_path="$new_path"
23155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23156    unix_path=`$CYGPATH -u "$windows_path"`
23157    new_path="$unix_path"
23158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23160    new_path="$unix_path"
23161  fi
23162
23163    # remove trailing .exe if any
23164    new_path="${new_path/%.exe/}"
23165
23166    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23167    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23168  fi
23169
23170  else
23171    # We're on a posix platform. Hooray! :)
23172    # First separate the path from the arguments. This will split at the first
23173    # space.
23174    complete="$CXXCPP"
23175    path="${complete%% *}"
23176    tmp="$complete EOL"
23177    arguments="${tmp#* }"
23178
23179    new_path=`$WHICH $path 2> /dev/null`
23180    if test "x$new_path" = x; then
23181      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23182      if test "x$is_absolute_path" != x; then
23183        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23184$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23185        new_path="$path"
23186      else
23187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23188$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23189        has_space=`$ECHO "$complete" | $GREP " "`
23190        if test "x$has_space" != x; then
23191          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23192$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23193        fi
23194        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23195      fi
23196    fi
23197  fi
23198
23199  # Now join together the path and the arguments once again
23200  if test "x$arguments" != xEOL; then
23201      new_complete="$new_path ${arguments% *}"
23202  else
23203      new_complete="$new_path"
23204  fi
23205
23206  if test "x$complete" != "x$new_complete"; then
23207    CXXCPP="$new_complete"
23208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23209$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23210  fi
23211
23212
23213if test "x$COMPILE_TYPE" != "xcross"; then
23214    # If we are not cross compiling, use the same compilers for
23215    # building the build platform executables. The cross-compilation
23216    # case needed to be done earlier, but this can only be done after
23217    # the native tools have been localized.
23218    BUILD_CC="$CC"
23219    BUILD_CXX="$CXX"
23220    BUILD_LD="$LD"
23221fi
23222
23223# for solaris we really need solaris tools, and not gnu equivalent
23224#   these seems to normally reside in /usr/ccs/bin so add that to path before
23225#   starting to probe
23226#
23227#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23228#         so that it can be overriden --with-tools-dir
23229if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23230    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23231fi
23232
23233# Find the right assembler.
23234if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23235    # Extract the first word of "as", so it can be a program name with args.
23236set dummy as; ac_word=$2
23237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23238$as_echo_n "checking for $ac_word... " >&6; }
23239if test "${ac_cv_path_AS+set}" = set; then :
23240  $as_echo_n "(cached) " >&6
23241else
23242  case $AS in
23243  [\\/]* | ?:[\\/]*)
23244  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23245  ;;
23246  *)
23247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23248for as_dir in $PATH
23249do
23250  IFS=$as_save_IFS
23251  test -z "$as_dir" && as_dir=.
23252    for ac_exec_ext in '' $ac_executable_extensions; do
23253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23254    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23256    break 2
23257  fi
23258done
23259  done
23260IFS=$as_save_IFS
23261
23262  ;;
23263esac
23264fi
23265AS=$ac_cv_path_AS
23266if test -n "$AS"; then
23267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23268$as_echo "$AS" >&6; }
23269else
23270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23271$as_echo "no" >&6; }
23272fi
23273
23274
23275
23276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23277
23278  # First separate the path from the arguments. This will split at the first
23279  # space.
23280  complete="$AS"
23281  path="${complete%% *}"
23282  tmp="$complete EOL"
23283  arguments="${tmp#* }"
23284
23285  # Input might be given as Windows format, start by converting to
23286  # unix format.
23287  new_path=`$CYGPATH -u "$path"`
23288
23289  # Now try to locate executable using which
23290  new_path=`$WHICH "$new_path" 2> /dev/null`
23291  if test "x$new_path" = x; then
23292    # Oops. Which didn't find the executable.
23293    # The splitting of arguments from the executable at a space might have been incorrect,
23294    # since paths with space are more likely in Windows. Give it another try with the whole
23295    # argument.
23296    path="$complete"
23297    arguments="EOL"
23298    new_path=`$CYGPATH -u "$path"`
23299    new_path=`$WHICH "$new_path" 2> /dev/null`
23300    if test "x$new_path" = x; then
23301      # It's still not found. Now this is an unrecoverable error.
23302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23303$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23304      has_space=`$ECHO "$complete" | $GREP " "`
23305      if test "x$has_space" != x; then
23306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23308      fi
23309      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23310    fi
23311  fi
23312
23313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23316  # "foo.exe" is OK but "foo" is an error.
23317  #
23318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23319  # It is also a way to make sure we got the proper file name for the real test later on.
23320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23321  if test "x$test_shortpath" = x; then
23322    # Short path failed, file does not exist as specified.
23323    # Try adding .exe or .cmd
23324    if test -f "${new_path}.exe"; then
23325       input_to_shortpath="${new_path}.exe"
23326    elif test -f "${new_path}.cmd"; then
23327       input_to_shortpath="${new_path}.cmd"
23328    else
23329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23330$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23333      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23334    fi
23335  else
23336    input_to_shortpath="$new_path"
23337  fi
23338
23339  # Call helper function which possibly converts this using DOS-style short mode.
23340  # If so, the updated path is stored in $new_path.
23341  new_path="$input_to_shortpath"
23342
23343  input_path="$input_to_shortpath"
23344  # Check if we need to convert this using DOS-style short mode. If the path
23345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23346  # take no chances and rewrite it.
23347  # Note: m4 eats our [], so we need to use [ and ] instead.
23348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23349  if test "x$has_forbidden_chars" != x; then
23350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23354      # Going to short mode and back again did indeed matter. Since short mode is
23355      # case insensitive, let's make it lowercase to improve readability.
23356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23357      # Now convert it back to Unix-stile (cygpath)
23358      input_path=`$CYGPATH -u "$shortmode_path"`
23359      new_path="$input_path"
23360    fi
23361  fi
23362
23363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23364  if test "x$test_cygdrive_prefix" = x; then
23365    # As a simple fix, exclude /usr/bin since it's not a real path.
23366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23368      # a path prefixed by /cygdrive for fixpath to work.
23369      new_path="$CYGWIN_ROOT_PATH$input_path"
23370    fi
23371  fi
23372
23373  # remove trailing .exe if any
23374  new_path="${new_path/%.exe/}"
23375
23376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23377
23378  # First separate the path from the arguments. This will split at the first
23379  # space.
23380  complete="$AS"
23381  path="${complete%% *}"
23382  tmp="$complete EOL"
23383  arguments="${tmp#* }"
23384
23385  # Input might be given as Windows format, start by converting to
23386  # unix format.
23387  new_path="$path"
23388
23389  windows_path="$new_path"
23390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23391    unix_path=`$CYGPATH -u "$windows_path"`
23392    new_path="$unix_path"
23393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23395    new_path="$unix_path"
23396  fi
23397
23398
23399  # Now try to locate executable using which
23400  new_path=`$WHICH "$new_path" 2> /dev/null`
23401
23402  if test "x$new_path" = x; then
23403    # Oops. Which didn't find the executable.
23404    # The splitting of arguments from the executable at a space might have been incorrect,
23405    # since paths with space are more likely in Windows. Give it another try with the whole
23406    # argument.
23407    path="$complete"
23408    arguments="EOL"
23409    new_path="$path"
23410
23411  windows_path="$new_path"
23412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23413    unix_path=`$CYGPATH -u "$windows_path"`
23414    new_path="$unix_path"
23415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23417    new_path="$unix_path"
23418  fi
23419
23420
23421    new_path=`$WHICH "$new_path" 2> /dev/null`
23422
23423    if test "x$new_path" = x; then
23424      # It's still not found. Now this is an unrecoverable error.
23425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23426$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23427      has_space=`$ECHO "$complete" | $GREP " "`
23428      if test "x$has_space" != x; then
23429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23431      fi
23432      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23433    fi
23434  fi
23435
23436  # Now new_path has a complete unix path to the binary
23437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23438    # Keep paths in /bin as-is, but remove trailing .exe if any
23439    new_path="${new_path/%.exe/}"
23440    # Do not save /bin paths to all_fixpath_prefixes!
23441  else
23442    # Not in mixed or Windows style, start by that.
23443    new_path=`cmd //c echo $new_path`
23444
23445  input_path="$new_path"
23446  # Check if we need to convert this using DOS-style short mode. If the path
23447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23448  # take no chances and rewrite it.
23449  # Note: m4 eats our [], so we need to use [ and ] instead.
23450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23451  if test "x$has_forbidden_chars" != x; then
23452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23454  fi
23455
23456    # Output is in $new_path
23457
23458  windows_path="$new_path"
23459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23460    unix_path=`$CYGPATH -u "$windows_path"`
23461    new_path="$unix_path"
23462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23464    new_path="$unix_path"
23465  fi
23466
23467    # remove trailing .exe if any
23468    new_path="${new_path/%.exe/}"
23469
23470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23472  fi
23473
23474  else
23475    # We're on a posix platform. Hooray! :)
23476    # First separate the path from the arguments. This will split at the first
23477    # space.
23478    complete="$AS"
23479    path="${complete%% *}"
23480    tmp="$complete EOL"
23481    arguments="${tmp#* }"
23482
23483    new_path=`$WHICH $path 2> /dev/null`
23484    if test "x$new_path" = x; then
23485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23486      if test "x$is_absolute_path" != x; then
23487        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
23488$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
23489        new_path="$path"
23490      else
23491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23492$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23493        has_space=`$ECHO "$complete" | $GREP " "`
23494        if test "x$has_space" != x; then
23495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23497        fi
23498        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23499      fi
23500    fi
23501  fi
23502
23503  # Now join together the path and the arguments once again
23504  if test "x$arguments" != xEOL; then
23505      new_complete="$new_path ${arguments% *}"
23506  else
23507      new_complete="$new_path"
23508  fi
23509
23510  if test "x$complete" != "x$new_complete"; then
23511    AS="$new_complete"
23512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
23513$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
23514  fi
23515
23516else
23517    AS="$CC -c"
23518fi
23519
23520
23521if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23522    for ac_prog in gnm nm
23523do
23524  # Extract the first word of "$ac_prog", so it can be a program name with args.
23525set dummy $ac_prog; ac_word=$2
23526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23527$as_echo_n "checking for $ac_word... " >&6; }
23528if test "${ac_cv_path_NM+set}" = set; then :
23529  $as_echo_n "(cached) " >&6
23530else
23531  case $NM in
23532  [\\/]* | ?:[\\/]*)
23533  ac_cv_path_NM="$NM" # Let the user override the test with a path.
23534  ;;
23535  *)
23536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23537for as_dir in $PATH
23538do
23539  IFS=$as_save_IFS
23540  test -z "$as_dir" && as_dir=.
23541    for ac_exec_ext in '' $ac_executable_extensions; do
23542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23543    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
23544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23545    break 2
23546  fi
23547done
23548  done
23549IFS=$as_save_IFS
23550
23551  ;;
23552esac
23553fi
23554NM=$ac_cv_path_NM
23555if test -n "$NM"; then
23556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
23557$as_echo "$NM" >&6; }
23558else
23559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23560$as_echo "no" >&6; }
23561fi
23562
23563
23564  test -n "$NM" && break
23565done
23566
23567
23568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23569
23570  # First separate the path from the arguments. This will split at the first
23571  # space.
23572  complete="$NM"
23573  path="${complete%% *}"
23574  tmp="$complete EOL"
23575  arguments="${tmp#* }"
23576
23577  # Input might be given as Windows format, start by converting to
23578  # unix format.
23579  new_path=`$CYGPATH -u "$path"`
23580
23581  # Now try to locate executable using which
23582  new_path=`$WHICH "$new_path" 2> /dev/null`
23583  if test "x$new_path" = x; then
23584    # Oops. Which didn't find the executable.
23585    # The splitting of arguments from the executable at a space might have been incorrect,
23586    # since paths with space are more likely in Windows. Give it another try with the whole
23587    # argument.
23588    path="$complete"
23589    arguments="EOL"
23590    new_path=`$CYGPATH -u "$path"`
23591    new_path=`$WHICH "$new_path" 2> /dev/null`
23592    if test "x$new_path" = x; then
23593      # It's still not found. Now this is an unrecoverable error.
23594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23595$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23596      has_space=`$ECHO "$complete" | $GREP " "`
23597      if test "x$has_space" != x; then
23598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23600      fi
23601      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23602    fi
23603  fi
23604
23605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23608  # "foo.exe" is OK but "foo" is an error.
23609  #
23610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23611  # It is also a way to make sure we got the proper file name for the real test later on.
23612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23613  if test "x$test_shortpath" = x; then
23614    # Short path failed, file does not exist as specified.
23615    # Try adding .exe or .cmd
23616    if test -f "${new_path}.exe"; then
23617       input_to_shortpath="${new_path}.exe"
23618    elif test -f "${new_path}.cmd"; then
23619       input_to_shortpath="${new_path}.cmd"
23620    else
23621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
23622$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
23623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23625      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23626    fi
23627  else
23628    input_to_shortpath="$new_path"
23629  fi
23630
23631  # Call helper function which possibly converts this using DOS-style short mode.
23632  # If so, the updated path is stored in $new_path.
23633  new_path="$input_to_shortpath"
23634
23635  input_path="$input_to_shortpath"
23636  # Check if we need to convert this using DOS-style short mode. If the path
23637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23638  # take no chances and rewrite it.
23639  # Note: m4 eats our [], so we need to use [ and ] instead.
23640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23641  if test "x$has_forbidden_chars" != x; then
23642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23646      # Going to short mode and back again did indeed matter. Since short mode is
23647      # case insensitive, let's make it lowercase to improve readability.
23648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23649      # Now convert it back to Unix-stile (cygpath)
23650      input_path=`$CYGPATH -u "$shortmode_path"`
23651      new_path="$input_path"
23652    fi
23653  fi
23654
23655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23656  if test "x$test_cygdrive_prefix" = x; then
23657    # As a simple fix, exclude /usr/bin since it's not a real path.
23658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23660      # a path prefixed by /cygdrive for fixpath to work.
23661      new_path="$CYGWIN_ROOT_PATH$input_path"
23662    fi
23663  fi
23664
23665  # remove trailing .exe if any
23666  new_path="${new_path/%.exe/}"
23667
23668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23669
23670  # First separate the path from the arguments. This will split at the first
23671  # space.
23672  complete="$NM"
23673  path="${complete%% *}"
23674  tmp="$complete EOL"
23675  arguments="${tmp#* }"
23676
23677  # Input might be given as Windows format, start by converting to
23678  # unix format.
23679  new_path="$path"
23680
23681  windows_path="$new_path"
23682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23683    unix_path=`$CYGPATH -u "$windows_path"`
23684    new_path="$unix_path"
23685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23687    new_path="$unix_path"
23688  fi
23689
23690
23691  # Now try to locate executable using which
23692  new_path=`$WHICH "$new_path" 2> /dev/null`
23693
23694  if test "x$new_path" = x; then
23695    # Oops. Which didn't find the executable.
23696    # The splitting of arguments from the executable at a space might have been incorrect,
23697    # since paths with space are more likely in Windows. Give it another try with the whole
23698    # argument.
23699    path="$complete"
23700    arguments="EOL"
23701    new_path="$path"
23702
23703  windows_path="$new_path"
23704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23705    unix_path=`$CYGPATH -u "$windows_path"`
23706    new_path="$unix_path"
23707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23709    new_path="$unix_path"
23710  fi
23711
23712
23713    new_path=`$WHICH "$new_path" 2> /dev/null`
23714
23715    if test "x$new_path" = x; then
23716      # It's still not found. Now this is an unrecoverable error.
23717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23718$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23719      has_space=`$ECHO "$complete" | $GREP " "`
23720      if test "x$has_space" != x; then
23721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23723      fi
23724      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23725    fi
23726  fi
23727
23728  # Now new_path has a complete unix path to the binary
23729  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23730    # Keep paths in /bin as-is, but remove trailing .exe if any
23731    new_path="${new_path/%.exe/}"
23732    # Do not save /bin paths to all_fixpath_prefixes!
23733  else
23734    # Not in mixed or Windows style, start by that.
23735    new_path=`cmd //c echo $new_path`
23736
23737  input_path="$new_path"
23738  # Check if we need to convert this using DOS-style short mode. If the path
23739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23740  # take no chances and rewrite it.
23741  # Note: m4 eats our [], so we need to use [ and ] instead.
23742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23743  if test "x$has_forbidden_chars" != x; then
23744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23746  fi
23747
23748    # Output is in $new_path
23749
23750  windows_path="$new_path"
23751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23752    unix_path=`$CYGPATH -u "$windows_path"`
23753    new_path="$unix_path"
23754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23756    new_path="$unix_path"
23757  fi
23758
23759    # remove trailing .exe if any
23760    new_path="${new_path/%.exe/}"
23761
23762    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23763    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23764  fi
23765
23766  else
23767    # We're on a posix platform. Hooray! :)
23768    # First separate the path from the arguments. This will split at the first
23769    # space.
23770    complete="$NM"
23771    path="${complete%% *}"
23772    tmp="$complete EOL"
23773    arguments="${tmp#* }"
23774
23775    new_path=`$WHICH $path 2> /dev/null`
23776    if test "x$new_path" = x; then
23777      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23778      if test "x$is_absolute_path" != x; then
23779        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
23780$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
23781        new_path="$path"
23782      else
23783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23784$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23785        has_space=`$ECHO "$complete" | $GREP " "`
23786        if test "x$has_space" != x; then
23787          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23788$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23789        fi
23790        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23791      fi
23792    fi
23793  fi
23794
23795  # Now join together the path and the arguments once again
23796  if test "x$arguments" != xEOL; then
23797      new_complete="$new_path ${arguments% *}"
23798  else
23799      new_complete="$new_path"
23800  fi
23801
23802  if test "x$complete" != "x$new_complete"; then
23803    NM="$new_complete"
23804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
23805$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
23806  fi
23807
23808    # Extract the first word of "strip", so it can be a program name with args.
23809set dummy strip; ac_word=$2
23810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23811$as_echo_n "checking for $ac_word... " >&6; }
23812if test "${ac_cv_path_STRIP+set}" = set; then :
23813  $as_echo_n "(cached) " >&6
23814else
23815  case $STRIP in
23816  [\\/]* | ?:[\\/]*)
23817  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
23818  ;;
23819  *)
23820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23821for as_dir in $PATH
23822do
23823  IFS=$as_save_IFS
23824  test -z "$as_dir" && as_dir=.
23825    for ac_exec_ext in '' $ac_executable_extensions; do
23826  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23827    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
23828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23829    break 2
23830  fi
23831done
23832  done
23833IFS=$as_save_IFS
23834
23835  ;;
23836esac
23837fi
23838STRIP=$ac_cv_path_STRIP
23839if test -n "$STRIP"; then
23840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23841$as_echo "$STRIP" >&6; }
23842else
23843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23844$as_echo "no" >&6; }
23845fi
23846
23847
23848
23849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23850
23851  # First separate the path from the arguments. This will split at the first
23852  # space.
23853  complete="$STRIP"
23854  path="${complete%% *}"
23855  tmp="$complete EOL"
23856  arguments="${tmp#* }"
23857
23858  # Input might be given as Windows format, start by converting to
23859  # unix format.
23860  new_path=`$CYGPATH -u "$path"`
23861
23862  # Now try to locate executable using which
23863  new_path=`$WHICH "$new_path" 2> /dev/null`
23864  if test "x$new_path" = x; then
23865    # Oops. Which didn't find the executable.
23866    # The splitting of arguments from the executable at a space might have been incorrect,
23867    # since paths with space are more likely in Windows. Give it another try with the whole
23868    # argument.
23869    path="$complete"
23870    arguments="EOL"
23871    new_path=`$CYGPATH -u "$path"`
23872    new_path=`$WHICH "$new_path" 2> /dev/null`
23873    if test "x$new_path" = x; then
23874      # It's still not found. Now this is an unrecoverable error.
23875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
23876$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
23877      has_space=`$ECHO "$complete" | $GREP " "`
23878      if test "x$has_space" != x; then
23879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23881      fi
23882      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
23883    fi
23884  fi
23885
23886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23889  # "foo.exe" is OK but "foo" is an error.
23890  #
23891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23892  # It is also a way to make sure we got the proper file name for the real test later on.
23893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23894  if test "x$test_shortpath" = x; then
23895    # Short path failed, file does not exist as specified.
23896    # Try adding .exe or .cmd
23897    if test -f "${new_path}.exe"; then
23898       input_to_shortpath="${new_path}.exe"
23899    elif test -f "${new_path}.cmd"; then
23900       input_to_shortpath="${new_path}.cmd"
23901    else
23902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
23903$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
23904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23906      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
23907    fi
23908  else
23909    input_to_shortpath="$new_path"
23910  fi
23911
23912  # Call helper function which possibly converts this using DOS-style short mode.
23913  # If so, the updated path is stored in $new_path.
23914  new_path="$input_to_shortpath"
23915
23916  input_path="$input_to_shortpath"
23917  # Check if we need to convert this using DOS-style short mode. If the path
23918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23919  # take no chances and rewrite it.
23920  # Note: m4 eats our [], so we need to use [ and ] instead.
23921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23922  if test "x$has_forbidden_chars" != x; then
23923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23927      # Going to short mode and back again did indeed matter. Since short mode is
23928      # case insensitive, let's make it lowercase to improve readability.
23929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23930      # Now convert it back to Unix-stile (cygpath)
23931      input_path=`$CYGPATH -u "$shortmode_path"`
23932      new_path="$input_path"
23933    fi
23934  fi
23935
23936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23937  if test "x$test_cygdrive_prefix" = x; then
23938    # As a simple fix, exclude /usr/bin since it's not a real path.
23939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23941      # a path prefixed by /cygdrive for fixpath to work.
23942      new_path="$CYGWIN_ROOT_PATH$input_path"
23943    fi
23944  fi
23945
23946  # remove trailing .exe if any
23947  new_path="${new_path/%.exe/}"
23948
23949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23950
23951  # First separate the path from the arguments. This will split at the first
23952  # space.
23953  complete="$STRIP"
23954  path="${complete%% *}"
23955  tmp="$complete EOL"
23956  arguments="${tmp#* }"
23957
23958  # Input might be given as Windows format, start by converting to
23959  # unix format.
23960  new_path="$path"
23961
23962  windows_path="$new_path"
23963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23964    unix_path=`$CYGPATH -u "$windows_path"`
23965    new_path="$unix_path"
23966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23968    new_path="$unix_path"
23969  fi
23970
23971
23972  # Now try to locate executable using which
23973  new_path=`$WHICH "$new_path" 2> /dev/null`
23974
23975  if test "x$new_path" = x; then
23976    # Oops. Which didn't find the executable.
23977    # The splitting of arguments from the executable at a space might have been incorrect,
23978    # since paths with space are more likely in Windows. Give it another try with the whole
23979    # argument.
23980    path="$complete"
23981    arguments="EOL"
23982    new_path="$path"
23983
23984  windows_path="$new_path"
23985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23986    unix_path=`$CYGPATH -u "$windows_path"`
23987    new_path="$unix_path"
23988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23990    new_path="$unix_path"
23991  fi
23992
23993
23994    new_path=`$WHICH "$new_path" 2> /dev/null`
23995
23996    if test "x$new_path" = x; then
23997      # It's still not found. Now this is an unrecoverable error.
23998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
23999$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24000      has_space=`$ECHO "$complete" | $GREP " "`
24001      if test "x$has_space" != x; then
24002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24004      fi
24005      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24006    fi
24007  fi
24008
24009  # Now new_path has a complete unix path to the binary
24010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24011    # Keep paths in /bin as-is, but remove trailing .exe if any
24012    new_path="${new_path/%.exe/}"
24013    # Do not save /bin paths to all_fixpath_prefixes!
24014  else
24015    # Not in mixed or Windows style, start by that.
24016    new_path=`cmd //c echo $new_path`
24017
24018  input_path="$new_path"
24019  # Check if we need to convert this using DOS-style short mode. If the path
24020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24021  # take no chances and rewrite it.
24022  # Note: m4 eats our [], so we need to use [ and ] instead.
24023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24024  if test "x$has_forbidden_chars" != x; then
24025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24027  fi
24028
24029    # Output is in $new_path
24030
24031  windows_path="$new_path"
24032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24033    unix_path=`$CYGPATH -u "$windows_path"`
24034    new_path="$unix_path"
24035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24037    new_path="$unix_path"
24038  fi
24039
24040    # remove trailing .exe if any
24041    new_path="${new_path/%.exe/}"
24042
24043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24045  fi
24046
24047  else
24048    # We're on a posix platform. Hooray! :)
24049    # First separate the path from the arguments. This will split at the first
24050    # space.
24051    complete="$STRIP"
24052    path="${complete%% *}"
24053    tmp="$complete EOL"
24054    arguments="${tmp#* }"
24055
24056    new_path=`$WHICH $path 2> /dev/null`
24057    if test "x$new_path" = x; then
24058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24059      if test "x$is_absolute_path" != x; then
24060        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24061$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24062        new_path="$path"
24063      else
24064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24065$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24066        has_space=`$ECHO "$complete" | $GREP " "`
24067        if test "x$has_space" != x; then
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24069$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24070        fi
24071        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24072      fi
24073    fi
24074  fi
24075
24076  # Now join together the path and the arguments once again
24077  if test "x$arguments" != xEOL; then
24078      new_complete="$new_path ${arguments% *}"
24079  else
24080      new_complete="$new_path"
24081  fi
24082
24083  if test "x$complete" != "x$new_complete"; then
24084    STRIP="$new_complete"
24085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24086$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24087  fi
24088
24089    # Extract the first word of "mcs", so it can be a program name with args.
24090set dummy mcs; ac_word=$2
24091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24092$as_echo_n "checking for $ac_word... " >&6; }
24093if test "${ac_cv_path_MCS+set}" = set; then :
24094  $as_echo_n "(cached) " >&6
24095else
24096  case $MCS in
24097  [\\/]* | ?:[\\/]*)
24098  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24099  ;;
24100  *)
24101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24102for as_dir in $PATH
24103do
24104  IFS=$as_save_IFS
24105  test -z "$as_dir" && as_dir=.
24106    for ac_exec_ext in '' $ac_executable_extensions; do
24107  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24108    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24110    break 2
24111  fi
24112done
24113  done
24114IFS=$as_save_IFS
24115
24116  ;;
24117esac
24118fi
24119MCS=$ac_cv_path_MCS
24120if test -n "$MCS"; then
24121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24122$as_echo "$MCS" >&6; }
24123else
24124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24125$as_echo "no" >&6; }
24126fi
24127
24128
24129
24130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24131
24132  # First separate the path from the arguments. This will split at the first
24133  # space.
24134  complete="$MCS"
24135  path="${complete%% *}"
24136  tmp="$complete EOL"
24137  arguments="${tmp#* }"
24138
24139  # Input might be given as Windows format, start by converting to
24140  # unix format.
24141  new_path=`$CYGPATH -u "$path"`
24142
24143  # Now try to locate executable using which
24144  new_path=`$WHICH "$new_path" 2> /dev/null`
24145  if test "x$new_path" = x; then
24146    # Oops. Which didn't find the executable.
24147    # The splitting of arguments from the executable at a space might have been incorrect,
24148    # since paths with space are more likely in Windows. Give it another try with the whole
24149    # argument.
24150    path="$complete"
24151    arguments="EOL"
24152    new_path=`$CYGPATH -u "$path"`
24153    new_path=`$WHICH "$new_path" 2> /dev/null`
24154    if test "x$new_path" = x; then
24155      # It's still not found. Now this is an unrecoverable error.
24156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24157$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24158      has_space=`$ECHO "$complete" | $GREP " "`
24159      if test "x$has_space" != x; then
24160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24162      fi
24163      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24164    fi
24165  fi
24166
24167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24170  # "foo.exe" is OK but "foo" is an error.
24171  #
24172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24173  # It is also a way to make sure we got the proper file name for the real test later on.
24174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24175  if test "x$test_shortpath" = x; then
24176    # Short path failed, file does not exist as specified.
24177    # Try adding .exe or .cmd
24178    if test -f "${new_path}.exe"; then
24179       input_to_shortpath="${new_path}.exe"
24180    elif test -f "${new_path}.cmd"; then
24181       input_to_shortpath="${new_path}.cmd"
24182    else
24183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24184$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24187      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24188    fi
24189  else
24190    input_to_shortpath="$new_path"
24191  fi
24192
24193  # Call helper function which possibly converts this using DOS-style short mode.
24194  # If so, the updated path is stored in $new_path.
24195  new_path="$input_to_shortpath"
24196
24197  input_path="$input_to_shortpath"
24198  # Check if we need to convert this using DOS-style short mode. If the path
24199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24200  # take no chances and rewrite it.
24201  # Note: m4 eats our [], so we need to use [ and ] instead.
24202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24203  if test "x$has_forbidden_chars" != x; then
24204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24208      # Going to short mode and back again did indeed matter. Since short mode is
24209      # case insensitive, let's make it lowercase to improve readability.
24210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24211      # Now convert it back to Unix-stile (cygpath)
24212      input_path=`$CYGPATH -u "$shortmode_path"`
24213      new_path="$input_path"
24214    fi
24215  fi
24216
24217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24218  if test "x$test_cygdrive_prefix" = x; then
24219    # As a simple fix, exclude /usr/bin since it's not a real path.
24220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24222      # a path prefixed by /cygdrive for fixpath to work.
24223      new_path="$CYGWIN_ROOT_PATH$input_path"
24224    fi
24225  fi
24226
24227  # remove trailing .exe if any
24228  new_path="${new_path/%.exe/}"
24229
24230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24231
24232  # First separate the path from the arguments. This will split at the first
24233  # space.
24234  complete="$MCS"
24235  path="${complete%% *}"
24236  tmp="$complete EOL"
24237  arguments="${tmp#* }"
24238
24239  # Input might be given as Windows format, start by converting to
24240  # unix format.
24241  new_path="$path"
24242
24243  windows_path="$new_path"
24244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24245    unix_path=`$CYGPATH -u "$windows_path"`
24246    new_path="$unix_path"
24247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24249    new_path="$unix_path"
24250  fi
24251
24252
24253  # Now try to locate executable using which
24254  new_path=`$WHICH "$new_path" 2> /dev/null`
24255
24256  if test "x$new_path" = x; then
24257    # Oops. Which didn't find the executable.
24258    # The splitting of arguments from the executable at a space might have been incorrect,
24259    # since paths with space are more likely in Windows. Give it another try with the whole
24260    # argument.
24261    path="$complete"
24262    arguments="EOL"
24263    new_path="$path"
24264
24265  windows_path="$new_path"
24266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24267    unix_path=`$CYGPATH -u "$windows_path"`
24268    new_path="$unix_path"
24269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24271    new_path="$unix_path"
24272  fi
24273
24274
24275    new_path=`$WHICH "$new_path" 2> /dev/null`
24276
24277    if test "x$new_path" = x; then
24278      # It's still not found. Now this is an unrecoverable error.
24279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24280$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24281      has_space=`$ECHO "$complete" | $GREP " "`
24282      if test "x$has_space" != x; then
24283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24285      fi
24286      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24287    fi
24288  fi
24289
24290  # Now new_path has a complete unix path to the binary
24291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24292    # Keep paths in /bin as-is, but remove trailing .exe if any
24293    new_path="${new_path/%.exe/}"
24294    # Do not save /bin paths to all_fixpath_prefixes!
24295  else
24296    # Not in mixed or Windows style, start by that.
24297    new_path=`cmd //c echo $new_path`
24298
24299  input_path="$new_path"
24300  # Check if we need to convert this using DOS-style short mode. If the path
24301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24302  # take no chances and rewrite it.
24303  # Note: m4 eats our [], so we need to use [ and ] instead.
24304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24305  if test "x$has_forbidden_chars" != x; then
24306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24308  fi
24309
24310    # Output is in $new_path
24311
24312  windows_path="$new_path"
24313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24314    unix_path=`$CYGPATH -u "$windows_path"`
24315    new_path="$unix_path"
24316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24318    new_path="$unix_path"
24319  fi
24320
24321    # remove trailing .exe if any
24322    new_path="${new_path/%.exe/}"
24323
24324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24326  fi
24327
24328  else
24329    # We're on a posix platform. Hooray! :)
24330    # First separate the path from the arguments. This will split at the first
24331    # space.
24332    complete="$MCS"
24333    path="${complete%% *}"
24334    tmp="$complete EOL"
24335    arguments="${tmp#* }"
24336
24337    new_path=`$WHICH $path 2> /dev/null`
24338    if test "x$new_path" = x; then
24339      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24340      if test "x$is_absolute_path" != x; then
24341        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24342$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24343        new_path="$path"
24344      else
24345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24346$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24347        has_space=`$ECHO "$complete" | $GREP " "`
24348        if test "x$has_space" != x; then
24349          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24350$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24351        fi
24352        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24353      fi
24354    fi
24355  fi
24356
24357  # Now join together the path and the arguments once again
24358  if test "x$arguments" != xEOL; then
24359      new_complete="$new_path ${arguments% *}"
24360  else
24361      new_complete="$new_path"
24362  fi
24363
24364  if test "x$complete" != "x$new_complete"; then
24365    MCS="$new_complete"
24366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24367$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24368  fi
24369
24370elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24371    if test -n "$ac_tool_prefix"; then
24372  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24373set dummy ${ac_tool_prefix}nm; ac_word=$2
24374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24375$as_echo_n "checking for $ac_word... " >&6; }
24376if test "${ac_cv_prog_NM+set}" = set; then :
24377  $as_echo_n "(cached) " >&6
24378else
24379  if test -n "$NM"; then
24380  ac_cv_prog_NM="$NM" # Let the user override the test.
24381else
24382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24383for as_dir in $PATH
24384do
24385  IFS=$as_save_IFS
24386  test -z "$as_dir" && as_dir=.
24387    for ac_exec_ext in '' $ac_executable_extensions; do
24388  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24389    ac_cv_prog_NM="${ac_tool_prefix}nm"
24390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24391    break 2
24392  fi
24393done
24394  done
24395IFS=$as_save_IFS
24396
24397fi
24398fi
24399NM=$ac_cv_prog_NM
24400if test -n "$NM"; then
24401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24402$as_echo "$NM" >&6; }
24403else
24404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24405$as_echo "no" >&6; }
24406fi
24407
24408
24409fi
24410if test -z "$ac_cv_prog_NM"; then
24411  ac_ct_NM=$NM
24412  # Extract the first word of "nm", so it can be a program name with args.
24413set dummy nm; ac_word=$2
24414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24415$as_echo_n "checking for $ac_word... " >&6; }
24416if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24417  $as_echo_n "(cached) " >&6
24418else
24419  if test -n "$ac_ct_NM"; then
24420  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24421else
24422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24423for as_dir in $PATH
24424do
24425  IFS=$as_save_IFS
24426  test -z "$as_dir" && as_dir=.
24427    for ac_exec_ext in '' $ac_executable_extensions; do
24428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24429    ac_cv_prog_ac_ct_NM="nm"
24430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24431    break 2
24432  fi
24433done
24434  done
24435IFS=$as_save_IFS
24436
24437fi
24438fi
24439ac_ct_NM=$ac_cv_prog_ac_ct_NM
24440if test -n "$ac_ct_NM"; then
24441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
24442$as_echo "$ac_ct_NM" >&6; }
24443else
24444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24445$as_echo "no" >&6; }
24446fi
24447
24448  if test "x$ac_ct_NM" = x; then
24449    NM=""
24450  else
24451    case $cross_compiling:$ac_tool_warned in
24452yes:)
24453{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24454$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24455ac_tool_warned=yes ;;
24456esac
24457    NM=$ac_ct_NM
24458  fi
24459else
24460  NM="$ac_cv_prog_NM"
24461fi
24462
24463
24464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24465
24466  # First separate the path from the arguments. This will split at the first
24467  # space.
24468  complete="$NM"
24469  path="${complete%% *}"
24470  tmp="$complete EOL"
24471  arguments="${tmp#* }"
24472
24473  # Input might be given as Windows format, start by converting to
24474  # unix format.
24475  new_path=`$CYGPATH -u "$path"`
24476
24477  # Now try to locate executable using which
24478  new_path=`$WHICH "$new_path" 2> /dev/null`
24479  if test "x$new_path" = x; then
24480    # Oops. Which didn't find the executable.
24481    # The splitting of arguments from the executable at a space might have been incorrect,
24482    # since paths with space are more likely in Windows. Give it another try with the whole
24483    # argument.
24484    path="$complete"
24485    arguments="EOL"
24486    new_path=`$CYGPATH -u "$path"`
24487    new_path=`$WHICH "$new_path" 2> /dev/null`
24488    if test "x$new_path" = x; then
24489      # It's still not found. Now this is an unrecoverable error.
24490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24491$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24492      has_space=`$ECHO "$complete" | $GREP " "`
24493      if test "x$has_space" != x; then
24494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24496      fi
24497      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24498    fi
24499  fi
24500
24501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24504  # "foo.exe" is OK but "foo" is an error.
24505  #
24506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24507  # It is also a way to make sure we got the proper file name for the real test later on.
24508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24509  if test "x$test_shortpath" = x; then
24510    # Short path failed, file does not exist as specified.
24511    # Try adding .exe or .cmd
24512    if test -f "${new_path}.exe"; then
24513       input_to_shortpath="${new_path}.exe"
24514    elif test -f "${new_path}.cmd"; then
24515       input_to_shortpath="${new_path}.cmd"
24516    else
24517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24518$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24521      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24522    fi
24523  else
24524    input_to_shortpath="$new_path"
24525  fi
24526
24527  # Call helper function which possibly converts this using DOS-style short mode.
24528  # If so, the updated path is stored in $new_path.
24529  new_path="$input_to_shortpath"
24530
24531  input_path="$input_to_shortpath"
24532  # Check if we need to convert this using DOS-style short mode. If the path
24533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24534  # take no chances and rewrite it.
24535  # Note: m4 eats our [], so we need to use [ and ] instead.
24536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24537  if test "x$has_forbidden_chars" != x; then
24538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24542      # Going to short mode and back again did indeed matter. Since short mode is
24543      # case insensitive, let's make it lowercase to improve readability.
24544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24545      # Now convert it back to Unix-stile (cygpath)
24546      input_path=`$CYGPATH -u "$shortmode_path"`
24547      new_path="$input_path"
24548    fi
24549  fi
24550
24551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24552  if test "x$test_cygdrive_prefix" = x; then
24553    # As a simple fix, exclude /usr/bin since it's not a real path.
24554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24556      # a path prefixed by /cygdrive for fixpath to work.
24557      new_path="$CYGWIN_ROOT_PATH$input_path"
24558    fi
24559  fi
24560
24561  # remove trailing .exe if any
24562  new_path="${new_path/%.exe/}"
24563
24564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24565
24566  # First separate the path from the arguments. This will split at the first
24567  # space.
24568  complete="$NM"
24569  path="${complete%% *}"
24570  tmp="$complete EOL"
24571  arguments="${tmp#* }"
24572
24573  # Input might be given as Windows format, start by converting to
24574  # unix format.
24575  new_path="$path"
24576
24577  windows_path="$new_path"
24578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24579    unix_path=`$CYGPATH -u "$windows_path"`
24580    new_path="$unix_path"
24581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24583    new_path="$unix_path"
24584  fi
24585
24586
24587  # Now try to locate executable using which
24588  new_path=`$WHICH "$new_path" 2> /dev/null`
24589
24590  if test "x$new_path" = x; then
24591    # Oops. Which didn't find the executable.
24592    # The splitting of arguments from the executable at a space might have been incorrect,
24593    # since paths with space are more likely in Windows. Give it another try with the whole
24594    # argument.
24595    path="$complete"
24596    arguments="EOL"
24597    new_path="$path"
24598
24599  windows_path="$new_path"
24600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24601    unix_path=`$CYGPATH -u "$windows_path"`
24602    new_path="$unix_path"
24603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24605    new_path="$unix_path"
24606  fi
24607
24608
24609    new_path=`$WHICH "$new_path" 2> /dev/null`
24610
24611    if test "x$new_path" = x; then
24612      # It's still not found. Now this is an unrecoverable error.
24613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24614$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24615      has_space=`$ECHO "$complete" | $GREP " "`
24616      if test "x$has_space" != x; then
24617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24619      fi
24620      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24621    fi
24622  fi
24623
24624  # Now new_path has a complete unix path to the binary
24625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24626    # Keep paths in /bin as-is, but remove trailing .exe if any
24627    new_path="${new_path/%.exe/}"
24628    # Do not save /bin paths to all_fixpath_prefixes!
24629  else
24630    # Not in mixed or Windows style, start by that.
24631    new_path=`cmd //c echo $new_path`
24632
24633  input_path="$new_path"
24634  # Check if we need to convert this using DOS-style short mode. If the path
24635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24636  # take no chances and rewrite it.
24637  # Note: m4 eats our [], so we need to use [ and ] instead.
24638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24639  if test "x$has_forbidden_chars" != x; then
24640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24642  fi
24643
24644    # Output is in $new_path
24645
24646  windows_path="$new_path"
24647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24648    unix_path=`$CYGPATH -u "$windows_path"`
24649    new_path="$unix_path"
24650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24652    new_path="$unix_path"
24653  fi
24654
24655    # remove trailing .exe if any
24656    new_path="${new_path/%.exe/}"
24657
24658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24660  fi
24661
24662  else
24663    # We're on a posix platform. Hooray! :)
24664    # First separate the path from the arguments. This will split at the first
24665    # space.
24666    complete="$NM"
24667    path="${complete%% *}"
24668    tmp="$complete EOL"
24669    arguments="${tmp#* }"
24670
24671    new_path=`$WHICH $path 2> /dev/null`
24672    if test "x$new_path" = x; then
24673      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24674      if test "x$is_absolute_path" != x; then
24675        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24676$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24677        new_path="$path"
24678      else
24679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24680$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24681        has_space=`$ECHO "$complete" | $GREP " "`
24682        if test "x$has_space" != x; then
24683          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24685        fi
24686        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24687      fi
24688    fi
24689  fi
24690
24691  # Now join together the path and the arguments once again
24692  if test "x$arguments" != xEOL; then
24693      new_complete="$new_path ${arguments% *}"
24694  else
24695      new_complete="$new_path"
24696  fi
24697
24698  if test "x$complete" != "x$new_complete"; then
24699    NM="$new_complete"
24700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24701$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24702  fi
24703
24704    if test -n "$ac_tool_prefix"; then
24705  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
24706set dummy ${ac_tool_prefix}strip; ac_word=$2
24707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24708$as_echo_n "checking for $ac_word... " >&6; }
24709if test "${ac_cv_prog_STRIP+set}" = set; then :
24710  $as_echo_n "(cached) " >&6
24711else
24712  if test -n "$STRIP"; then
24713  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
24714else
24715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24716for as_dir in $PATH
24717do
24718  IFS=$as_save_IFS
24719  test -z "$as_dir" && as_dir=.
24720    for ac_exec_ext in '' $ac_executable_extensions; do
24721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24722    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
24723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24724    break 2
24725  fi
24726done
24727  done
24728IFS=$as_save_IFS
24729
24730fi
24731fi
24732STRIP=$ac_cv_prog_STRIP
24733if test -n "$STRIP"; then
24734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24735$as_echo "$STRIP" >&6; }
24736else
24737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24738$as_echo "no" >&6; }
24739fi
24740
24741
24742fi
24743if test -z "$ac_cv_prog_STRIP"; then
24744  ac_ct_STRIP=$STRIP
24745  # Extract the first word of "strip", so it can be a program name with args.
24746set dummy strip; ac_word=$2
24747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24748$as_echo_n "checking for $ac_word... " >&6; }
24749if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
24750  $as_echo_n "(cached) " >&6
24751else
24752  if test -n "$ac_ct_STRIP"; then
24753  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
24754else
24755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24756for as_dir in $PATH
24757do
24758  IFS=$as_save_IFS
24759  test -z "$as_dir" && as_dir=.
24760    for ac_exec_ext in '' $ac_executable_extensions; do
24761  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24762    ac_cv_prog_ac_ct_STRIP="strip"
24763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24764    break 2
24765  fi
24766done
24767  done
24768IFS=$as_save_IFS
24769
24770fi
24771fi
24772ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
24773if test -n "$ac_ct_STRIP"; then
24774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
24775$as_echo "$ac_ct_STRIP" >&6; }
24776else
24777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24778$as_echo "no" >&6; }
24779fi
24780
24781  if test "x$ac_ct_STRIP" = x; then
24782    STRIP=""
24783  else
24784    case $cross_compiling:$ac_tool_warned in
24785yes:)
24786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24788ac_tool_warned=yes ;;
24789esac
24790    STRIP=$ac_ct_STRIP
24791  fi
24792else
24793  STRIP="$ac_cv_prog_STRIP"
24794fi
24795
24796
24797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24798
24799  # First separate the path from the arguments. This will split at the first
24800  # space.
24801  complete="$STRIP"
24802  path="${complete%% *}"
24803  tmp="$complete EOL"
24804  arguments="${tmp#* }"
24805
24806  # Input might be given as Windows format, start by converting to
24807  # unix format.
24808  new_path=`$CYGPATH -u "$path"`
24809
24810  # Now try to locate executable using which
24811  new_path=`$WHICH "$new_path" 2> /dev/null`
24812  if test "x$new_path" = x; then
24813    # Oops. Which didn't find the executable.
24814    # The splitting of arguments from the executable at a space might have been incorrect,
24815    # since paths with space are more likely in Windows. Give it another try with the whole
24816    # argument.
24817    path="$complete"
24818    arguments="EOL"
24819    new_path=`$CYGPATH -u "$path"`
24820    new_path=`$WHICH "$new_path" 2> /dev/null`
24821    if test "x$new_path" = x; then
24822      # It's still not found. Now this is an unrecoverable error.
24823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24824$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24825      has_space=`$ECHO "$complete" | $GREP " "`
24826      if test "x$has_space" != x; then
24827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24829      fi
24830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24831    fi
24832  fi
24833
24834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24837  # "foo.exe" is OK but "foo" is an error.
24838  #
24839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24840  # It is also a way to make sure we got the proper file name for the real test later on.
24841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24842  if test "x$test_shortpath" = x; then
24843    # Short path failed, file does not exist as specified.
24844    # Try adding .exe or .cmd
24845    if test -f "${new_path}.exe"; then
24846       input_to_shortpath="${new_path}.exe"
24847    elif test -f "${new_path}.cmd"; then
24848       input_to_shortpath="${new_path}.cmd"
24849    else
24850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24851$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24854      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24855    fi
24856  else
24857    input_to_shortpath="$new_path"
24858  fi
24859
24860  # Call helper function which possibly converts this using DOS-style short mode.
24861  # If so, the updated path is stored in $new_path.
24862  new_path="$input_to_shortpath"
24863
24864  input_path="$input_to_shortpath"
24865  # Check if we need to convert this using DOS-style short mode. If the path
24866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24867  # take no chances and rewrite it.
24868  # Note: m4 eats our [], so we need to use [ and ] instead.
24869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24870  if test "x$has_forbidden_chars" != x; then
24871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24875      # Going to short mode and back again did indeed matter. Since short mode is
24876      # case insensitive, let's make it lowercase to improve readability.
24877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24878      # Now convert it back to Unix-stile (cygpath)
24879      input_path=`$CYGPATH -u "$shortmode_path"`
24880      new_path="$input_path"
24881    fi
24882  fi
24883
24884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24885  if test "x$test_cygdrive_prefix" = x; then
24886    # As a simple fix, exclude /usr/bin since it's not a real path.
24887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24889      # a path prefixed by /cygdrive for fixpath to work.
24890      new_path="$CYGWIN_ROOT_PATH$input_path"
24891    fi
24892  fi
24893
24894  # remove trailing .exe if any
24895  new_path="${new_path/%.exe/}"
24896
24897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24898
24899  # First separate the path from the arguments. This will split at the first
24900  # space.
24901  complete="$STRIP"
24902  path="${complete%% *}"
24903  tmp="$complete EOL"
24904  arguments="${tmp#* }"
24905
24906  # Input might be given as Windows format, start by converting to
24907  # unix format.
24908  new_path="$path"
24909
24910  windows_path="$new_path"
24911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912    unix_path=`$CYGPATH -u "$windows_path"`
24913    new_path="$unix_path"
24914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24916    new_path="$unix_path"
24917  fi
24918
24919
24920  # Now try to locate executable using which
24921  new_path=`$WHICH "$new_path" 2> /dev/null`
24922
24923  if test "x$new_path" = x; then
24924    # Oops. Which didn't find the executable.
24925    # The splitting of arguments from the executable at a space might have been incorrect,
24926    # since paths with space are more likely in Windows. Give it another try with the whole
24927    # argument.
24928    path="$complete"
24929    arguments="EOL"
24930    new_path="$path"
24931
24932  windows_path="$new_path"
24933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24934    unix_path=`$CYGPATH -u "$windows_path"`
24935    new_path="$unix_path"
24936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24938    new_path="$unix_path"
24939  fi
24940
24941
24942    new_path=`$WHICH "$new_path" 2> /dev/null`
24943
24944    if test "x$new_path" = x; then
24945      # It's still not found. Now this is an unrecoverable error.
24946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24947$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24948      has_space=`$ECHO "$complete" | $GREP " "`
24949      if test "x$has_space" != x; then
24950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24952      fi
24953      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24954    fi
24955  fi
24956
24957  # Now new_path has a complete unix path to the binary
24958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24959    # Keep paths in /bin as-is, but remove trailing .exe if any
24960    new_path="${new_path/%.exe/}"
24961    # Do not save /bin paths to all_fixpath_prefixes!
24962  else
24963    # Not in mixed or Windows style, start by that.
24964    new_path=`cmd //c echo $new_path`
24965
24966  input_path="$new_path"
24967  # Check if we need to convert this using DOS-style short mode. If the path
24968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24969  # take no chances and rewrite it.
24970  # Note: m4 eats our [], so we need to use [ and ] instead.
24971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24972  if test "x$has_forbidden_chars" != x; then
24973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24975  fi
24976
24977    # Output is in $new_path
24978
24979  windows_path="$new_path"
24980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24981    unix_path=`$CYGPATH -u "$windows_path"`
24982    new_path="$unix_path"
24983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24985    new_path="$unix_path"
24986  fi
24987
24988    # remove trailing .exe if any
24989    new_path="${new_path/%.exe/}"
24990
24991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24993  fi
24994
24995  else
24996    # We're on a posix platform. Hooray! :)
24997    # First separate the path from the arguments. This will split at the first
24998    # space.
24999    complete="$STRIP"
25000    path="${complete%% *}"
25001    tmp="$complete EOL"
25002    arguments="${tmp#* }"
25003
25004    new_path=`$WHICH $path 2> /dev/null`
25005    if test "x$new_path" = x; then
25006      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25007      if test "x$is_absolute_path" != x; then
25008        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25009$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25010        new_path="$path"
25011      else
25012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25013$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25014        has_space=`$ECHO "$complete" | $GREP " "`
25015        if test "x$has_space" != x; then
25016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25018        fi
25019        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25020      fi
25021    fi
25022  fi
25023
25024  # Now join together the path and the arguments once again
25025  if test "x$arguments" != xEOL; then
25026      new_complete="$new_path ${arguments% *}"
25027  else
25028      new_complete="$new_path"
25029  fi
25030
25031  if test "x$complete" != "x$new_complete"; then
25032    STRIP="$new_complete"
25033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25034$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25035  fi
25036
25037fi
25038
25039# objcopy is used for moving debug symbols to separate files when
25040# full debug symbols are enabled.
25041if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25042    if test -n "$ac_tool_prefix"; then
25043  for ac_prog in gobjcopy objcopy
25044  do
25045    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25048$as_echo_n "checking for $ac_word... " >&6; }
25049if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25050  $as_echo_n "(cached) " >&6
25051else
25052  if test -n "$OBJCOPY"; then
25053  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25054else
25055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25056for as_dir in $PATH
25057do
25058  IFS=$as_save_IFS
25059  test -z "$as_dir" && as_dir=.
25060    for ac_exec_ext in '' $ac_executable_extensions; do
25061  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25062    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25064    break 2
25065  fi
25066done
25067  done
25068IFS=$as_save_IFS
25069
25070fi
25071fi
25072OBJCOPY=$ac_cv_prog_OBJCOPY
25073if test -n "$OBJCOPY"; then
25074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25075$as_echo "$OBJCOPY" >&6; }
25076else
25077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25078$as_echo "no" >&6; }
25079fi
25080
25081
25082    test -n "$OBJCOPY" && break
25083  done
25084fi
25085if test -z "$OBJCOPY"; then
25086  ac_ct_OBJCOPY=$OBJCOPY
25087  for ac_prog in gobjcopy objcopy
25088do
25089  # Extract the first word of "$ac_prog", so it can be a program name with args.
25090set dummy $ac_prog; ac_word=$2
25091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25092$as_echo_n "checking for $ac_word... " >&6; }
25093if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25094  $as_echo_n "(cached) " >&6
25095else
25096  if test -n "$ac_ct_OBJCOPY"; then
25097  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25098else
25099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25100for as_dir in $PATH
25101do
25102  IFS=$as_save_IFS
25103  test -z "$as_dir" && as_dir=.
25104    for ac_exec_ext in '' $ac_executable_extensions; do
25105  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25106    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25108    break 2
25109  fi
25110done
25111  done
25112IFS=$as_save_IFS
25113
25114fi
25115fi
25116ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25117if test -n "$ac_ct_OBJCOPY"; then
25118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25119$as_echo "$ac_ct_OBJCOPY" >&6; }
25120else
25121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25122$as_echo "no" >&6; }
25123fi
25124
25125
25126  test -n "$ac_ct_OBJCOPY" && break
25127done
25128
25129  if test "x$ac_ct_OBJCOPY" = x; then
25130    OBJCOPY=""
25131  else
25132    case $cross_compiling:$ac_tool_warned in
25133yes:)
25134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25136ac_tool_warned=yes ;;
25137esac
25138    OBJCOPY=$ac_ct_OBJCOPY
25139  fi
25140fi
25141
25142
25143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25144
25145  # First separate the path from the arguments. This will split at the first
25146  # space.
25147  complete="$OBJCOPY"
25148  path="${complete%% *}"
25149  tmp="$complete EOL"
25150  arguments="${tmp#* }"
25151
25152  # Input might be given as Windows format, start by converting to
25153  # unix format.
25154  new_path=`$CYGPATH -u "$path"`
25155
25156  # Now try to locate executable using which
25157  new_path=`$WHICH "$new_path" 2> /dev/null`
25158  if test "x$new_path" = x; then
25159    # Oops. Which didn't find the executable.
25160    # The splitting of arguments from the executable at a space might have been incorrect,
25161    # since paths with space are more likely in Windows. Give it another try with the whole
25162    # argument.
25163    path="$complete"
25164    arguments="EOL"
25165    new_path=`$CYGPATH -u "$path"`
25166    new_path=`$WHICH "$new_path" 2> /dev/null`
25167    if test "x$new_path" = x; then
25168      # It's still not found. Now this is an unrecoverable error.
25169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25170$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25171      has_space=`$ECHO "$complete" | $GREP " "`
25172      if test "x$has_space" != x; then
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25175      fi
25176      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25177    fi
25178  fi
25179
25180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25183  # "foo.exe" is OK but "foo" is an error.
25184  #
25185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25186  # It is also a way to make sure we got the proper file name for the real test later on.
25187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25188  if test "x$test_shortpath" = x; then
25189    # Short path failed, file does not exist as specified.
25190    # Try adding .exe or .cmd
25191    if test -f "${new_path}.exe"; then
25192       input_to_shortpath="${new_path}.exe"
25193    elif test -f "${new_path}.cmd"; then
25194       input_to_shortpath="${new_path}.cmd"
25195    else
25196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25197$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25200      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25201    fi
25202  else
25203    input_to_shortpath="$new_path"
25204  fi
25205
25206  # Call helper function which possibly converts this using DOS-style short mode.
25207  # If so, the updated path is stored in $new_path.
25208  new_path="$input_to_shortpath"
25209
25210  input_path="$input_to_shortpath"
25211  # Check if we need to convert this using DOS-style short mode. If the path
25212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25213  # take no chances and rewrite it.
25214  # Note: m4 eats our [], so we need to use [ and ] instead.
25215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25216  if test "x$has_forbidden_chars" != x; then
25217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25221      # Going to short mode and back again did indeed matter. Since short mode is
25222      # case insensitive, let's make it lowercase to improve readability.
25223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25224      # Now convert it back to Unix-stile (cygpath)
25225      input_path=`$CYGPATH -u "$shortmode_path"`
25226      new_path="$input_path"
25227    fi
25228  fi
25229
25230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25231  if test "x$test_cygdrive_prefix" = x; then
25232    # As a simple fix, exclude /usr/bin since it's not a real path.
25233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25235      # a path prefixed by /cygdrive for fixpath to work.
25236      new_path="$CYGWIN_ROOT_PATH$input_path"
25237    fi
25238  fi
25239
25240  # remove trailing .exe if any
25241  new_path="${new_path/%.exe/}"
25242
25243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25244
25245  # First separate the path from the arguments. This will split at the first
25246  # space.
25247  complete="$OBJCOPY"
25248  path="${complete%% *}"
25249  tmp="$complete EOL"
25250  arguments="${tmp#* }"
25251
25252  # Input might be given as Windows format, start by converting to
25253  # unix format.
25254  new_path="$path"
25255
25256  windows_path="$new_path"
25257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25258    unix_path=`$CYGPATH -u "$windows_path"`
25259    new_path="$unix_path"
25260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25262    new_path="$unix_path"
25263  fi
25264
25265
25266  # Now try to locate executable using which
25267  new_path=`$WHICH "$new_path" 2> /dev/null`
25268
25269  if test "x$new_path" = x; then
25270    # Oops. Which didn't find the executable.
25271    # The splitting of arguments from the executable at a space might have been incorrect,
25272    # since paths with space are more likely in Windows. Give it another try with the whole
25273    # argument.
25274    path="$complete"
25275    arguments="EOL"
25276    new_path="$path"
25277
25278  windows_path="$new_path"
25279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25280    unix_path=`$CYGPATH -u "$windows_path"`
25281    new_path="$unix_path"
25282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25284    new_path="$unix_path"
25285  fi
25286
25287
25288    new_path=`$WHICH "$new_path" 2> /dev/null`
25289
25290    if test "x$new_path" = x; then
25291      # It's still not found. Now this is an unrecoverable error.
25292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25293$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25294      has_space=`$ECHO "$complete" | $GREP " "`
25295      if test "x$has_space" != x; then
25296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25298      fi
25299      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25300    fi
25301  fi
25302
25303  # Now new_path has a complete unix path to the binary
25304  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25305    # Keep paths in /bin as-is, but remove trailing .exe if any
25306    new_path="${new_path/%.exe/}"
25307    # Do not save /bin paths to all_fixpath_prefixes!
25308  else
25309    # Not in mixed or Windows style, start by that.
25310    new_path=`cmd //c echo $new_path`
25311
25312  input_path="$new_path"
25313  # Check if we need to convert this using DOS-style short mode. If the path
25314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25315  # take no chances and rewrite it.
25316  # Note: m4 eats our [], so we need to use [ and ] instead.
25317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25318  if test "x$has_forbidden_chars" != x; then
25319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25321  fi
25322
25323    # Output is in $new_path
25324
25325  windows_path="$new_path"
25326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25327    unix_path=`$CYGPATH -u "$windows_path"`
25328    new_path="$unix_path"
25329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25331    new_path="$unix_path"
25332  fi
25333
25334    # remove trailing .exe if any
25335    new_path="${new_path/%.exe/}"
25336
25337    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25338    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25339  fi
25340
25341  else
25342    # We're on a posix platform. Hooray! :)
25343    # First separate the path from the arguments. This will split at the first
25344    # space.
25345    complete="$OBJCOPY"
25346    path="${complete%% *}"
25347    tmp="$complete EOL"
25348    arguments="${tmp#* }"
25349
25350    new_path=`$WHICH $path 2> /dev/null`
25351    if test "x$new_path" = x; then
25352      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25353      if test "x$is_absolute_path" != x; then
25354        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25355$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25356        new_path="$path"
25357      else
25358        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25359$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25360        has_space=`$ECHO "$complete" | $GREP " "`
25361        if test "x$has_space" != x; then
25362          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25363$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25364        fi
25365        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25366      fi
25367    fi
25368  fi
25369
25370  # Now join together the path and the arguments once again
25371  if test "x$arguments" != xEOL; then
25372      new_complete="$new_path ${arguments% *}"
25373  else
25374      new_complete="$new_path"
25375  fi
25376
25377  if test "x$complete" != "x$new_complete"; then
25378    OBJCOPY="$new_complete"
25379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25380$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25381  fi
25382
25383fi
25384
25385if test -n "$ac_tool_prefix"; then
25386  for ac_prog in gobjdump objdump
25387  do
25388    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25389set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25391$as_echo_n "checking for $ac_word... " >&6; }
25392if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25393  $as_echo_n "(cached) " >&6
25394else
25395  if test -n "$OBJDUMP"; then
25396  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
25397else
25398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25399for as_dir in $PATH
25400do
25401  IFS=$as_save_IFS
25402  test -z "$as_dir" && as_dir=.
25403    for ac_exec_ext in '' $ac_executable_extensions; do
25404  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25405    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
25406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25407    break 2
25408  fi
25409done
25410  done
25411IFS=$as_save_IFS
25412
25413fi
25414fi
25415OBJDUMP=$ac_cv_prog_OBJDUMP
25416if test -n "$OBJDUMP"; then
25417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
25418$as_echo "$OBJDUMP" >&6; }
25419else
25420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25421$as_echo "no" >&6; }
25422fi
25423
25424
25425    test -n "$OBJDUMP" && break
25426  done
25427fi
25428if test -z "$OBJDUMP"; then
25429  ac_ct_OBJDUMP=$OBJDUMP
25430  for ac_prog in gobjdump objdump
25431do
25432  # Extract the first word of "$ac_prog", so it can be a program name with args.
25433set dummy $ac_prog; ac_word=$2
25434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25435$as_echo_n "checking for $ac_word... " >&6; }
25436if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
25437  $as_echo_n "(cached) " >&6
25438else
25439  if test -n "$ac_ct_OBJDUMP"; then
25440  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
25441else
25442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25443for as_dir in $PATH
25444do
25445  IFS=$as_save_IFS
25446  test -z "$as_dir" && as_dir=.
25447    for ac_exec_ext in '' $ac_executable_extensions; do
25448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25449    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
25450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25451    break 2
25452  fi
25453done
25454  done
25455IFS=$as_save_IFS
25456
25457fi
25458fi
25459ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
25460if test -n "$ac_ct_OBJDUMP"; then
25461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
25462$as_echo "$ac_ct_OBJDUMP" >&6; }
25463else
25464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25465$as_echo "no" >&6; }
25466fi
25467
25468
25469  test -n "$ac_ct_OBJDUMP" && break
25470done
25471
25472  if test "x$ac_ct_OBJDUMP" = x; then
25473    OBJDUMP=""
25474  else
25475    case $cross_compiling:$ac_tool_warned in
25476yes:)
25477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25479ac_tool_warned=yes ;;
25480esac
25481    OBJDUMP=$ac_ct_OBJDUMP
25482  fi
25483fi
25484
25485if test "x$OBJDUMP" != x; then
25486  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
25487
25488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25489
25490  # First separate the path from the arguments. This will split at the first
25491  # space.
25492  complete="$OBJDUMP"
25493  path="${complete%% *}"
25494  tmp="$complete EOL"
25495  arguments="${tmp#* }"
25496
25497  # Input might be given as Windows format, start by converting to
25498  # unix format.
25499  new_path=`$CYGPATH -u "$path"`
25500
25501  # Now try to locate executable using which
25502  new_path=`$WHICH "$new_path" 2> /dev/null`
25503  if test "x$new_path" = x; then
25504    # Oops. Which didn't find the executable.
25505    # The splitting of arguments from the executable at a space might have been incorrect,
25506    # since paths with space are more likely in Windows. Give it another try with the whole
25507    # argument.
25508    path="$complete"
25509    arguments="EOL"
25510    new_path=`$CYGPATH -u "$path"`
25511    new_path=`$WHICH "$new_path" 2> /dev/null`
25512    if test "x$new_path" = x; then
25513      # It's still not found. Now this is an unrecoverable error.
25514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25515$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
25516      has_space=`$ECHO "$complete" | $GREP " "`
25517      if test "x$has_space" != x; then
25518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25520      fi
25521      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25522    fi
25523  fi
25524
25525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25528  # "foo.exe" is OK but "foo" is an error.
25529  #
25530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25531  # It is also a way to make sure we got the proper file name for the real test later on.
25532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25533  if test "x$test_shortpath" = x; then
25534    # Short path failed, file does not exist as specified.
25535    # Try adding .exe or .cmd
25536    if test -f "${new_path}.exe"; then
25537       input_to_shortpath="${new_path}.exe"
25538    elif test -f "${new_path}.cmd"; then
25539       input_to_shortpath="${new_path}.cmd"
25540    else
25541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
25542$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
25543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25545      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25546    fi
25547  else
25548    input_to_shortpath="$new_path"
25549  fi
25550
25551  # Call helper function which possibly converts this using DOS-style short mode.
25552  # If so, the updated path is stored in $new_path.
25553  new_path="$input_to_shortpath"
25554
25555  input_path="$input_to_shortpath"
25556  # Check if we need to convert this using DOS-style short mode. If the path
25557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25558  # take no chances and rewrite it.
25559  # Note: m4 eats our [], so we need to use [ and ] instead.
25560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25561  if test "x$has_forbidden_chars" != x; then
25562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25566      # Going to short mode and back again did indeed matter. Since short mode is
25567      # case insensitive, let's make it lowercase to improve readability.
25568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25569      # Now convert it back to Unix-stile (cygpath)
25570      input_path=`$CYGPATH -u "$shortmode_path"`
25571      new_path="$input_path"
25572    fi
25573  fi
25574
25575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25576  if test "x$test_cygdrive_prefix" = x; then
25577    # As a simple fix, exclude /usr/bin since it's not a real path.
25578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25580      # a path prefixed by /cygdrive for fixpath to work.
25581      new_path="$CYGWIN_ROOT_PATH$input_path"
25582    fi
25583  fi
25584
25585  # remove trailing .exe if any
25586  new_path="${new_path/%.exe/}"
25587
25588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25589
25590  # First separate the path from the arguments. This will split at the first
25591  # space.
25592  complete="$OBJDUMP"
25593  path="${complete%% *}"
25594  tmp="$complete EOL"
25595  arguments="${tmp#* }"
25596
25597  # Input might be given as Windows format, start by converting to
25598  # unix format.
25599  new_path="$path"
25600
25601  windows_path="$new_path"
25602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25603    unix_path=`$CYGPATH -u "$windows_path"`
25604    new_path="$unix_path"
25605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25607    new_path="$unix_path"
25608  fi
25609
25610
25611  # Now try to locate executable using which
25612  new_path=`$WHICH "$new_path" 2> /dev/null`
25613
25614  if test "x$new_path" = x; then
25615    # Oops. Which didn't find the executable.
25616    # The splitting of arguments from the executable at a space might have been incorrect,
25617    # since paths with space are more likely in Windows. Give it another try with the whole
25618    # argument.
25619    path="$complete"
25620    arguments="EOL"
25621    new_path="$path"
25622
25623  windows_path="$new_path"
25624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25625    unix_path=`$CYGPATH -u "$windows_path"`
25626    new_path="$unix_path"
25627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25629    new_path="$unix_path"
25630  fi
25631
25632
25633    new_path=`$WHICH "$new_path" 2> /dev/null`
25634
25635    if test "x$new_path" = x; then
25636      # It's still not found. Now this is an unrecoverable error.
25637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25638$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
25639      has_space=`$ECHO "$complete" | $GREP " "`
25640      if test "x$has_space" != x; then
25641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25643      fi
25644      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25645    fi
25646  fi
25647
25648  # Now new_path has a complete unix path to the binary
25649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25650    # Keep paths in /bin as-is, but remove trailing .exe if any
25651    new_path="${new_path/%.exe/}"
25652    # Do not save /bin paths to all_fixpath_prefixes!
25653  else
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $new_path`
25656
25657  input_path="$new_path"
25658  # Check if we need to convert this using DOS-style short mode. If the path
25659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25660  # take no chances and rewrite it.
25661  # Note: m4 eats our [], so we need to use [ and ] instead.
25662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25663  if test "x$has_forbidden_chars" != x; then
25664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25666  fi
25667
25668    # Output is in $new_path
25669
25670  windows_path="$new_path"
25671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25672    unix_path=`$CYGPATH -u "$windows_path"`
25673    new_path="$unix_path"
25674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25676    new_path="$unix_path"
25677  fi
25678
25679    # remove trailing .exe if any
25680    new_path="${new_path/%.exe/}"
25681
25682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25684  fi
25685
25686  else
25687    # We're on a posix platform. Hooray! :)
25688    # First separate the path from the arguments. This will split at the first
25689    # space.
25690    complete="$OBJDUMP"
25691    path="${complete%% *}"
25692    tmp="$complete EOL"
25693    arguments="${tmp#* }"
25694
25695    new_path=`$WHICH $path 2> /dev/null`
25696    if test "x$new_path" = x; then
25697      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25698      if test "x$is_absolute_path" != x; then
25699        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
25700$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
25701        new_path="$path"
25702      else
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25704$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
25705        has_space=`$ECHO "$complete" | $GREP " "`
25706        if test "x$has_space" != x; then
25707          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25709        fi
25710        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25711      fi
25712    fi
25713  fi
25714
25715  # Now join together the path and the arguments once again
25716  if test "x$arguments" != xEOL; then
25717      new_complete="$new_path ${arguments% *}"
25718  else
25719      new_complete="$new_path"
25720  fi
25721
25722  if test "x$complete" != "x$new_complete"; then
25723    OBJDUMP="$new_complete"
25724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
25725$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
25726  fi
25727
25728fi
25729
25730if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
25731   # Extract the first word of "lipo", so it can be a program name with args.
25732set dummy lipo; ac_word=$2
25733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25734$as_echo_n "checking for $ac_word... " >&6; }
25735if test "${ac_cv_path_LIPO+set}" = set; then :
25736  $as_echo_n "(cached) " >&6
25737else
25738  case $LIPO in
25739  [\\/]* | ?:[\\/]*)
25740  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
25741  ;;
25742  *)
25743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25744for as_dir in $PATH
25745do
25746  IFS=$as_save_IFS
25747  test -z "$as_dir" && as_dir=.
25748    for ac_exec_ext in '' $ac_executable_extensions; do
25749  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25750    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
25751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25752    break 2
25753  fi
25754done
25755  done
25756IFS=$as_save_IFS
25757
25758  ;;
25759esac
25760fi
25761LIPO=$ac_cv_path_LIPO
25762if test -n "$LIPO"; then
25763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
25764$as_echo "$LIPO" >&6; }
25765else
25766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25767$as_echo "no" >&6; }
25768fi
25769
25770
25771
25772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25773
25774  # First separate the path from the arguments. This will split at the first
25775  # space.
25776  complete="$LIPO"
25777  path="${complete%% *}"
25778  tmp="$complete EOL"
25779  arguments="${tmp#* }"
25780
25781  # Input might be given as Windows format, start by converting to
25782  # unix format.
25783  new_path=`$CYGPATH -u "$path"`
25784
25785  # Now try to locate executable using which
25786  new_path=`$WHICH "$new_path" 2> /dev/null`
25787  if test "x$new_path" = x; then
25788    # Oops. Which didn't find the executable.
25789    # The splitting of arguments from the executable at a space might have been incorrect,
25790    # since paths with space are more likely in Windows. Give it another try with the whole
25791    # argument.
25792    path="$complete"
25793    arguments="EOL"
25794    new_path=`$CYGPATH -u "$path"`
25795    new_path=`$WHICH "$new_path" 2> /dev/null`
25796    if test "x$new_path" = x; then
25797      # It's still not found. Now this is an unrecoverable error.
25798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
25799$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
25800      has_space=`$ECHO "$complete" | $GREP " "`
25801      if test "x$has_space" != x; then
25802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25804      fi
25805      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25806    fi
25807  fi
25808
25809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25812  # "foo.exe" is OK but "foo" is an error.
25813  #
25814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25815  # It is also a way to make sure we got the proper file name for the real test later on.
25816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25817  if test "x$test_shortpath" = x; then
25818    # Short path failed, file does not exist as specified.
25819    # Try adding .exe or .cmd
25820    if test -f "${new_path}.exe"; then
25821       input_to_shortpath="${new_path}.exe"
25822    elif test -f "${new_path}.cmd"; then
25823       input_to_shortpath="${new_path}.cmd"
25824    else
25825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
25826$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
25827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25829      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25830    fi
25831  else
25832    input_to_shortpath="$new_path"
25833  fi
25834
25835  # Call helper function which possibly converts this using DOS-style short mode.
25836  # If so, the updated path is stored in $new_path.
25837  new_path="$input_to_shortpath"
25838
25839  input_path="$input_to_shortpath"
25840  # Check if we need to convert this using DOS-style short mode. If the path
25841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25842  # take no chances and rewrite it.
25843  # Note: m4 eats our [], so we need to use [ and ] instead.
25844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25845  if test "x$has_forbidden_chars" != x; then
25846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25850      # Going to short mode and back again did indeed matter. Since short mode is
25851      # case insensitive, let's make it lowercase to improve readability.
25852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25853      # Now convert it back to Unix-stile (cygpath)
25854      input_path=`$CYGPATH -u "$shortmode_path"`
25855      new_path="$input_path"
25856    fi
25857  fi
25858
25859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25860  if test "x$test_cygdrive_prefix" = x; then
25861    # As a simple fix, exclude /usr/bin since it's not a real path.
25862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25864      # a path prefixed by /cygdrive for fixpath to work.
25865      new_path="$CYGWIN_ROOT_PATH$input_path"
25866    fi
25867  fi
25868
25869  # remove trailing .exe if any
25870  new_path="${new_path/%.exe/}"
25871
25872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25873
25874  # First separate the path from the arguments. This will split at the first
25875  # space.
25876  complete="$LIPO"
25877  path="${complete%% *}"
25878  tmp="$complete EOL"
25879  arguments="${tmp#* }"
25880
25881  # Input might be given as Windows format, start by converting to
25882  # unix format.
25883  new_path="$path"
25884
25885  windows_path="$new_path"
25886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25887    unix_path=`$CYGPATH -u "$windows_path"`
25888    new_path="$unix_path"
25889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25891    new_path="$unix_path"
25892  fi
25893
25894
25895  # Now try to locate executable using which
25896  new_path=`$WHICH "$new_path" 2> /dev/null`
25897
25898  if test "x$new_path" = x; then
25899    # Oops. Which didn't find the executable.
25900    # The splitting of arguments from the executable at a space might have been incorrect,
25901    # since paths with space are more likely in Windows. Give it another try with the whole
25902    # argument.
25903    path="$complete"
25904    arguments="EOL"
25905    new_path="$path"
25906
25907  windows_path="$new_path"
25908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25909    unix_path=`$CYGPATH -u "$windows_path"`
25910    new_path="$unix_path"
25911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25913    new_path="$unix_path"
25914  fi
25915
25916
25917    new_path=`$WHICH "$new_path" 2> /dev/null`
25918
25919    if test "x$new_path" = x; then
25920      # It's still not found. Now this is an unrecoverable error.
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
25922$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
25923      has_space=`$ECHO "$complete" | $GREP " "`
25924      if test "x$has_space" != x; then
25925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25927      fi
25928      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25929    fi
25930  fi
25931
25932  # Now new_path has a complete unix path to the binary
25933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25934    # Keep paths in /bin as-is, but remove trailing .exe if any
25935    new_path="${new_path/%.exe/}"
25936    # Do not save /bin paths to all_fixpath_prefixes!
25937  else
25938    # Not in mixed or Windows style, start by that.
25939    new_path=`cmd //c echo $new_path`
25940
25941  input_path="$new_path"
25942  # Check if we need to convert this using DOS-style short mode. If the path
25943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25944  # take no chances and rewrite it.
25945  # Note: m4 eats our [], so we need to use [ and ] instead.
25946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25947  if test "x$has_forbidden_chars" != x; then
25948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25950  fi
25951
25952    # Output is in $new_path
25953
25954  windows_path="$new_path"
25955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25956    unix_path=`$CYGPATH -u "$windows_path"`
25957    new_path="$unix_path"
25958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25960    new_path="$unix_path"
25961  fi
25962
25963    # remove trailing .exe if any
25964    new_path="${new_path/%.exe/}"
25965
25966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25968  fi
25969
25970  else
25971    # We're on a posix platform. Hooray! :)
25972    # First separate the path from the arguments. This will split at the first
25973    # space.
25974    complete="$LIPO"
25975    path="${complete%% *}"
25976    tmp="$complete EOL"
25977    arguments="${tmp#* }"
25978
25979    new_path=`$WHICH $path 2> /dev/null`
25980    if test "x$new_path" = x; then
25981      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25982      if test "x$is_absolute_path" != x; then
25983        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
25984$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
25985        new_path="$path"
25986      else
25987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
25988$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
25989        has_space=`$ECHO "$complete" | $GREP " "`
25990        if test "x$has_space" != x; then
25991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25993        fi
25994        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25995      fi
25996    fi
25997  fi
25998
25999  # Now join together the path and the arguments once again
26000  if test "x$arguments" != xEOL; then
26001      new_complete="$new_path ${arguments% *}"
26002  else
26003      new_complete="$new_path"
26004  fi
26005
26006  if test "x$complete" != "x$new_complete"; then
26007    LIPO="$new_complete"
26008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26009$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26010  fi
26011
26012fi
26013
26014# Restore old path without tools dir
26015PATH="$OLD_PATH"
26016
26017
26018# FIXME: Currently we must test this after paths but before flags. Fix!
26019
26020# And we can test some aspects on the target using configure macros.
26021
26022
26023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26024$as_echo_n "checking for ANSI C header files... " >&6; }
26025if test "${ac_cv_header_stdc+set}" = set; then :
26026  $as_echo_n "(cached) " >&6
26027else
26028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26029/* end confdefs.h.  */
26030#include <stdlib.h>
26031#include <stdarg.h>
26032#include <string.h>
26033#include <float.h>
26034
26035int
26036main ()
26037{
26038
26039  ;
26040  return 0;
26041}
26042_ACEOF
26043if ac_fn_cxx_try_compile "$LINENO"; then :
26044  ac_cv_header_stdc=yes
26045else
26046  ac_cv_header_stdc=no
26047fi
26048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26049
26050if test $ac_cv_header_stdc = yes; then
26051  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26053/* end confdefs.h.  */
26054#include <string.h>
26055
26056_ACEOF
26057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26058  $EGREP "memchr" >/dev/null 2>&1; then :
26059
26060else
26061  ac_cv_header_stdc=no
26062fi
26063rm -f conftest*
26064
26065fi
26066
26067if test $ac_cv_header_stdc = yes; then
26068  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26070/* end confdefs.h.  */
26071#include <stdlib.h>
26072
26073_ACEOF
26074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26075  $EGREP "free" >/dev/null 2>&1; then :
26076
26077else
26078  ac_cv_header_stdc=no
26079fi
26080rm -f conftest*
26081
26082fi
26083
26084if test $ac_cv_header_stdc = yes; then
26085  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26086  if test "$cross_compiling" = yes; then :
26087  :
26088else
26089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26090/* end confdefs.h.  */
26091#include <ctype.h>
26092#include <stdlib.h>
26093#if ((' ' & 0x0FF) == 0x020)
26094# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26095# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26096#else
26097# define ISLOWER(c) \
26098		   (('a' <= (c) && (c) <= 'i') \
26099		     || ('j' <= (c) && (c) <= 'r') \
26100		     || ('s' <= (c) && (c) <= 'z'))
26101# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26102#endif
26103
26104#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26105int
26106main ()
26107{
26108  int i;
26109  for (i = 0; i < 256; i++)
26110    if (XOR (islower (i), ISLOWER (i))
26111	|| toupper (i) != TOUPPER (i))
26112      return 2;
26113  return 0;
26114}
26115_ACEOF
26116if ac_fn_cxx_try_run "$LINENO"; then :
26117
26118else
26119  ac_cv_header_stdc=no
26120fi
26121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26122  conftest.$ac_objext conftest.beam conftest.$ac_ext
26123fi
26124
26125fi
26126fi
26127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26128$as_echo "$ac_cv_header_stdc" >&6; }
26129if test $ac_cv_header_stdc = yes; then
26130
26131$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26132
26133fi
26134
26135# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26136for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26137		  inttypes.h stdint.h unistd.h
26138do :
26139  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26140ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26141"
26142if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26143  cat >>confdefs.h <<_ACEOF
26144#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26145_ACEOF
26146
26147fi
26148
26149done
26150
26151
26152
26153###############################################################################
26154#
26155# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26156# (The JVM can use 32 or 64 bit Java pointers but that decision
26157# is made at runtime.)
26158#
26159if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26160  # Always specify -m flags on Solaris
26161
26162  # keep track of c/cxx flags that we added outselves...
26163  #   to prevent emitting warning...
26164  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26165  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26166  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26167
26168  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26169  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26170  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26171
26172  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26173  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26174  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26175
26176elif test "x$COMPILE_TYPE" = xreduced; then
26177  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26178    # Specify -m if running reduced on other Posix platforms
26179
26180  # keep track of c/cxx flags that we added outselves...
26181  #   to prevent emitting warning...
26182  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26183  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26184  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26185
26186  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26187  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26188  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26189
26190  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26191  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26192  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26193
26194  fi
26195fi
26196
26197# Make compilation sanity check
26198for ac_header in stdio.h
26199do :
26200  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26201if test "x$ac_cv_header_stdio_h" = x""yes; then :
26202  cat >>confdefs.h <<_ACEOF
26203#define HAVE_STDIO_H 1
26204_ACEOF
26205
26206else
26207
26208  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26209$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26210  if test "x$COMPILE_TYPE" = xreduced; then
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26212$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26213  elif test "x$COMPILE_TYPE" = xcross; then
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26215$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26216  fi
26217  as_fn_error $? "Cannot continue." "$LINENO" 5
26218
26219fi
26220
26221done
26222
26223
26224# The cast to long int works around a bug in the HP C Compiler
26225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26227# This bug is HP SR number 8606223364.
26228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26229$as_echo_n "checking size of int *... " >&6; }
26230if test "${ac_cv_sizeof_int_p+set}" = set; then :
26231  $as_echo_n "(cached) " >&6
26232else
26233  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26234
26235else
26236  if test "$ac_cv_type_int_p" = yes; then
26237     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26239as_fn_error 77 "cannot compute sizeof (int *)
26240See \`config.log' for more details" "$LINENO" 5 ; }
26241   else
26242     ac_cv_sizeof_int_p=0
26243   fi
26244fi
26245
26246fi
26247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26248$as_echo "$ac_cv_sizeof_int_p" >&6; }
26249
26250
26251
26252cat >>confdefs.h <<_ACEOF
26253#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26254_ACEOF
26255
26256
26257
26258if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26259  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26260  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26261fi
26262
26263if test "x$SIZEOF_INT_P" = x; then
26264    # The test failed, lets stick to the assumed value.
26265    { $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
26266$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26267else
26268    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26269
26270    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26271        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
26272    fi
26273fi
26274
26275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26276$as_echo_n "checking for target address size... " >&6; }
26277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26278$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26279
26280
26281###############################################################################
26282#
26283# Is the target little of big endian?
26284#
26285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26286$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26287if test "${ac_cv_c_bigendian+set}" = set; then :
26288  $as_echo_n "(cached) " >&6
26289else
26290  ac_cv_c_bigendian=unknown
26291    # See if we're dealing with a universal compiler.
26292    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26293/* end confdefs.h.  */
26294#ifndef __APPLE_CC__
26295	       not a universal capable compiler
26296	     #endif
26297	     typedef int dummy;
26298
26299_ACEOF
26300if ac_fn_cxx_try_compile "$LINENO"; then :
26301
26302	# Check for potential -arch flags.  It is not universal unless
26303	# there are at least two -arch flags with different values.
26304	ac_arch=
26305	ac_prev=
26306	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26307	 if test -n "$ac_prev"; then
26308	   case $ac_word in
26309	     i?86 | x86_64 | ppc | ppc64)
26310	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26311		 ac_arch=$ac_word
26312	       else
26313		 ac_cv_c_bigendian=universal
26314		 break
26315	       fi
26316	       ;;
26317	   esac
26318	   ac_prev=
26319	 elif test "x$ac_word" = "x-arch"; then
26320	   ac_prev=arch
26321	 fi
26322       done
26323fi
26324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26325    if test $ac_cv_c_bigendian = unknown; then
26326      # See if sys/param.h defines the BYTE_ORDER macro.
26327      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26328/* end confdefs.h.  */
26329#include <sys/types.h>
26330	     #include <sys/param.h>
26331
26332int
26333main ()
26334{
26335#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26336		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26337		     && LITTLE_ENDIAN)
26338	      bogus endian macros
26339	     #endif
26340
26341  ;
26342  return 0;
26343}
26344_ACEOF
26345if ac_fn_cxx_try_compile "$LINENO"; then :
26346  # It does; now see whether it defined to BIG_ENDIAN or not.
26347	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26348/* end confdefs.h.  */
26349#include <sys/types.h>
26350		#include <sys/param.h>
26351
26352int
26353main ()
26354{
26355#if BYTE_ORDER != BIG_ENDIAN
26356		 not big endian
26357		#endif
26358
26359  ;
26360  return 0;
26361}
26362_ACEOF
26363if ac_fn_cxx_try_compile "$LINENO"; then :
26364  ac_cv_c_bigendian=yes
26365else
26366  ac_cv_c_bigendian=no
26367fi
26368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26369fi
26370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26371    fi
26372    if test $ac_cv_c_bigendian = unknown; then
26373      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
26374      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26375/* end confdefs.h.  */
26376#include <limits.h>
26377
26378int
26379main ()
26380{
26381#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
26382	      bogus endian macros
26383	     #endif
26384
26385  ;
26386  return 0;
26387}
26388_ACEOF
26389if ac_fn_cxx_try_compile "$LINENO"; then :
26390  # It does; now see whether it defined to _BIG_ENDIAN or not.
26391	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26392/* end confdefs.h.  */
26393#include <limits.h>
26394
26395int
26396main ()
26397{
26398#ifndef _BIG_ENDIAN
26399		 not big endian
26400		#endif
26401
26402  ;
26403  return 0;
26404}
26405_ACEOF
26406if ac_fn_cxx_try_compile "$LINENO"; then :
26407  ac_cv_c_bigendian=yes
26408else
26409  ac_cv_c_bigendian=no
26410fi
26411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26412fi
26413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26414    fi
26415    if test $ac_cv_c_bigendian = unknown; then
26416      # Compile a test program.
26417      if test "$cross_compiling" = yes; then :
26418  # Try to guess by grepping values from an object file.
26419	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26420/* end confdefs.h.  */
26421short int ascii_mm[] =
26422		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
26423		short int ascii_ii[] =
26424		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
26425		int use_ascii (int i) {
26426		  return ascii_mm[i] + ascii_ii[i];
26427		}
26428		short int ebcdic_ii[] =
26429		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
26430		short int ebcdic_mm[] =
26431		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
26432		int use_ebcdic (int i) {
26433		  return ebcdic_mm[i] + ebcdic_ii[i];
26434		}
26435		extern int foo;
26436
26437int
26438main ()
26439{
26440return use_ascii (foo) == use_ebcdic (foo);
26441  ;
26442  return 0;
26443}
26444_ACEOF
26445if ac_fn_cxx_try_compile "$LINENO"; then :
26446  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
26447	      ac_cv_c_bigendian=yes
26448	    fi
26449	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
26450	      if test "$ac_cv_c_bigendian" = unknown; then
26451		ac_cv_c_bigendian=no
26452	      else
26453		# finding both strings is unlikely to happen, but who knows?
26454		ac_cv_c_bigendian=unknown
26455	      fi
26456	    fi
26457fi
26458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26459else
26460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26461/* end confdefs.h.  */
26462$ac_includes_default
26463int
26464main ()
26465{
26466
26467	     /* Are we little or big endian?  From Harbison&Steele.  */
26468	     union
26469	     {
26470	       long int l;
26471	       char c[sizeof (long int)];
26472	     } u;
26473	     u.l = 1;
26474	     return u.c[sizeof (long int) - 1] == 1;
26475
26476  ;
26477  return 0;
26478}
26479_ACEOF
26480if ac_fn_cxx_try_run "$LINENO"; then :
26481  ac_cv_c_bigendian=no
26482else
26483  ac_cv_c_bigendian=yes
26484fi
26485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26486  conftest.$ac_objext conftest.beam conftest.$ac_ext
26487fi
26488
26489    fi
26490fi
26491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
26492$as_echo "$ac_cv_c_bigendian" >&6; }
26493 case $ac_cv_c_bigendian in #(
26494   yes)
26495     ENDIAN="big";; #(
26496   no)
26497     ENDIAN="little" ;; #(
26498   universal)
26499     ENDIAN="universal_endianness"
26500     ;; #(
26501   *)
26502     ENDIAN="unknown" ;;
26503 esac
26504
26505
26506if test "x$ENDIAN" = xuniversal_endianness; then
26507    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
26508fi
26509if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
26510    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
26511fi
26512
26513
26514# Configure flags for the tools
26515
26516
26517###############################################################################
26518#
26519# How to compile shared libraries.
26520#
26521
26522if test "x$GCC" = xyes; then
26523    COMPILER_NAME=gcc
26524    PICFLAG="-fPIC"
26525    LIBRARY_PREFIX=lib
26526    SHARED_LIBRARY='lib$1.so'
26527    STATIC_LIBRARY='lib$1.a'
26528    SHARED_LIBRARY_FLAGS="-shared"
26529    SHARED_LIBRARY_SUFFIX='.so'
26530    STATIC_LIBRARY_SUFFIX='.a'
26531    OBJ_SUFFIX='.o'
26532    EXE_SUFFIX=''
26533    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
26534    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
26535    C_FLAG_REORDER=''
26536    CXX_FLAG_REORDER=''
26537    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
26538    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
26539    LD="$CC"
26540    LDEXE="$CC"
26541    LDCXX="$CXX"
26542    LDEXECXX="$CXX"
26543    POST_STRIP_CMD="$STRIP -g"
26544
26545    # Linking is different on MacOSX
26546    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26547        # Might change in the future to clang.
26548        COMPILER_NAME=gcc
26549        SHARED_LIBRARY='lib$1.dylib'
26550        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
26551        SHARED_LIBRARY_SUFFIX='.dylib'
26552        EXE_SUFFIX=''
26553        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
26554        SET_SHARED_LIBRARY_MAPFILE=''
26555        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
26556        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
26557        POST_STRIP_CMD="$STRIP -S"
26558    fi
26559else
26560    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26561        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
26562        COMPILER_NAME=ossc
26563        PICFLAG="-KPIC"
26564        LIBRARY_PREFIX=lib
26565        SHARED_LIBRARY='lib$1.so'
26566        STATIC_LIBRARY='lib$1.a'
26567        SHARED_LIBRARY_FLAGS="-G"
26568        SHARED_LIBRARY_SUFFIX='.so'
26569        STATIC_LIBRARY_SUFFIX='.a'
26570        OBJ_SUFFIX='.o'
26571        EXE_SUFFIX=''
26572        SET_SHARED_LIBRARY_NAME=''
26573        SET_SHARED_LIBRARY_MAPFILE='-M$1'
26574	C_FLAG_REORDER='-xF'
26575	CXX_FLAG_REORDER='-xF'
26576        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
26577        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
26578        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
26579        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
26580        CFLAGS_JDKLIB_EXTRA='-xstrconst'
26581        POST_STRIP_CMD="$STRIP -x"
26582        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
26583    fi
26584    if test "x$OPENJDK_TARGET_OS" = xwindows; then
26585        # If it is not gcc, then assume it is the MS Visual Studio compiler
26586        COMPILER_NAME=cl
26587        PICFLAG=""
26588        LIBRARY_PREFIX=
26589        SHARED_LIBRARY='$1.dll'
26590        STATIC_LIBRARY='$1.lib'
26591        SHARED_LIBRARY_FLAGS="-LD"
26592        SHARED_LIBRARY_SUFFIX='.dll'
26593        STATIC_LIBRARY_SUFFIX='.lib'
26594        OBJ_SUFFIX='.obj'
26595        EXE_SUFFIX='.exe'
26596        SET_SHARED_LIBRARY_NAME=''
26597        SET_SHARED_LIBRARY_MAPFILE=''
26598        SET_SHARED_LIBRARY_ORIGIN=''
26599        SET_EXECUTABLE_ORIGIN=''
26600    fi
26601fi
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620# The (cross) compiler is now configured, we can now test capabilities
26621# of the target platform.
26622
26623
26624
26625###############################################################################
26626#
26627# Setup the opt flags for different compilers
26628# and different operating systems.
26629#
26630
26631#
26632# NOTE: check for -mstackrealign needs to be below potential addition of -m32
26633#
26634if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
26635    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
26636    # While waiting for a better solution, the current workaround is to use -mstackrealign.
26637    CFLAGS="$CFLAGS -mstackrealign"
26638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
26639$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
26640    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26641/* end confdefs.h.  */
26642int main() { return 0; }
26643_ACEOF
26644if ac_fn_cxx_try_link "$LINENO"; then :
26645
26646		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26647$as_echo "yes" >&6; }
26648
26649else
26650
26651		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26652$as_echo "no" >&6; }
26653	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
26654
26655fi
26656rm -f core conftest.err conftest.$ac_objext \
26657    conftest$ac_exeext conftest.$ac_ext
26658fi
26659
26660C_FLAG_DEPS="-MMD -MF"
26661CXX_FLAG_DEPS="-MMD -MF"
26662
26663case $COMPILER_TYPE in
26664  CC )
26665    D_FLAG="-g"
26666    case $COMPILER_NAME in
26667      gcc )
26668      	case $OPENJDK_TARGET_OS in
26669	  macosx )
26670	    # On MacOSX we optimize for size, something
26671	    # we should do for all platforms?
26672	    C_O_FLAG_HI="-Os"
26673	    C_O_FLAG_NORM="-Os"
26674	    C_O_FLAG_NONE=""
26675	    ;;
26676	  *)
26677	    C_O_FLAG_HI="-O3"
26678	    C_O_FLAG_NORM="-O2"
26679	    C_O_FLAG_NONE="-O0"
26680	    CFLAGS_DEBUG_SYMBOLS="-g"
26681	    CXXFLAGS_DEBUG_SYMBOLS="-g"
26682	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
26683	       CFLAGS_DEBUG_SYMBOLS="-g1"
26684	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
26685	    fi
26686	    ;;
26687	esac
26688        CXX_O_FLAG_HI="$C_O_FLAG_HI"
26689        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
26690        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
26691        ;;
26692      ossc )
26693        #
26694        # Forte has different names for this with their C++ compiler...
26695        #
26696        C_FLAG_DEPS="-xMMD -xMF"
26697        CXX_FLAG_DEPS="-xMMD -xMF"
26698
26699        # Extra options used with HIGHEST
26700        #
26701        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
26702        #          done with care, there are some assumptions below that need to
26703        #          be understood about the use of pointers, and IEEE behavior.
26704        #
26705        # Use non-standard floating point mode (not IEEE 754)
26706        CC_HIGHEST="$CC_HIGHEST -fns"
26707        # Do some simplification of floating point arithmetic (not IEEE 754)
26708        CC_HIGHEST="$CC_HIGHEST -fsimple"
26709        # Use single precision floating point with 'float'
26710        CC_HIGHEST="$CC_HIGHEST -fsingle"
26711        # Assume memory references via basic pointer types do not alias
26712        #   (Source with excessing pointer casting and data access with mixed
26713        #    pointer types are not recommended)
26714        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
26715        # Use intrinsic or inline versions for math/std functions
26716        #   (If you expect perfect errno behavior, do not use this)
26717        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
26718        # Loop data dependency optimizations (need -xO3 or higher)
26719        CC_HIGHEST="$CC_HIGHEST -xdepend"
26720        # Pointer parameters to functions do not overlap
26721        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
26722        #    If you pass in multiple pointers to the same data, do not use this)
26723        CC_HIGHEST="$CC_HIGHEST -xrestrict"
26724        # Inline some library routines
26725        #   (If you expect perfect errno behavior, do not use this)
26726        CC_HIGHEST="$CC_HIGHEST -xlibmil"
26727        # Use optimized math routines
26728        #   (If you expect perfect errno behavior, do not use this)
26729        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
26730        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
26731
26732        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
26733          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
26734          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
26735        fi
26736
26737        case $OPENJDK_TARGET_CPU_ARCH in
26738          x86)
26739            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
26740            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
26741            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
26742            C_O_FLAG_NONE="-xregs=no%frameptr"
26743            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
26744            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
26745            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
26746            CXX_O_FLAG_NONE="-xregs=no%frameptr"
26747            if test "x$OPENJDK_TARGET_CPU" = xx86; then
26748               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
26749               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
26750            fi
26751            ;;
26752          sparc)
26753            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
26754            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
26755            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
26756            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
26757            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
26758            C_O_FLAG_NONE=""
26759            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
26760            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
26761            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
26762            CXX_O_FLAG_NONE=""
26763            ;;
26764        esac
26765
26766    CFLAGS_DEBUG_SYMBOLS="-g -xs"
26767    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
26768    esac
26769    ;;
26770  CL )
26771    D_FLAG=
26772    C_O_FLAG_HIGHEST="-O2"
26773    C_O_FLAG_HI="-O1"
26774    C_O_FLAG_NORM="-O1"
26775    C_O_FLAG_NONE="-Od"
26776    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
26777    CXX_O_FLAG_HI="$C_O_FLAG_HI"
26778    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
26779    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
26780    ;;
26781esac
26782
26783if test -z "$C_O_FLAG_HIGHEST"; then
26784   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
26785fi
26786
26787if test -z "$CXX_O_FLAG_HIGHEST"; then
26788   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
26789fi
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
26805   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
26806$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
26807fi
26808
26809if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
26810   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
26811$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
26812fi
26813
26814if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
26815   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
26816$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
26817fi
26818
26819
26820# Check whether --with-extra-cflags was given.
26821if test "${with_extra_cflags+set}" = set; then :
26822  withval=$with_extra_cflags;
26823fi
26824
26825
26826
26827# Check whether --with-extra-cxxflags was given.
26828if test "${with_extra_cxxflags+set}" = set; then :
26829  withval=$with_extra_cxxflags;
26830fi
26831
26832
26833
26834# Check whether --with-extra-ldflags was given.
26835if test "${with_extra_ldflags+set}" = set; then :
26836  withval=$with_extra_ldflags;
26837fi
26838
26839
26840CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
26841CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
26842LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
26843
26844# Hotspot needs these set in their legacy form
26845LEGACY_EXTRA_CFLAGS=$with_extra_cflags
26846LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
26847LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
26848
26849
26850
26851
26852
26853###############################################################################
26854#
26855# Now setup the CFLAGS and LDFLAGS for the JDK build.
26856# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
26857#
26858case $COMPILER_NAME in
26859      gcc )
26860      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
26861                          -pipe \
26862                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
26863	  case $OPENJDK_TARGET_CPU_ARCH in
26864	  arm )
26865            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
26866	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
26867	  ;;
26868	  ppc )
26869            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
26870	  ;;
26871	  * )
26872	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
26873	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
26874          ;;
26875	  esac
26876          ;;
26877      ossc )
26878          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
26879          case $OPENJDK_TARGET_CPU_ARCH in
26880          x86 )
26881            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
26882       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
26883          ;;
26884          esac
26885
26886      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
26887      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
26888
26889          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
26890          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
26891          ;;
26892      cl )
26893          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
26894               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
26895	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
26896	       -DWIN32 -DIAL"
26897          case $OPENJDK_TARGET_CPU in
26898              x86 )
26899                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
26900                  ;;
26901              x86_64 )
26902                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
26903                  ;;
26904          esac
26905          ;;
26906esac
26907
26908###############################################################################
26909
26910CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
26911
26912# The package path is used only on macosx?
26913PACKAGE_PATH=/opt/local
26914
26915
26916if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
26917    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
26918    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
26919    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
26920    #   Note: -Dmacro         is the same as    #define macro 1
26921    #         -Dmacro=	    is the same as    #define macro
26922    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26923        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
26924    else
26925        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
26926    fi
26927else
26928    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
26929fi
26930if test "x$OPENJDK_TARGET_OS" = xlinux; then
26931    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
26932fi
26933if test "x$OPENJDK_TARGET_OS" = xwindows; then
26934    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
26935fi
26936if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26937    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
26938fi
26939if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26940    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
26941fi
26942if test "x$OPENJDK_TARGET_OS" = xbsd; then
26943    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
26944fi
26945if test "x$DEBUG_LEVEL" = xrelease; then
26946    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
26947    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26948        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
26949    fi
26950else
26951    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
26952fi
26953
26954CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
26955CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
26956
26957CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
26958        -I${JDK_OUTPUTDIR}/include \
26959        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
26960        -I${JDK_TOPDIR}/src/share/javavm/export \
26961        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
26962        -I${JDK_TOPDIR}/src/share/native/common \
26963        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
26964
26965# The shared libraries are compiled using the picflag.
26966CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
26967CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
26968
26969# Executable flags
26970CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
26971CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
26972
26973# Now this is odd. The JDK native libraries have to link against libjvm.so
26974# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
26975# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
26976# is identical for client and server? Yes. Which is picked at runtime (client or server)?
26977# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
26978# libraries will link to whatever is in memory. Yuck.
26979#
26980# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
26981if test "x$COMPILER_NAME" = xcl; then
26982    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
26983    if test "x$OPENJDK_TARGET_CPU" = xx86; then
26984        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
26985    fi
26986    # TODO: make -debug optional "--disable-full-debug-symbols"
26987    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
26988    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
26989    LDFLAGS_JDKLIB_SUFFIX=""
26990    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
26991        LDFLAGS_STACK_SIZE=1048576
26992    else
26993        LDFLAGS_STACK_SIZE=327680
26994    fi
26995    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
26996else
26997    if test "x$COMPILER_NAME" = xgcc; then
26998        # If this is a --hash-style=gnu system, use --hash-style=both, why?
26999        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27000        if test -n "$HAS_GNU_HASH"; then
27001            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27002        fi
27003        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27004          # And since we now know that the linker is gnu, then add -z defs, to forbid
27005          # undefined symbols in object files.
27006          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27007          if test "x$DEBUG_LEVEL" = "xrelease"; then
27008              # When building release libraries, tell the linker optimize them.
27009              # Should this be supplied to the OSS linker as well?
27010              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27011          fi
27012        fi
27013    fi
27014    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27015                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
27016                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
27017                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27018
27019    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27020    if test "x$COMPILER_NAME" = xossc; then
27021        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27022    fi
27023
27024    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27025    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27026        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27027    fi
27028fi
27029
27030# Adjust flags according to debug level.
27031case $DEBUG_LEVEL in
27032      fastdebug )
27033              CFLAGS="$CFLAGS $D_FLAG"
27034              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27035              ;;
27036      slowdebug )
27037              CFLAGS="$CFLAGS $D_FLAG"
27038	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27039	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27040	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27041	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27042              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27043              ;;
27044esac
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060# Setup debug symbols (need objcopy from the toolchain for that)
27061
27062#
27063# ENABLE_DEBUG_SYMBOLS
27064# This must be done after the toolchain is setup, since we're looking at objcopy.
27065#
27066ENABLE_DEBUG_SYMBOLS=default
27067
27068# default on macosx is no...
27069if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27070   ENABLE_DEBUG_SYMBOLS=no
27071fi
27072
27073# Check whether --enable-debug-symbols was given.
27074if test "${enable_debug_symbols+set}" = set; then :
27075  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27076fi
27077
27078
27079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27080$as_echo_n "checking if we should generate debug symbols... " >&6; }
27081
27082if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27083   # explicit enabling of enable-debug-symbols and can't find objcopy
27084   #   this is an error
27085   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27086fi
27087
27088if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27089  # Default is on if objcopy is found, otherwise off
27090  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27091     ENABLE_DEBUG_SYMBOLS=yes
27092  else
27093     ENABLE_DEBUG_SYMBOLS=no
27094  fi
27095fi
27096
27097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27098$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27099
27100#
27101# ZIP_DEBUGINFO_FILES
27102#
27103ZIP_DEBUGINFO_FILES=yes
27104
27105# Check whether --enable-zip-debug-info was given.
27106if test "${enable_zip_debug_info+set}" = set; then :
27107  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27108fi
27109
27110
27111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27112$as_echo_n "checking if we should zip debug-info files... " >&6; }
27113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27114$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27115
27116# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27117#   use that...
27118if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27119   ZIP_DEBUGINFO_FILES=1
27120else
27121   ZIP_DEBUGINFO_FILES=0
27122fi
27123
27124
27125
27126
27127
27128
27129
27130###############################################################################
27131#
27132# Check dependencies for external and internal libraries.
27133#
27134###############################################################################
27135
27136
27137
27138###############################################################################
27139#
27140# OS specific settings that we never will need to probe.
27141#
27142if test "x$OPENJDK_TARGET_OS" = xlinux; then
27143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27144$as_echo_n "checking what is not needed on Linux?... " >&6; }
27145    PULSE_NOT_NEEDED=yes
27146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27147$as_echo "pulse" >&6; }
27148fi
27149
27150if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27152$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27153    ALSA_NOT_NEEDED=yes
27154    PULSE_NOT_NEEDED=yes
27155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27156$as_echo "alsa pulse" >&6; }
27157fi
27158
27159if test "x$OPENJDK_TARGET_OS" = xwindows; then
27160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27161$as_echo_n "checking what is not needed on Windows?... " >&6; }
27162    CUPS_NOT_NEEDED=yes
27163    ALSA_NOT_NEEDED=yes
27164    PULSE_NOT_NEEDED=yes
27165    X11_NOT_NEEDED=yes
27166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27167$as_echo "alsa cups pulse x11" >&6; }
27168fi
27169
27170if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27172$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27173    ALSA_NOT_NEEDED=yes
27174    PULSE_NOT_NEEDED=yes
27175    X11_NOT_NEEDED=yes
27176    FREETYPE2_NOT_NEEDED=yes
27177    # If the java runtime framework is disabled, then we need X11.
27178    # This will be adjusted below.
27179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27180$as_echo "alsa pulse x11" >&6; }
27181fi
27182
27183if test "x$OPENJDK_TARGET_OS" = xbsd; then
27184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27185$as_echo_n "checking what is not needed on bsd?... " >&6; }
27186    ALSA_NOT_NEEDED=yes
27187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27188$as_echo "alsa" >&6; }
27189fi
27190
27191if test "x$OPENJDK" = "xfalse"; then
27192    FREETYPE2_NOT_NEEDED=yes
27193fi
27194
27195if test "x$SUPPORT_HEADFUL" = xno; then
27196    X11_NOT_NEEDED=yes
27197fi
27198
27199###############################################################################
27200#
27201# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27202# that uses this API.
27203#
27204# Check whether --enable-macosx-runtime-support was given.
27205if test "${enable_macosx_runtime_support+set}" = set; then :
27206  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27207else
27208  MACOSX_RUNTIME_SUPPORT="no"
27209fi
27210
27211
27212USE_MACOSX_RUNTIME_SUPPORT=no
27213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27214$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27215if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27216    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27217        MACOSX_RUNTIME_SUPPORT=yes
27218        USE_MACOSX_RUNTIME_SUPPORT=yes
27219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27220$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27221    else
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27223$as_echo "yes, but explicitly disabled." >&6; }
27224    fi
27225else
27226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27227$as_echo "no" >&6; }
27228fi
27229
27230if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27232$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27233    X11_NOT_NEEDED=
27234    FREETYPE2_NOT_NEEDED=
27235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27236$as_echo "alsa pulse" >&6; }
27237fi
27238
27239
27240
27241
27242###############################################################################
27243#
27244# Check for X Windows
27245#
27246
27247# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27248# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27249# --x-libraries for the sysroot, if that seems to be correct.
27250if test "x$SYS_ROOT" != "x/"; then
27251  if test "x$x_includes" = xNONE; then
27252    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27253      x_includes="$SYS_ROOT/usr/X11R6/include"
27254    fi
27255  fi
27256  if test "x$x_libraries" = xNONE; then
27257    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27258      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27259    fi
27260  fi
27261fi
27262
27263# Now let autoconf do it's magic
27264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27265$as_echo_n "checking for X... " >&6; }
27266
27267
27268# Check whether --with-x was given.
27269if test "${with_x+set}" = set; then :
27270  withval=$with_x;
27271fi
27272
27273# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27274if test "x$with_x" = xno; then
27275  # The user explicitly disabled X.
27276  have_x=disabled
27277else
27278  case $x_includes,$x_libraries in #(
27279    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27280    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27281  $as_echo_n "(cached) " >&6
27282else
27283  # One or both of the vars are not set, and there is no cached value.
27284ac_x_includes=no ac_x_libraries=no
27285rm -f -r conftest.dir
27286if mkdir conftest.dir; then
27287  cd conftest.dir
27288  cat >Imakefile <<'_ACEOF'
27289incroot:
27290	@echo incroot='${INCROOT}'
27291usrlibdir:
27292	@echo usrlibdir='${USRLIBDIR}'
27293libdir:
27294	@echo libdir='${LIBDIR}'
27295_ACEOF
27296  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27297    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27298    for ac_var in incroot usrlibdir libdir; do
27299      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27300    done
27301    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27302    for ac_extension in a so sl dylib la dll; do
27303      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27304	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27305	ac_im_usrlibdir=$ac_im_libdir; break
27306      fi
27307    done
27308    # Screen out bogus values from the imake configuration.  They are
27309    # bogus both because they are the default anyway, and because
27310    # using them would break gcc on systems where it needs fixed includes.
27311    case $ac_im_incroot in
27312	/usr/include) ac_x_includes= ;;
27313	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27314    esac
27315    case $ac_im_usrlibdir in
27316	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27317	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27318    esac
27319  fi
27320  cd ..
27321  rm -f -r conftest.dir
27322fi
27323
27324# Standard set of common directories for X headers.
27325# Check X11 before X11Rn because it is often a symlink to the current release.
27326ac_x_header_dirs='
27327/usr/X11/include
27328/usr/X11R7/include
27329/usr/X11R6/include
27330/usr/X11R5/include
27331/usr/X11R4/include
27332
27333/usr/include/X11
27334/usr/include/X11R7
27335/usr/include/X11R6
27336/usr/include/X11R5
27337/usr/include/X11R4
27338
27339/usr/local/X11/include
27340/usr/local/X11R7/include
27341/usr/local/X11R6/include
27342/usr/local/X11R5/include
27343/usr/local/X11R4/include
27344
27345/usr/local/include/X11
27346/usr/local/include/X11R7
27347/usr/local/include/X11R6
27348/usr/local/include/X11R5
27349/usr/local/include/X11R4
27350
27351/usr/X386/include
27352/usr/x386/include
27353/usr/XFree86/include/X11
27354
27355/usr/include
27356/usr/local/include
27357/usr/unsupported/include
27358/usr/athena/include
27359/usr/local/x11r5/include
27360/usr/lpp/Xamples/include
27361
27362/usr/openwin/include
27363/usr/openwin/share/include'
27364
27365if test "$ac_x_includes" = no; then
27366  # Guess where to find include files, by looking for Xlib.h.
27367  # First, try using that file with no special directory specified.
27368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27369/* end confdefs.h.  */
27370#include <X11/Xlib.h>
27371_ACEOF
27372if ac_fn_cxx_try_cpp "$LINENO"; then :
27373  # We can compile using X headers with no special include directory.
27374ac_x_includes=
27375else
27376  for ac_dir in $ac_x_header_dirs; do
27377  if test -r "$ac_dir/X11/Xlib.h"; then
27378    ac_x_includes=$ac_dir
27379    break
27380  fi
27381done
27382fi
27383rm -f conftest.err conftest.i conftest.$ac_ext
27384fi # $ac_x_includes = no
27385
27386if test "$ac_x_libraries" = no; then
27387  # Check for the libraries.
27388  # See if we find them without any special options.
27389  # Don't add to $LIBS permanently.
27390  ac_save_LIBS=$LIBS
27391  LIBS="-lX11 $LIBS"
27392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27393/* end confdefs.h.  */
27394#include <X11/Xlib.h>
27395int
27396main ()
27397{
27398XrmInitialize ()
27399  ;
27400  return 0;
27401}
27402_ACEOF
27403if ac_fn_cxx_try_link "$LINENO"; then :
27404  LIBS=$ac_save_LIBS
27405# We can link X programs with no special library path.
27406ac_x_libraries=
27407else
27408  LIBS=$ac_save_LIBS
27409for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
27410do
27411  # Don't even attempt the hair of trying to link an X program!
27412  for ac_extension in a so sl dylib la dll; do
27413    if test -r "$ac_dir/libX11.$ac_extension"; then
27414      ac_x_libraries=$ac_dir
27415      break 2
27416    fi
27417  done
27418done
27419fi
27420rm -f core conftest.err conftest.$ac_objext \
27421    conftest$ac_exeext conftest.$ac_ext
27422fi # $ac_x_libraries = no
27423
27424case $ac_x_includes,$ac_x_libraries in #(
27425  no,* | *,no | *\'*)
27426    # Didn't find X, or a directory has "'" in its name.
27427    ac_cv_have_x="have_x=no";; #(
27428  *)
27429    # Record where we found X for the cache.
27430    ac_cv_have_x="have_x=yes\
27431	ac_x_includes='$ac_x_includes'\
27432	ac_x_libraries='$ac_x_libraries'"
27433esac
27434fi
27435;; #(
27436    *) have_x=yes;;
27437  esac
27438  eval "$ac_cv_have_x"
27439fi # $with_x != no
27440
27441if test "$have_x" != yes; then
27442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
27443$as_echo "$have_x" >&6; }
27444  no_x=yes
27445else
27446  # If each of the values was on the command line, it overrides each guess.
27447  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
27448  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
27449  # Update the cache value to reflect the command line values.
27450  ac_cv_have_x="have_x=yes\
27451	ac_x_includes='$x_includes'\
27452	ac_x_libraries='$x_libraries'"
27453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
27454$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
27455fi
27456
27457if test "$no_x" = yes; then
27458  # Not all programs may use this symbol, but it does not hurt to define it.
27459
27460$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
27461
27462  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
27463else
27464  if test -n "$x_includes"; then
27465    X_CFLAGS="$X_CFLAGS -I$x_includes"
27466  fi
27467
27468  # It would also be nice to do this for all -L options, not just this one.
27469  if test -n "$x_libraries"; then
27470    X_LIBS="$X_LIBS -L$x_libraries"
27471    # For Solaris; some versions of Sun CC require a space after -R and
27472    # others require no space.  Words are not sufficient . . . .
27473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
27474$as_echo_n "checking whether -R must be followed by a space... " >&6; }
27475    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
27476    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
27477    ac_cxx_werror_flag=yes
27478    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27479/* end confdefs.h.  */
27480
27481int
27482main ()
27483{
27484
27485  ;
27486  return 0;
27487}
27488_ACEOF
27489if ac_fn_cxx_try_link "$LINENO"; then :
27490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27491$as_echo "no" >&6; }
27492       X_LIBS="$X_LIBS -R$x_libraries"
27493else
27494  LIBS="$ac_xsave_LIBS -R $x_libraries"
27495       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27496/* end confdefs.h.  */
27497
27498int
27499main ()
27500{
27501
27502  ;
27503  return 0;
27504}
27505_ACEOF
27506if ac_fn_cxx_try_link "$LINENO"; then :
27507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27508$as_echo "yes" >&6; }
27509	  X_LIBS="$X_LIBS -R $x_libraries"
27510else
27511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
27512$as_echo "neither works" >&6; }
27513fi
27514rm -f core conftest.err conftest.$ac_objext \
27515    conftest$ac_exeext conftest.$ac_ext
27516fi
27517rm -f core conftest.err conftest.$ac_objext \
27518    conftest$ac_exeext conftest.$ac_ext
27519    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
27520    LIBS=$ac_xsave_LIBS
27521  fi
27522
27523  # Check for system-dependent libraries X programs must link with.
27524  # Do this before checking for the system-independent R6 libraries
27525  # (-lICE), since we may need -lsocket or whatever for X linking.
27526
27527  if test "$ISC" = yes; then
27528    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
27529  else
27530    # Martyn Johnson says this is needed for Ultrix, if the X
27531    # libraries were built with DECnet support.  And Karl Berry says
27532    # the Alpha needs dnet_stub (dnet does not exist).
27533    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
27534    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27535/* end confdefs.h.  */
27536
27537/* Override any GCC internal prototype to avoid an error.
27538   Use char because int might match the return type of a GCC
27539   builtin and then its argument prototype would still apply.  */
27540#ifdef __cplusplus
27541extern "C"
27542#endif
27543char XOpenDisplay ();
27544int
27545main ()
27546{
27547return XOpenDisplay ();
27548  ;
27549  return 0;
27550}
27551_ACEOF
27552if ac_fn_cxx_try_link "$LINENO"; then :
27553
27554else
27555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
27556$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
27557if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
27558  $as_echo_n "(cached) " >&6
27559else
27560  ac_check_lib_save_LIBS=$LIBS
27561LIBS="-ldnet  $LIBS"
27562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27563/* end confdefs.h.  */
27564
27565/* Override any GCC internal prototype to avoid an error.
27566   Use char because int might match the return type of a GCC
27567   builtin and then its argument prototype would still apply.  */
27568#ifdef __cplusplus
27569extern "C"
27570#endif
27571char dnet_ntoa ();
27572int
27573main ()
27574{
27575return dnet_ntoa ();
27576  ;
27577  return 0;
27578}
27579_ACEOF
27580if ac_fn_cxx_try_link "$LINENO"; then :
27581  ac_cv_lib_dnet_dnet_ntoa=yes
27582else
27583  ac_cv_lib_dnet_dnet_ntoa=no
27584fi
27585rm -f core conftest.err conftest.$ac_objext \
27586    conftest$ac_exeext conftest.$ac_ext
27587LIBS=$ac_check_lib_save_LIBS
27588fi
27589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
27590$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
27591if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
27592  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
27593fi
27594
27595    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
27596      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
27597$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
27598if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
27599  $as_echo_n "(cached) " >&6
27600else
27601  ac_check_lib_save_LIBS=$LIBS
27602LIBS="-ldnet_stub  $LIBS"
27603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27604/* end confdefs.h.  */
27605
27606/* Override any GCC internal prototype to avoid an error.
27607   Use char because int might match the return type of a GCC
27608   builtin and then its argument prototype would still apply.  */
27609#ifdef __cplusplus
27610extern "C"
27611#endif
27612char dnet_ntoa ();
27613int
27614main ()
27615{
27616return dnet_ntoa ();
27617  ;
27618  return 0;
27619}
27620_ACEOF
27621if ac_fn_cxx_try_link "$LINENO"; then :
27622  ac_cv_lib_dnet_stub_dnet_ntoa=yes
27623else
27624  ac_cv_lib_dnet_stub_dnet_ntoa=no
27625fi
27626rm -f core conftest.err conftest.$ac_objext \
27627    conftest$ac_exeext conftest.$ac_ext
27628LIBS=$ac_check_lib_save_LIBS
27629fi
27630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
27631$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
27632if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
27633  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
27634fi
27635
27636    fi
27637fi
27638rm -f core conftest.err conftest.$ac_objext \
27639    conftest$ac_exeext conftest.$ac_ext
27640    LIBS="$ac_xsave_LIBS"
27641
27642    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
27643    # to get the SysV transport functions.
27644    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
27645    # needs -lnsl.
27646    # The nsl library prevents programs from opening the X display
27647    # on Irix 5.2, according to T.E. Dickey.
27648    # The functions gethostbyname, getservbyname, and inet_addr are
27649    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
27650    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
27651if test "x$ac_cv_func_gethostbyname" = x""yes; then :
27652
27653fi
27654
27655    if test $ac_cv_func_gethostbyname = no; then
27656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
27657$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
27658if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
27659  $as_echo_n "(cached) " >&6
27660else
27661  ac_check_lib_save_LIBS=$LIBS
27662LIBS="-lnsl  $LIBS"
27663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27664/* end confdefs.h.  */
27665
27666/* Override any GCC internal prototype to avoid an error.
27667   Use char because int might match the return type of a GCC
27668   builtin and then its argument prototype would still apply.  */
27669#ifdef __cplusplus
27670extern "C"
27671#endif
27672char gethostbyname ();
27673int
27674main ()
27675{
27676return gethostbyname ();
27677  ;
27678  return 0;
27679}
27680_ACEOF
27681if ac_fn_cxx_try_link "$LINENO"; then :
27682  ac_cv_lib_nsl_gethostbyname=yes
27683else
27684  ac_cv_lib_nsl_gethostbyname=no
27685fi
27686rm -f core conftest.err conftest.$ac_objext \
27687    conftest$ac_exeext conftest.$ac_ext
27688LIBS=$ac_check_lib_save_LIBS
27689fi
27690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
27691$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
27692if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
27693  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
27694fi
27695
27696      if test $ac_cv_lib_nsl_gethostbyname = no; then
27697	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
27698$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
27699if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
27700  $as_echo_n "(cached) " >&6
27701else
27702  ac_check_lib_save_LIBS=$LIBS
27703LIBS="-lbsd  $LIBS"
27704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27705/* end confdefs.h.  */
27706
27707/* Override any GCC internal prototype to avoid an error.
27708   Use char because int might match the return type of a GCC
27709   builtin and then its argument prototype would still apply.  */
27710#ifdef __cplusplus
27711extern "C"
27712#endif
27713char gethostbyname ();
27714int
27715main ()
27716{
27717return gethostbyname ();
27718  ;
27719  return 0;
27720}
27721_ACEOF
27722if ac_fn_cxx_try_link "$LINENO"; then :
27723  ac_cv_lib_bsd_gethostbyname=yes
27724else
27725  ac_cv_lib_bsd_gethostbyname=no
27726fi
27727rm -f core conftest.err conftest.$ac_objext \
27728    conftest$ac_exeext conftest.$ac_ext
27729LIBS=$ac_check_lib_save_LIBS
27730fi
27731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
27732$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
27733if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
27734  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
27735fi
27736
27737      fi
27738    fi
27739
27740    # lieder@skyler.mavd.honeywell.com says without -lsocket,
27741    # socket/setsockopt and other routines are undefined under SCO ODT
27742    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
27743    # on later versions), says Simon Leinen: it contains gethostby*
27744    # variants that don't use the name server (or something).  -lsocket
27745    # must be given before -lnsl if both are needed.  We assume that
27746    # if connect needs -lnsl, so does gethostbyname.
27747    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
27748if test "x$ac_cv_func_connect" = x""yes; then :
27749
27750fi
27751
27752    if test $ac_cv_func_connect = no; then
27753      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
27754$as_echo_n "checking for connect in -lsocket... " >&6; }
27755if test "${ac_cv_lib_socket_connect+set}" = set; then :
27756  $as_echo_n "(cached) " >&6
27757else
27758  ac_check_lib_save_LIBS=$LIBS
27759LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
27760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27761/* end confdefs.h.  */
27762
27763/* Override any GCC internal prototype to avoid an error.
27764   Use char because int might match the return type of a GCC
27765   builtin and then its argument prototype would still apply.  */
27766#ifdef __cplusplus
27767extern "C"
27768#endif
27769char connect ();
27770int
27771main ()
27772{
27773return connect ();
27774  ;
27775  return 0;
27776}
27777_ACEOF
27778if ac_fn_cxx_try_link "$LINENO"; then :
27779  ac_cv_lib_socket_connect=yes
27780else
27781  ac_cv_lib_socket_connect=no
27782fi
27783rm -f core conftest.err conftest.$ac_objext \
27784    conftest$ac_exeext conftest.$ac_ext
27785LIBS=$ac_check_lib_save_LIBS
27786fi
27787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
27788$as_echo "$ac_cv_lib_socket_connect" >&6; }
27789if test "x$ac_cv_lib_socket_connect" = x""yes; then :
27790  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
27791fi
27792
27793    fi
27794
27795    # Guillermo Gomez says -lposix is necessary on A/UX.
27796    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
27797if test "x$ac_cv_func_remove" = x""yes; then :
27798
27799fi
27800
27801    if test $ac_cv_func_remove = no; then
27802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
27803$as_echo_n "checking for remove in -lposix... " >&6; }
27804if test "${ac_cv_lib_posix_remove+set}" = set; then :
27805  $as_echo_n "(cached) " >&6
27806else
27807  ac_check_lib_save_LIBS=$LIBS
27808LIBS="-lposix  $LIBS"
27809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27810/* end confdefs.h.  */
27811
27812/* Override any GCC internal prototype to avoid an error.
27813   Use char because int might match the return type of a GCC
27814   builtin and then its argument prototype would still apply.  */
27815#ifdef __cplusplus
27816extern "C"
27817#endif
27818char remove ();
27819int
27820main ()
27821{
27822return remove ();
27823  ;
27824  return 0;
27825}
27826_ACEOF
27827if ac_fn_cxx_try_link "$LINENO"; then :
27828  ac_cv_lib_posix_remove=yes
27829else
27830  ac_cv_lib_posix_remove=no
27831fi
27832rm -f core conftest.err conftest.$ac_objext \
27833    conftest$ac_exeext conftest.$ac_ext
27834LIBS=$ac_check_lib_save_LIBS
27835fi
27836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
27837$as_echo "$ac_cv_lib_posix_remove" >&6; }
27838if test "x$ac_cv_lib_posix_remove" = x""yes; then :
27839  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
27840fi
27841
27842    fi
27843
27844    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
27845    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
27846if test "x$ac_cv_func_shmat" = x""yes; then :
27847
27848fi
27849
27850    if test $ac_cv_func_shmat = no; then
27851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
27852$as_echo_n "checking for shmat in -lipc... " >&6; }
27853if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
27854  $as_echo_n "(cached) " >&6
27855else
27856  ac_check_lib_save_LIBS=$LIBS
27857LIBS="-lipc  $LIBS"
27858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27859/* end confdefs.h.  */
27860
27861/* Override any GCC internal prototype to avoid an error.
27862   Use char because int might match the return type of a GCC
27863   builtin and then its argument prototype would still apply.  */
27864#ifdef __cplusplus
27865extern "C"
27866#endif
27867char shmat ();
27868int
27869main ()
27870{
27871return shmat ();
27872  ;
27873  return 0;
27874}
27875_ACEOF
27876if ac_fn_cxx_try_link "$LINENO"; then :
27877  ac_cv_lib_ipc_shmat=yes
27878else
27879  ac_cv_lib_ipc_shmat=no
27880fi
27881rm -f core conftest.err conftest.$ac_objext \
27882    conftest$ac_exeext conftest.$ac_ext
27883LIBS=$ac_check_lib_save_LIBS
27884fi
27885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
27886$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
27887if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
27888  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
27889fi
27890
27891    fi
27892  fi
27893
27894  # Check for libraries that X11R6 Xt/Xaw programs need.
27895  ac_save_LDFLAGS=$LDFLAGS
27896  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
27897  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
27898  # check for ICE first), but we must link in the order -lSM -lICE or
27899  # we get undefined symbols.  So assume we have SM if we have ICE.
27900  # These have to be linked with before -lX11, unlike the other
27901  # libraries we check for below, so use a different variable.
27902  # John Interrante, Karl Berry
27903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
27904$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
27905if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
27906  $as_echo_n "(cached) " >&6
27907else
27908  ac_check_lib_save_LIBS=$LIBS
27909LIBS="-lICE $X_EXTRA_LIBS $LIBS"
27910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27911/* end confdefs.h.  */
27912
27913/* Override any GCC internal prototype to avoid an error.
27914   Use char because int might match the return type of a GCC
27915   builtin and then its argument prototype would still apply.  */
27916#ifdef __cplusplus
27917extern "C"
27918#endif
27919char IceConnectionNumber ();
27920int
27921main ()
27922{
27923return IceConnectionNumber ();
27924  ;
27925  return 0;
27926}
27927_ACEOF
27928if ac_fn_cxx_try_link "$LINENO"; then :
27929  ac_cv_lib_ICE_IceConnectionNumber=yes
27930else
27931  ac_cv_lib_ICE_IceConnectionNumber=no
27932fi
27933rm -f core conftest.err conftest.$ac_objext \
27934    conftest$ac_exeext conftest.$ac_ext
27935LIBS=$ac_check_lib_save_LIBS
27936fi
27937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
27938$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
27939if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
27940  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
27941fi
27942
27943  LDFLAGS=$ac_save_LDFLAGS
27944
27945fi
27946
27947
27948if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
27949
27950    # Print a helpful message on how to acquire the necessary build dependency.
27951    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
27952    MISSING_DEPENDENCY=x11
27953    PKGHANDLER_COMMAND=
27954
27955    case $PKGHANDLER in
27956	apt-get)
27957                apt_help     $MISSING_DEPENDENCY ;;
27958    yum)
27959                yum_help     $MISSING_DEPENDENCY ;;
27960	port)
27961                port_help    $MISSING_DEPENDENCY ;;
27962	pkgutil)
27963                pkgutil_help $MISSING_DEPENDENCY ;;
27964	pkgadd)
27965                pkgadd_help  $MISSING_DEPENDENCY ;;
27966    * )
27967      break ;;
27968    esac
27969
27970    if test "x$PKGHANDLER_COMMAND" != x; then
27971        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27972    fi
27973
27974    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
27975fi
27976
27977# Some of the old makefiles require a setting of OPENWIN_HOME
27978# Since the X11R6 directory has disappeared on later Linuxes,
27979# we need to probe for it.
27980if test "x$OPENJDK_TARGET_OS" = xlinux; then
27981    if test -d "$SYS_ROOT/usr/X11R6"; then
27982        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
27983    fi
27984    if test -d "$SYS_ROOT/usr/include/X11"; then
27985        OPENWIN_HOME="$SYS_ROOT/usr"
27986    fi
27987fi
27988if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27989    OPENWIN_HOME="/usr/openwin"
27990fi
27991
27992
27993
27994#
27995# Weird Sol10 something check...TODO change to try compile
27996#
27997if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
27998  if test "`uname -r`" = "5.10"; then
27999     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28000     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28001     fi
28002  fi
28003fi
28004
28005ac_ext=c
28006ac_cpp='$CPP $CPPFLAGS'
28007ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28008ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28009ac_compiler_gnu=$ac_cv_c_compiler_gnu
28010
28011OLD_CFLAGS="$CFLAGS"
28012CFLAGS="$CFLAGS $X_CFLAGS"
28013
28014# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28015for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28016do :
28017  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28018ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28019                   # include <X11/Xutil.h>
28020
28021"
28022if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28023  cat >>confdefs.h <<_ACEOF
28024#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28025_ACEOF
28026 X11_A_OK=yes
28027else
28028  X11_A_OK=no
28029fi
28030
28031done
28032
28033
28034CFLAGS="$OLD_CFLAGS"
28035ac_ext=cpp
28036ac_cpp='$CXXCPP $CPPFLAGS'
28037ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28038ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28039ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28040
28041
28042if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28043
28044    # Print a helpful message on how to acquire the necessary build dependency.
28045    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28046    MISSING_DEPENDENCY=x11
28047    PKGHANDLER_COMMAND=
28048
28049    case $PKGHANDLER in
28050	apt-get)
28051                apt_help     $MISSING_DEPENDENCY ;;
28052    yum)
28053                yum_help     $MISSING_DEPENDENCY ;;
28054	port)
28055                port_help    $MISSING_DEPENDENCY ;;
28056	pkgutil)
28057                pkgutil_help $MISSING_DEPENDENCY ;;
28058	pkgadd)
28059                pkgadd_help  $MISSING_DEPENDENCY ;;
28060    * )
28061      break ;;
28062    esac
28063
28064    if test "x$PKGHANDLER_COMMAND" != x; then
28065        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28066    fi
28067
28068    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28069fi
28070
28071
28072
28073
28074
28075
28076###############################################################################
28077#
28078# The common unix printing system cups is used to print from java.
28079#
28080
28081# Check whether --with-cups was given.
28082if test "${with_cups+set}" = set; then :
28083  withval=$with_cups;
28084fi
28085
28086
28087# Check whether --with-cups-include was given.
28088if test "${with_cups_include+set}" = set; then :
28089  withval=$with_cups_include;
28090fi
28091
28092
28093if test "x$CUPS_NOT_NEEDED" = xyes; then
28094	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28095		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28096$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28097	fi
28098	CUPS_CFLAGS=
28099else
28100	CUPS_FOUND=no
28101
28102	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28103	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28104	fi
28105
28106	if test "x${with_cups}" != x; then
28107	    CUPS_CFLAGS="-I${with_cups}/include"
28108	    CUPS_FOUND=yes
28109	fi
28110	if test "x${with_cups_include}" != x; then
28111	    CUPS_CFLAGS="-I${with_cups_include}"
28112	    CUPS_FOUND=yes
28113	fi
28114	if test "x$CUPS_FOUND" = xno; then
28115
28116
28117    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28118        # Source the builddeps file again, to make sure it uses the latest variables!
28119        . $builddepsfile
28120        # Look for a target and build machine specific resource!
28121        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28122        if test "x$resource" = x; then
28123            # Ok, lets instead look for a target specific resource
28124            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28125        fi
28126        if test "x$resource" = x; then
28127            # Ok, lets instead look for a build specific resource
28128            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28129        fi
28130        if test "x$resource" = x; then
28131            # Ok, lets instead look for a generic resource
28132            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28133            resource=${builddep_cups}
28134        fi
28135        if test "x$resource" != x; then
28136            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28137$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28138	    # If the resource in the builddeps.conf file is an existing directory,
28139	    # for example /java/linux/cups
28140	    if test -d ${resource}; then
28141	       depdir=${resource}
28142	    else
28143
28144# cups is for example mymodule
28145# $resource is for example libs/general/libmymod_1_2_3.zip
28146# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28147# $with_builddeps_dir is for example /localhome/builddeps
28148# depdir is the name of the variable into which we store the depdir, eg MYMOD
28149# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28150# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28151    filename=`basename $resource`
28152    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28153    filebase=${filename%%.*}
28154    extension=${filename#*.}
28155    installdir=$with_builddeps_dir/$filebase
28156    if test ! -f $installdir/$filename.unpacked; then
28157        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28158$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28159        if test ! -d $installdir; then
28160            mkdir -p $installdir
28161        fi
28162        if test ! -d $installdir; then
28163            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28164        fi
28165        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28166        touch $tmpfile
28167        if test ! -f $tmpfile; then
28168            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28169        fi
28170
28171    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28172    # $tmpfile is the local file name for the downloaded file.
28173    VALID_TOOL=no
28174    if test "x$BDEPS_FTP" = xwget; then
28175       VALID_TOOL=yes
28176       wget -O $tmpfile $with_builddeps_server/$resource
28177    fi
28178    if test "x$BDEPS_FTP" = xlftp; then
28179       VALID_TOOL=yes
28180       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28181    fi
28182    if test "x$BDEPS_FTP" = xftp; then
28183        VALID_TOOL=yes
28184        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28185        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28186        FTPUSERPWD=${FTPSERVER%%@*}
28187        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28188            FTPUSER=${userpwd%%:*}
28189            FTPPWD=${userpwd#*@}
28190            FTPSERVER=${FTPSERVER#*@}
28191        else
28192            FTPUSER=ftp
28193            FTPPWD=ftp
28194        fi
28195        # the "pass" command does not work on some
28196        # ftp clients (read ftp.exe) but if it works,
28197        # passive mode is better!
28198        (\
28199            echo "user $FTPUSER $FTPPWD"        ;\
28200            echo "pass"                         ;\
28201            echo "bin"                          ;\
28202            echo "get $FTPPATH $tmpfile"              ;\
28203        ) | ftp -in $FTPSERVER
28204    fi
28205    if test "x$VALID_TOOL" != xyes; then
28206       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28207    fi
28208
28209        mv $tmpfile $installdir/$filename
28210        if test ! -s $installdir/$filename; then
28211            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28212        fi
28213        case "$extension" in
28214            zip)  echo "Unzipping $installdir/$filename..."
28215               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28216            ;;
28217            tar.gz) echo "Untaring $installdir/$filename..."
28218               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28219            ;;
28220            tgz) echo "Untaring $installdir/$filename..."
28221               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28222            ;;
28223            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28224            ;;
28225        esac
28226    fi
28227    if test -f $installdir/$filename.unpacked; then
28228        depdir=$installdir
28229    fi
28230
28231	    fi
28232            # Source the builddeps file again, because in the previous command, the depdir
28233            # was updated to point at the current build dependency install directory.
28234            . $builddepsfile
28235            # Now extract variables from the builddeps.conf files.
28236            theroot=${builddep_cups_ROOT}
28237            thecflags=${builddep_cups_CFLAGS}
28238            thelibs=${builddep_cups_LIBS}
28239            if test "x$depdir" = x; then
28240                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28241            fi
28242            CUPS=$depdir
28243            if test "x$theroot" != x; then
28244               CUPS="$theroot"
28245            fi
28246            if test "x$thecflags" != x; then
28247               CUPS_CFLAGS="$thecflags"
28248            fi
28249            if test "x$thelibs" != x; then
28250               CUPS_LIBS="$thelibs"
28251            fi
28252            CUPS_FOUND=yes
28253
28254        fi
28255
28256    fi
28257
28258	fi
28259	if test "x$CUPS_FOUND" = xno; then
28260	    # Are the cups headers installed in the default /usr/include location?
28261	    for ac_header in cups/cups.h cups/ppd.h
28262do :
28263  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28264ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28265if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28266  cat >>confdefs.h <<_ACEOF
28267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28268_ACEOF
28269 CUPS_FOUND=yes
28270	                      CUPS_CFLAGS=
28271	                      DEFAULT_CUPS=yes
28272fi
28273
28274done
28275
28276	fi
28277	if test "x$CUPS_FOUND" = xno; then
28278	    # Getting nervous now? Lets poke around for standard Solaris third-party
28279	    # package installation locations.
28280	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28281$as_echo_n "checking for cups headers... " >&6; }
28282	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28283	       # An SFW package seems to be installed!
28284	       CUPS_FOUND=yes
28285	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28286	    elif test -s /opt/csw/include/cups/cups.h; then
28287	       # A CSW package seems to be installed!
28288	       CUPS_FOUND=yes
28289	       CUPS_CFLAGS="-I/opt/csw/include"
28290	    fi
28291	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28292$as_echo "$CUPS_FOUND" >&6; }
28293	fi
28294	if test "x$CUPS_FOUND" = xno; then
28295
28296    # Print a helpful message on how to acquire the necessary build dependency.
28297    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28298    MISSING_DEPENDENCY=cups
28299    PKGHANDLER_COMMAND=
28300
28301    case $PKGHANDLER in
28302	apt-get)
28303                apt_help     $MISSING_DEPENDENCY ;;
28304    yum)
28305                yum_help     $MISSING_DEPENDENCY ;;
28306	port)
28307                port_help    $MISSING_DEPENDENCY ;;
28308	pkgutil)
28309                pkgutil_help $MISSING_DEPENDENCY ;;
28310	pkgadd)
28311                pkgadd_help  $MISSING_DEPENDENCY ;;
28312    * )
28313      break ;;
28314    esac
28315
28316    if test "x$PKGHANDLER_COMMAND" != x; then
28317        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28318    fi
28319
28320	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28321	fi
28322fi
28323
28324
28325
28326
28327
28328
28329###############################################################################
28330#
28331# The ubiquitous freetype2 library is used to render fonts.
28332#
28333
28334# Check whether --with-freetype was given.
28335if test "${with_freetype+set}" = set; then :
28336  withval=$with_freetype;
28337fi
28338
28339
28340# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28341USING_SYSTEM_FT_LIB=false
28342
28343if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28344	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28345		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28346$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28347	fi
28348	FREETYPE2_CFLAGS=
28349	FREETYPE2_LIBS=
28350        FREETYPE2_LIB_PATH=
28351else
28352	FREETYPE2_FOUND=no
28353
28354	if test "x$with_freetype" != x; then
28355
28356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28357
28358  # Input might be given as Windows format, start by converting to
28359  # unix format.
28360  path="$with_freetype"
28361  new_path=`$CYGPATH -u "$path"`
28362
28363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28366  # "foo.exe" is OK but "foo" is an error.
28367  #
28368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28369  # It is also a way to make sure we got the proper file name for the real test later on.
28370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28371  if test "x$test_shortpath" = x; then
28372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28373$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28374    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
28375  fi
28376
28377  # Call helper function which possibly converts this using DOS-style short mode.
28378  # If so, the updated path is stored in $new_path.
28379
28380  input_path="$new_path"
28381  # Check if we need to convert this using DOS-style short mode. If the path
28382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28383  # take no chances and rewrite it.
28384  # Note: m4 eats our [], so we need to use [ and ] instead.
28385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28386  if test "x$has_forbidden_chars" != x; then
28387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28391      # Going to short mode and back again did indeed matter. Since short mode is
28392      # case insensitive, let's make it lowercase to improve readability.
28393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28394      # Now convert it back to Unix-stile (cygpath)
28395      input_path=`$CYGPATH -u "$shortmode_path"`
28396      new_path="$input_path"
28397    fi
28398  fi
28399
28400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28401  if test "x$test_cygdrive_prefix" = x; then
28402    # As a simple fix, exclude /usr/bin since it's not a real path.
28403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28405      # a path prefixed by /cygdrive for fixpath to work.
28406      new_path="$CYGWIN_ROOT_PATH$input_path"
28407    fi
28408  fi
28409
28410
28411  if test "x$path" != "x$new_path"; then
28412    with_freetype="$new_path"
28413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28414$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28415  fi
28416
28417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28418
28419  path="$with_freetype"
28420  has_colon=`$ECHO $path | $GREP ^.:`
28421  new_path="$path"
28422  if test "x$has_colon" = x; then
28423    # Not in mixed or Windows style, start by that.
28424    new_path=`cmd //c echo $path`
28425  fi
28426
28427
28428  input_path="$new_path"
28429  # Check if we need to convert this using DOS-style short mode. If the path
28430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28431  # take no chances and rewrite it.
28432  # Note: m4 eats our [], so we need to use [ and ] instead.
28433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28434  if test "x$has_forbidden_chars" != x; then
28435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28437  fi
28438
28439
28440  windows_path="$new_path"
28441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28442    unix_path=`$CYGPATH -u "$windows_path"`
28443    new_path="$unix_path"
28444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28446    new_path="$unix_path"
28447  fi
28448
28449  if test "x$path" != "x$new_path"; then
28450    with_freetype="$new_path"
28451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28452$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28453  fi
28454
28455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28457
28458  else
28459    # We're on a posix platform. Hooray! :)
28460    path="$with_freetype"
28461
28462    if test ! -f "$path" && test ! -d "$path"; then
28463      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
28464    fi
28465
28466    has_space=`$ECHO "$path" | $GREP " "`
28467    if test "x$has_space" != x; then
28468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28469$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28470      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28471    fi
28472  fi
28473
28474	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
28475            FREETYPE2_LIB_PATH="$with_freetype/lib"
28476            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
28477                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
28478                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
28479            fi
28480            if test "x$OPENJDK_TARGET_OS" = xwindows; then
28481                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
28482            fi
28483	    FREETYPE2_CFLAGS="-I$with_freetype/include"
28484            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
28485                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
28486            fi
28487 	    FREETYPE2_FOUND=yes
28488   	    if test "x$FREETYPE2_FOUND" = xyes; then
28489	        # Verify that the directories exist
28490                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
28491		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
28492		fi
28493	        # List the contents of the lib.
28494		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
28495                if test "x$FREETYPELIB" = x; then
28496		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
28497		fi
28498	        # Check one h-file
28499                if ! test -s "$with_freetype/include/ft2build.h"; then
28500		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
28501		fi
28502            fi
28503        fi
28504	if test "x$FREETYPE2_FOUND" = xno; then
28505
28506
28507    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28508        # Source the builddeps file again, to make sure it uses the latest variables!
28509        . $builddepsfile
28510        # Look for a target and build machine specific resource!
28511        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28512        if test "x$resource" = x; then
28513            # Ok, lets instead look for a target specific resource
28514            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
28515        fi
28516        if test "x$resource" = x; then
28517            # Ok, lets instead look for a build specific resource
28518            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
28519        fi
28520        if test "x$resource" = x; then
28521            # Ok, lets instead look for a generic resource
28522            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
28523            resource=${builddep_freetype2}
28524        fi
28525        if test "x$resource" != x; then
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
28527$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
28528	    # If the resource in the builddeps.conf file is an existing directory,
28529	    # for example /java/linux/cups
28530	    if test -d ${resource}; then
28531	       depdir=${resource}
28532	    else
28533
28534# freetype2 is for example mymodule
28535# $resource is for example libs/general/libmymod_1_2_3.zip
28536# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28537# $with_builddeps_dir is for example /localhome/builddeps
28538# depdir is the name of the variable into which we store the depdir, eg MYMOD
28539# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28540# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28541    filename=`basename $resource`
28542    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28543    filebase=${filename%%.*}
28544    extension=${filename#*.}
28545    installdir=$with_builddeps_dir/$filebase
28546    if test ! -f $installdir/$filename.unpacked; then
28547        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
28548$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28549        if test ! -d $installdir; then
28550            mkdir -p $installdir
28551        fi
28552        if test ! -d $installdir; then
28553            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28554        fi
28555        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
28556        touch $tmpfile
28557        if test ! -f $tmpfile; then
28558            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28559        fi
28560
28561    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28562    # $tmpfile is the local file name for the downloaded file.
28563    VALID_TOOL=no
28564    if test "x$BDEPS_FTP" = xwget; then
28565       VALID_TOOL=yes
28566       wget -O $tmpfile $with_builddeps_server/$resource
28567    fi
28568    if test "x$BDEPS_FTP" = xlftp; then
28569       VALID_TOOL=yes
28570       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28571    fi
28572    if test "x$BDEPS_FTP" = xftp; then
28573        VALID_TOOL=yes
28574        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28575        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28576        FTPUSERPWD=${FTPSERVER%%@*}
28577        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28578            FTPUSER=${userpwd%%:*}
28579            FTPPWD=${userpwd#*@}
28580            FTPSERVER=${FTPSERVER#*@}
28581        else
28582            FTPUSER=ftp
28583            FTPPWD=ftp
28584        fi
28585        # the "pass" command does not work on some
28586        # ftp clients (read ftp.exe) but if it works,
28587        # passive mode is better!
28588        (\
28589            echo "user $FTPUSER $FTPPWD"        ;\
28590            echo "pass"                         ;\
28591            echo "bin"                          ;\
28592            echo "get $FTPPATH $tmpfile"              ;\
28593        ) | ftp -in $FTPSERVER
28594    fi
28595    if test "x$VALID_TOOL" != xyes; then
28596       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28597    fi
28598
28599        mv $tmpfile $installdir/$filename
28600        if test ! -s $installdir/$filename; then
28601            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28602        fi
28603        case "$extension" in
28604            zip)  echo "Unzipping $installdir/$filename..."
28605               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28606            ;;
28607            tar.gz) echo "Untaring $installdir/$filename..."
28608               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28609            ;;
28610            tgz) echo "Untaring $installdir/$filename..."
28611               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28612            ;;
28613            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28614            ;;
28615        esac
28616    fi
28617    if test -f $installdir/$filename.unpacked; then
28618        depdir=$installdir
28619    fi
28620
28621	    fi
28622            # Source the builddeps file again, because in the previous command, the depdir
28623            # was updated to point at the current build dependency install directory.
28624            . $builddepsfile
28625            # Now extract variables from the builddeps.conf files.
28626            theroot=${builddep_freetype2_ROOT}
28627            thecflags=${builddep_freetype2_CFLAGS}
28628            thelibs=${builddep_freetype2_LIBS}
28629            if test "x$depdir" = x; then
28630                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
28631            fi
28632            FREETYPE2=$depdir
28633            if test "x$theroot" != x; then
28634               FREETYPE2="$theroot"
28635            fi
28636            if test "x$thecflags" != x; then
28637               FREETYPE2_CFLAGS="$thecflags"
28638            fi
28639            if test "x$thelibs" != x; then
28640               FREETYPE2_LIBS="$thelibs"
28641            fi
28642            FREETYPE2_FOUND=yes
28643            else FREETYPE2_FOUND=no
28644
28645        fi
28646        else FREETYPE2_FOUND=no
28647
28648    fi
28649
28650            USING_SYSTEM_FT_LIB=true
28651	fi
28652	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
28653            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
28654
28655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28656
28657  # Input might be given as Windows format, start by converting to
28658  # unix format.
28659  path="$FREETYPELOCATION"
28660  new_path=`$CYGPATH -u "$path"`
28661
28662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28665  # "foo.exe" is OK but "foo" is an error.
28666  #
28667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28668  # It is also a way to make sure we got the proper file name for the real test later on.
28669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28670  if test "x$test_shortpath" = x; then
28671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
28672$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
28673    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
28674  fi
28675
28676  # Call helper function which possibly converts this using DOS-style short mode.
28677  # If so, the updated path is stored in $new_path.
28678
28679  input_path="$new_path"
28680  # Check if we need to convert this using DOS-style short mode. If the path
28681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28682  # take no chances and rewrite it.
28683  # Note: m4 eats our [], so we need to use [ and ] instead.
28684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28685  if test "x$has_forbidden_chars" != x; then
28686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28690      # Going to short mode and back again did indeed matter. Since short mode is
28691      # case insensitive, let's make it lowercase to improve readability.
28692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28693      # Now convert it back to Unix-stile (cygpath)
28694      input_path=`$CYGPATH -u "$shortmode_path"`
28695      new_path="$input_path"
28696    fi
28697  fi
28698
28699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28700  if test "x$test_cygdrive_prefix" = x; then
28701    # As a simple fix, exclude /usr/bin since it's not a real path.
28702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28704      # a path prefixed by /cygdrive for fixpath to work.
28705      new_path="$CYGWIN_ROOT_PATH$input_path"
28706    fi
28707  fi
28708
28709
28710  if test "x$path" != "x$new_path"; then
28711    FREETYPELOCATION="$new_path"
28712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
28713$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
28714  fi
28715
28716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28717
28718  path="$FREETYPELOCATION"
28719  has_colon=`$ECHO $path | $GREP ^.:`
28720  new_path="$path"
28721  if test "x$has_colon" = x; then
28722    # Not in mixed or Windows style, start by that.
28723    new_path=`cmd //c echo $path`
28724  fi
28725
28726
28727  input_path="$new_path"
28728  # Check if we need to convert this using DOS-style short mode. If the path
28729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28730  # take no chances and rewrite it.
28731  # Note: m4 eats our [], so we need to use [ and ] instead.
28732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28733  if test "x$has_forbidden_chars" != x; then
28734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28736  fi
28737
28738
28739  windows_path="$new_path"
28740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28741    unix_path=`$CYGPATH -u "$windows_path"`
28742    new_path="$unix_path"
28743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28745    new_path="$unix_path"
28746  fi
28747
28748  if test "x$path" != "x$new_path"; then
28749    FREETYPELOCATION="$new_path"
28750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
28751$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
28752  fi
28753
28754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28756
28757  else
28758    # We're on a posix platform. Hooray! :)
28759    path="$FREETYPELOCATION"
28760
28761    if test ! -f "$path" && test ! -d "$path"; then
28762      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
28763    fi
28764
28765    has_space=`$ECHO "$path" | $GREP " "`
28766    if test "x$has_space" != x; then
28767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
28768$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
28769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28770    fi
28771  fi
28772
28773	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
28774$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
28775	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
28776	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
28777	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
28778 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
28779                if ! test -s "$FREETYPE2_LIBS"; then
28780		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
28781		fi
28782                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
28783		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
28784		fi
28785                USING_SYSTEM_FT_LIB=true
28786                FREETYPE2_FOUND=yes
28787	    fi
28788	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
28789$as_echo "$FREETYPE2_FOUND" >&6; }
28790        fi
28791	if test "x$FREETYPE2_FOUND" = xno; then
28792
28793pkg_failed=no
28794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
28795$as_echo_n "checking for FREETYPE2... " >&6; }
28796
28797if test -n "$FREETYPE2_CFLAGS"; then
28798    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
28799 elif test -n "$PKG_CONFIG"; then
28800    if test -n "$PKG_CONFIG" && \
28801    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
28802  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
28803  ac_status=$?
28804  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28805  test $ac_status = 0; }; then
28806  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
28807else
28808  pkg_failed=yes
28809fi
28810 else
28811    pkg_failed=untried
28812fi
28813if test -n "$FREETYPE2_LIBS"; then
28814    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
28815 elif test -n "$PKG_CONFIG"; then
28816    if test -n "$PKG_CONFIG" && \
28817    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
28818  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
28819  ac_status=$?
28820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28821  test $ac_status = 0; }; then
28822  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
28823else
28824  pkg_failed=yes
28825fi
28826 else
28827    pkg_failed=untried
28828fi
28829
28830
28831
28832if test $pkg_failed = yes; then
28833
28834if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
28835        _pkg_short_errors_supported=yes
28836else
28837        _pkg_short_errors_supported=no
28838fi
28839        if test $_pkg_short_errors_supported = yes; then
28840	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
28841        else
28842	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
28843        fi
28844	# Put the nasty error message in config.log where it belongs
28845	echo "$FREETYPE2_PKG_ERRORS" >&5
28846
28847	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28848$as_echo "no" >&6; }
28849                FREETYPE2_FOUND=no
28850elif test $pkg_failed = untried; then
28851	FREETYPE2_FOUND=no
28852else
28853	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
28854	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
28855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28856$as_echo "yes" >&6; }
28857	FREETYPE2_FOUND=yes
28858fi
28859            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
28860            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
28861            USING_SYSTEM_FT_LIB=true
28862            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
28863            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
28864              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
28865            fi
28866	fi
28867	if test "x$FREETYPE2_FOUND" = xno; then
28868	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
28869$as_echo_n "checking for freetype in some standard locations... " >&6; }
28870
28871	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
28872	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
28873	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
28874	    fi
28875	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
28876	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
28877	        DEFAULT_FREETYPE_LIBS="-lfreetype"
28878	    fi
28879
28880	    PREV_CXXCFLAGS="$CXXFLAGS"
28881	    PREV_LDFLAGS="$LDFLAGS"
28882	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
28883	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
28884	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28885/* end confdefs.h.  */
28886#include<ft2build.h>
28887	                    #include FT_FREETYPE_H
28888	                   int main() { return 0; }
28889
28890_ACEOF
28891if ac_fn_cxx_try_link "$LINENO"; then :
28892
28893	                      # Yes, the default cflags and libs did the trick.
28894	                      FREETYPE2_FOUND=yes
28895	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
28896	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
28897
28898else
28899
28900	                      FREETYPE2_FOUND=no
28901
28902fi
28903rm -f core conftest.err conftest.$ac_objext \
28904    conftest$ac_exeext conftest.$ac_ext
28905            CXXCFLAGS="$PREV_CXXFLAGS"
28906	    LDFLAGS="$PREV_LDFLAGS"
28907	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
28908$as_echo "$FREETYPE2_FOUND" >&6; }
28909            USING_SYSTEM_FT_LIB=true
28910	fi
28911	if test "x$FREETYPE2_FOUND" = xno; then
28912
28913    # Print a helpful message on how to acquire the necessary build dependency.
28914    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
28915    MISSING_DEPENDENCY=freetype2
28916    PKGHANDLER_COMMAND=
28917
28918    case $PKGHANDLER in
28919	apt-get)
28920                apt_help     $MISSING_DEPENDENCY ;;
28921    yum)
28922                yum_help     $MISSING_DEPENDENCY ;;
28923	port)
28924                port_help    $MISSING_DEPENDENCY ;;
28925	pkgutil)
28926                pkgutil_help $MISSING_DEPENDENCY ;;
28927	pkgadd)
28928                pkgadd_help  $MISSING_DEPENDENCY ;;
28929    * )
28930      break ;;
28931    esac
28932
28933    if test "x$PKGHANDLER_COMMAND" != x; then
28934        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28935    fi
28936
28937		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
28938	fi
28939
28940        if test "x$OPENJDK_TARGET_OS" != xwindows; then
28941            # AC_CHECK_LIB does not support use of cl.exe
28942            PREV_LDFLAGS="$LDFLAGS"
28943            LDFLAGS="$FREETYPE2_LIBS"
28944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
28945$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
28946if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
28947  $as_echo_n "(cached) " >&6
28948else
28949  ac_check_lib_save_LIBS=$LIBS
28950LIBS="-lfreetype  $LIBS"
28951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28952/* end confdefs.h.  */
28953
28954/* Override any GCC internal prototype to avoid an error.
28955   Use char because int might match the return type of a GCC
28956   builtin and then its argument prototype would still apply.  */
28957#ifdef __cplusplus
28958extern "C"
28959#endif
28960char FT_Init_FreeType ();
28961int
28962main ()
28963{
28964return FT_Init_FreeType ();
28965  ;
28966  return 0;
28967}
28968_ACEOF
28969if ac_fn_cxx_try_link "$LINENO"; then :
28970  ac_cv_lib_freetype_FT_Init_FreeType=yes
28971else
28972  ac_cv_lib_freetype_FT_Init_FreeType=no
28973fi
28974rm -f core conftest.err conftest.$ac_objext \
28975    conftest$ac_exeext conftest.$ac_ext
28976LIBS=$ac_check_lib_save_LIBS
28977fi
28978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
28979$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
28980if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
28981  cat >>confdefs.h <<_ACEOF
28982#define HAVE_LIBFREETYPE 1
28983_ACEOF
28984
28985  LIBS="-lfreetype $LIBS"
28986
28987else
28988  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
28989fi
28990
28991            LDFLAGS="$PREV_LDFLAGS"
28992        fi
28993fi
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003###############################################################################
29004#
29005# Check for alsa headers and libraries. Used on Linux/GNU systems.
29006#
29007
29008# Check whether --with-alsa was given.
29009if test "${with_alsa+set}" = set; then :
29010  withval=$with_alsa;
29011fi
29012
29013
29014# Check whether --with-alsa-include was given.
29015if test "${with_alsa_include+set}" = set; then :
29016  withval=$with_alsa_include;
29017fi
29018
29019
29020# Check whether --with-alsa-lib was given.
29021if test "${with_alsa_lib+set}" = set; then :
29022  withval=$with_alsa_lib;
29023fi
29024
29025
29026if test "x$ALSA_NOT_NEEDED" = xyes; then
29027	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29028		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29029$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29030	fi
29031	ALSA_CFLAGS=
29032	ALSA_LIBS=
29033else
29034	ALSA_FOUND=no
29035
29036	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29037	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29038	fi
29039
29040	if test "x${with_alsa}" != x; then
29041	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29042	    ALSA_CFLAGS="-I${with_alsa}/include"
29043	    ALSA_FOUND=yes
29044	fi
29045	if test "x${with_alsa_include}" != x; then
29046	    ALSA_CFLAGS="-I${with_alsa_include}"
29047	    ALSA_FOUND=yes
29048	fi
29049	if test "x${with_alsa_lib}" != x; then
29050	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29051	    ALSA_FOUND=yes
29052	fi
29053	if test "x$ALSA_FOUND" = xno; then
29054
29055
29056    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29057        # Source the builddeps file again, to make sure it uses the latest variables!
29058        . $builddepsfile
29059        # Look for a target and build machine specific resource!
29060        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29061        if test "x$resource" = x; then
29062            # Ok, lets instead look for a target specific resource
29063            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29064        fi
29065        if test "x$resource" = x; then
29066            # Ok, lets instead look for a build specific resource
29067            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29068        fi
29069        if test "x$resource" = x; then
29070            # Ok, lets instead look for a generic resource
29071            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29072            resource=${builddep_alsa}
29073        fi
29074        if test "x$resource" != x; then
29075            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29076$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29077	    # If the resource in the builddeps.conf file is an existing directory,
29078	    # for example /java/linux/cups
29079	    if test -d ${resource}; then
29080	       depdir=${resource}
29081	    else
29082
29083# alsa is for example mymodule
29084# $resource is for example libs/general/libmymod_1_2_3.zip
29085# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29086# $with_builddeps_dir is for example /localhome/builddeps
29087# depdir is the name of the variable into which we store the depdir, eg MYMOD
29088# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29089# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29090    filename=`basename $resource`
29091    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29092    filebase=${filename%%.*}
29093    extension=${filename#*.}
29094    installdir=$with_builddeps_dir/$filebase
29095    if test ! -f $installdir/$filename.unpacked; then
29096        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29097$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29098        if test ! -d $installdir; then
29099            mkdir -p $installdir
29100        fi
29101        if test ! -d $installdir; then
29102            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29103        fi
29104        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29105        touch $tmpfile
29106        if test ! -f $tmpfile; then
29107            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29108        fi
29109
29110    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29111    # $tmpfile is the local file name for the downloaded file.
29112    VALID_TOOL=no
29113    if test "x$BDEPS_FTP" = xwget; then
29114       VALID_TOOL=yes
29115       wget -O $tmpfile $with_builddeps_server/$resource
29116    fi
29117    if test "x$BDEPS_FTP" = xlftp; then
29118       VALID_TOOL=yes
29119       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29120    fi
29121    if test "x$BDEPS_FTP" = xftp; then
29122        VALID_TOOL=yes
29123        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29124        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29125        FTPUSERPWD=${FTPSERVER%%@*}
29126        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29127            FTPUSER=${userpwd%%:*}
29128            FTPPWD=${userpwd#*@}
29129            FTPSERVER=${FTPSERVER#*@}
29130        else
29131            FTPUSER=ftp
29132            FTPPWD=ftp
29133        fi
29134        # the "pass" command does not work on some
29135        # ftp clients (read ftp.exe) but if it works,
29136        # passive mode is better!
29137        (\
29138            echo "user $FTPUSER $FTPPWD"        ;\
29139            echo "pass"                         ;\
29140            echo "bin"                          ;\
29141            echo "get $FTPPATH $tmpfile"              ;\
29142        ) | ftp -in $FTPSERVER
29143    fi
29144    if test "x$VALID_TOOL" != xyes; then
29145       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29146    fi
29147
29148        mv $tmpfile $installdir/$filename
29149        if test ! -s $installdir/$filename; then
29150            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29151        fi
29152        case "$extension" in
29153            zip)  echo "Unzipping $installdir/$filename..."
29154               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29155            ;;
29156            tar.gz) echo "Untaring $installdir/$filename..."
29157               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29158            ;;
29159            tgz) echo "Untaring $installdir/$filename..."
29160               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29161            ;;
29162            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29163            ;;
29164        esac
29165    fi
29166    if test -f $installdir/$filename.unpacked; then
29167        depdir=$installdir
29168    fi
29169
29170	    fi
29171            # Source the builddeps file again, because in the previous command, the depdir
29172            # was updated to point at the current build dependency install directory.
29173            . $builddepsfile
29174            # Now extract variables from the builddeps.conf files.
29175            theroot=${builddep_alsa_ROOT}
29176            thecflags=${builddep_alsa_CFLAGS}
29177            thelibs=${builddep_alsa_LIBS}
29178            if test "x$depdir" = x; then
29179                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29180            fi
29181            ALSA=$depdir
29182            if test "x$theroot" != x; then
29183               ALSA="$theroot"
29184            fi
29185            if test "x$thecflags" != x; then
29186               ALSA_CFLAGS="$thecflags"
29187            fi
29188            if test "x$thelibs" != x; then
29189               ALSA_LIBS="$thelibs"
29190            fi
29191            ALSA_FOUND=yes
29192            else ALSA_FOUND=no
29193
29194        fi
29195        else ALSA_FOUND=no
29196
29197    fi
29198
29199	fi
29200	if test "x$ALSA_FOUND" = xno; then
29201
29202pkg_failed=no
29203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29204$as_echo_n "checking for ALSA... " >&6; }
29205
29206if test -n "$ALSA_CFLAGS"; then
29207    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29208 elif test -n "$PKG_CONFIG"; then
29209    if test -n "$PKG_CONFIG" && \
29210    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29211  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29212  ac_status=$?
29213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29214  test $ac_status = 0; }; then
29215  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29216else
29217  pkg_failed=yes
29218fi
29219 else
29220    pkg_failed=untried
29221fi
29222if test -n "$ALSA_LIBS"; then
29223    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29224 elif test -n "$PKG_CONFIG"; then
29225    if test -n "$PKG_CONFIG" && \
29226    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29227  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29228  ac_status=$?
29229  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29230  test $ac_status = 0; }; then
29231  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29232else
29233  pkg_failed=yes
29234fi
29235 else
29236    pkg_failed=untried
29237fi
29238
29239
29240
29241if test $pkg_failed = yes; then
29242
29243if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29244        _pkg_short_errors_supported=yes
29245else
29246        _pkg_short_errors_supported=no
29247fi
29248        if test $_pkg_short_errors_supported = yes; then
29249	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29250        else
29251	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29252        fi
29253	# Put the nasty error message in config.log where it belongs
29254	echo "$ALSA_PKG_ERRORS" >&5
29255
29256	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29257$as_echo "no" >&6; }
29258                ALSA_FOUND=no
29259elif test $pkg_failed = untried; then
29260	ALSA_FOUND=no
29261else
29262	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29263	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29265$as_echo "yes" >&6; }
29266	ALSA_FOUND=yes
29267fi
29268	fi
29269	if test "x$ALSA_FOUND" = xno; then
29270	    for ac_header in alsa/asoundlib.h
29271do :
29272  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29273if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29274  cat >>confdefs.h <<_ACEOF
29275#define HAVE_ALSA_ASOUNDLIB_H 1
29276_ACEOF
29277 ALSA_FOUND=yes
29278	                      ALSA_CFLAGS=-Iignoreme
29279	                      ALSA_LIBS=-lasound
29280	                      DEFAULT_ALSA=yes
29281else
29282  ALSA_FOUND=no
29283fi
29284
29285done
29286
29287	fi
29288	if test "x$ALSA_FOUND" = xno; then
29289
29290    # Print a helpful message on how to acquire the necessary build dependency.
29291    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29292    MISSING_DEPENDENCY=alsa
29293    PKGHANDLER_COMMAND=
29294
29295    case $PKGHANDLER in
29296	apt-get)
29297                apt_help     $MISSING_DEPENDENCY ;;
29298    yum)
29299                yum_help     $MISSING_DEPENDENCY ;;
29300	port)
29301                port_help    $MISSING_DEPENDENCY ;;
29302	pkgutil)
29303                pkgutil_help $MISSING_DEPENDENCY ;;
29304	pkgadd)
29305                pkgadd_help  $MISSING_DEPENDENCY ;;
29306    * )
29307      break ;;
29308    esac
29309
29310    if test "x$PKGHANDLER_COMMAND" != x; then
29311        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29312    fi
29313
29314	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29315	fi
29316fi
29317
29318
29319
29320
29321
29322
29323
29324###############################################################################
29325#
29326# Check for the jpeg library
29327#
29328
29329USE_EXTERNAL_LIBJPEG=true
29330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29331$as_echo_n "checking for main in -ljpeg... " >&6; }
29332if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29333  $as_echo_n "(cached) " >&6
29334else
29335  ac_check_lib_save_LIBS=$LIBS
29336LIBS="-ljpeg  $LIBS"
29337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29338/* end confdefs.h.  */
29339
29340
29341int
29342main ()
29343{
29344return main ();
29345  ;
29346  return 0;
29347}
29348_ACEOF
29349if ac_fn_cxx_try_link "$LINENO"; then :
29350  ac_cv_lib_jpeg_main=yes
29351else
29352  ac_cv_lib_jpeg_main=no
29353fi
29354rm -f core conftest.err conftest.$ac_objext \
29355    conftest$ac_exeext conftest.$ac_ext
29356LIBS=$ac_check_lib_save_LIBS
29357fi
29358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29359$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29360if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29361  cat >>confdefs.h <<_ACEOF
29362#define HAVE_LIBJPEG 1
29363_ACEOF
29364
29365  LIBS="-ljpeg $LIBS"
29366
29367else
29368   USE_EXTERNAL_LIBJPEG=false
29369               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
29370$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
29371
29372fi
29373
29374
29375
29376###############################################################################
29377#
29378# Check for the gif library
29379#
29380
29381USE_EXTERNAL_LIBJPEG=true
29382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
29383$as_echo_n "checking for main in -lgif... " >&6; }
29384if test "${ac_cv_lib_gif_main+set}" = set; then :
29385  $as_echo_n "(cached) " >&6
29386else
29387  ac_check_lib_save_LIBS=$LIBS
29388LIBS="-lgif  $LIBS"
29389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29390/* end confdefs.h.  */
29391
29392
29393int
29394main ()
29395{
29396return main ();
29397  ;
29398  return 0;
29399}
29400_ACEOF
29401if ac_fn_cxx_try_link "$LINENO"; then :
29402  ac_cv_lib_gif_main=yes
29403else
29404  ac_cv_lib_gif_main=no
29405fi
29406rm -f core conftest.err conftest.$ac_objext \
29407    conftest$ac_exeext conftest.$ac_ext
29408LIBS=$ac_check_lib_save_LIBS
29409fi
29410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
29411$as_echo "$ac_cv_lib_gif_main" >&6; }
29412if test "x$ac_cv_lib_gif_main" = x""yes; then :
29413  cat >>confdefs.h <<_ACEOF
29414#define HAVE_LIBGIF 1
29415_ACEOF
29416
29417  LIBS="-lgif $LIBS"
29418
29419else
29420   USE_EXTERNAL_LIBGIF=false
29421               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
29422$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
29423
29424fi
29425
29426
29427
29428###############################################################################
29429#
29430# Check for the zlib library
29431#
29432
29433
29434# Check whether --with-zlib was given.
29435if test "${with_zlib+set}" = set; then :
29436  withval=$with_zlib;
29437fi
29438
29439
29440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
29441$as_echo_n "checking for compress in -lz... " >&6; }
29442if test "${ac_cv_lib_z_compress+set}" = set; then :
29443  $as_echo_n "(cached) " >&6
29444else
29445  ac_check_lib_save_LIBS=$LIBS
29446LIBS="-lz  $LIBS"
29447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29448/* end confdefs.h.  */
29449
29450/* Override any GCC internal prototype to avoid an error.
29451   Use char because int might match the return type of a GCC
29452   builtin and then its argument prototype would still apply.  */
29453#ifdef __cplusplus
29454extern "C"
29455#endif
29456char compress ();
29457int
29458main ()
29459{
29460return compress ();
29461  ;
29462  return 0;
29463}
29464_ACEOF
29465if ac_fn_cxx_try_link "$LINENO"; then :
29466  ac_cv_lib_z_compress=yes
29467else
29468  ac_cv_lib_z_compress=no
29469fi
29470rm -f core conftest.err conftest.$ac_objext \
29471    conftest$ac_exeext conftest.$ac_ext
29472LIBS=$ac_check_lib_save_LIBS
29473fi
29474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
29475$as_echo "$ac_cv_lib_z_compress" >&6; }
29476if test "x$ac_cv_lib_z_compress" = x""yes; then :
29477   ZLIB_FOUND=yes
29478else
29479   ZLIB_FOUND=no
29480fi
29481
29482
29483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
29484$as_echo_n "checking for which zlib to use... " >&6; }
29485
29486DEFAULT_ZLIB=bundled
29487if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29488#
29489# On macosx default is system...on others default is
29490#
29491    DEFAULT_ZLIB=system
29492fi
29493
29494if test "x${ZLIB_FOUND}" != "xyes"; then
29495#
29496# If we don't find any system...set default to bundled
29497#
29498    DEFAULT_ZLIB=bundled
29499fi
29500
29501#
29502# If user didn't specify, use DEFAULT_ZLIB
29503#
29504if test "x${with_zlib}" = "x"; then
29505    with_zlib=${DEFAULT_ZLIB}
29506fi
29507
29508if test "x${with_zlib}" = "xbundled"; then
29509    USE_EXTERNAL_LIBZ=false
29510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
29511$as_echo "bundled" >&6; }
29512elif test "x${with_zlib}" = "xsystem"; then
29513    if test "x${ZLIB_FOUND}" = "xyes"; then
29514        USE_EXTERNAL_LIBZ=true
29515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
29516$as_echo "system" >&6; }
29517    else
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
29519$as_echo "system not found" >&6; }
29520        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
29521    fi
29522else
29523    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
29524fi
29525
29526
29527
29528###############################################################################
29529LIBZIP_CAN_USE_MMAP=true
29530
29531
29532
29533###############################################################################
29534#
29535# Check if altzone exists in time.h
29536#
29537
29538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29539/* end confdefs.h.  */
29540#include <time.h>
29541int
29542main ()
29543{
29544return (int)altzone;
29545  ;
29546  return 0;
29547}
29548_ACEOF
29549if ac_fn_cxx_try_link "$LINENO"; then :
29550  has_altzone=yes
29551else
29552  has_altzone=no
29553fi
29554rm -f core conftest.err conftest.$ac_objext \
29555    conftest$ac_exeext conftest.$ac_ext
29556if test "x$has_altzone" = xyes; then
29557
29558$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
29559
29560fi
29561
29562###############################################################################
29563#
29564# Check the maths library
29565#
29566
29567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
29568$as_echo_n "checking for cos in -lm... " >&6; }
29569if test "${ac_cv_lib_m_cos+set}" = set; then :
29570  $as_echo_n "(cached) " >&6
29571else
29572  ac_check_lib_save_LIBS=$LIBS
29573LIBS="-lm  $LIBS"
29574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29575/* end confdefs.h.  */
29576
29577/* Override any GCC internal prototype to avoid an error.
29578   Use char because int might match the return type of a GCC
29579   builtin and then its argument prototype would still apply.  */
29580#ifdef __cplusplus
29581extern "C"
29582#endif
29583char cos ();
29584int
29585main ()
29586{
29587return cos ();
29588  ;
29589  return 0;
29590}
29591_ACEOF
29592if ac_fn_cxx_try_link "$LINENO"; then :
29593  ac_cv_lib_m_cos=yes
29594else
29595  ac_cv_lib_m_cos=no
29596fi
29597rm -f core conftest.err conftest.$ac_objext \
29598    conftest$ac_exeext conftest.$ac_ext
29599LIBS=$ac_check_lib_save_LIBS
29600fi
29601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
29602$as_echo "$ac_cv_lib_m_cos" >&6; }
29603if test "x$ac_cv_lib_m_cos" = x""yes; then :
29604  cat >>confdefs.h <<_ACEOF
29605#define HAVE_LIBM 1
29606_ACEOF
29607
29608  LIBS="-lm $LIBS"
29609
29610else
29611
29612                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
29613$as_echo "$as_me: Maths library was not found" >&6;}
29614
29615fi
29616
29617
29618
29619###############################################################################
29620#
29621# Check for libdl.so
29622
29623save_LIBS="$LIBS"
29624LIBS=""
29625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
29626$as_echo_n "checking for dlopen in -ldl... " >&6; }
29627if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
29628  $as_echo_n "(cached) " >&6
29629else
29630  ac_check_lib_save_LIBS=$LIBS
29631LIBS="-ldl  $LIBS"
29632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29633/* end confdefs.h.  */
29634
29635/* Override any GCC internal prototype to avoid an error.
29636   Use char because int might match the return type of a GCC
29637   builtin and then its argument prototype would still apply.  */
29638#ifdef __cplusplus
29639extern "C"
29640#endif
29641char dlopen ();
29642int
29643main ()
29644{
29645return dlopen ();
29646  ;
29647  return 0;
29648}
29649_ACEOF
29650if ac_fn_cxx_try_link "$LINENO"; then :
29651  ac_cv_lib_dl_dlopen=yes
29652else
29653  ac_cv_lib_dl_dlopen=no
29654fi
29655rm -f core conftest.err conftest.$ac_objext \
29656    conftest$ac_exeext conftest.$ac_ext
29657LIBS=$ac_check_lib_save_LIBS
29658fi
29659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
29660$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
29661if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
29662  cat >>confdefs.h <<_ACEOF
29663#define HAVE_LIBDL 1
29664_ACEOF
29665
29666  LIBS="-ldl $LIBS"
29667
29668fi
29669
29670LIBDL="$LIBS"
29671
29672LIBS="$save_LIBS"
29673
29674
29675
29676###############################################################################
29677#
29678# statically link libstdc++ before C++ ABI is stablized on Linux unless
29679# dynamic build is configured on command line.
29680#
29681# Check whether --enable-static-link-stdc++ was given.
29682if test "${enable_static_link_stdc__+set}" = set; then :
29683  enableval=$enable_static_link_stdc__;
29684else
29685
29686		enable_static_link_stdc__=yes
29687
29688fi
29689
29690
29691if test "x$OPENJDK_TARGET_OS" = xlinux; then
29692    # Test if -lstdc++ works.
29693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
29694$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
29695    ac_ext=cpp
29696ac_cpp='$CXXCPP $CPPFLAGS'
29697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29700
29701    OLD_CXXFLAGS="$CXXFLAGS"
29702    CXXFLAGS="$CXXFLAGS -lstdc++"
29703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29704/* end confdefs.h.  */
29705
29706int
29707main ()
29708{
29709return 0;
29710  ;
29711  return 0;
29712}
29713_ACEOF
29714if ac_fn_cxx_try_link "$LINENO"; then :
29715  has_dynamic_libstdcxx=yes
29716else
29717  has_dynamic_libstdcxx=no
29718fi
29719rm -f core conftest.err conftest.$ac_objext \
29720    conftest$ac_exeext conftest.$ac_ext
29721    CXXFLAGS="$OLD_CXXFLAGS"
29722    ac_ext=cpp
29723ac_cpp='$CXXCPP $CPPFLAGS'
29724ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29725ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29726ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29727
29728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
29729$as_echo "$has_dynamic_libstdcxx" >&6; }
29730
29731    # Test if stdc++ can be linked statically.
29732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
29733$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
29734    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
29735    ac_ext=cpp
29736ac_cpp='$CXXCPP $CPPFLAGS'
29737ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29738ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29739ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29740
29741    OLD_LIBS="$LIBS"
29742    OLD_CXX="$CXX"
29743    LIBS="$STATIC_STDCXX_FLAGS"
29744    CXX="$CC"
29745    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29746/* end confdefs.h.  */
29747
29748int
29749main ()
29750{
29751return 0;
29752  ;
29753  return 0;
29754}
29755_ACEOF
29756if ac_fn_cxx_try_link "$LINENO"; then :
29757  has_static_libstdcxx=yes
29758else
29759  has_static_libstdcxx=no
29760fi
29761rm -f core conftest.err conftest.$ac_objext \
29762    conftest$ac_exeext conftest.$ac_ext
29763    LIBS="$OLD_LIBS"
29764    CXX="$OLD_CXX"
29765    ac_ext=cpp
29766ac_cpp='$CXXCPP $CPPFLAGS'
29767ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29768ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29769ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29770
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
29772$as_echo "$has_static_libstdcxx" >&6; }
29773
29774    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
29775        as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
29776    fi
29777
29778    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
29779        { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
29780$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
29781        enable_static_link_stdc__=no
29782    fi
29783
29784    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
29785        { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
29786$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
29787        enable_static_link_stdc__=yes
29788    fi
29789
29790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
29791$as_echo_n "checking how to link with libstdc++... " >&6; }
29792    if test "x$enable_static_link_stdc__" = xyes; then
29793        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
29794        LDCXX="$CC"
29795        STATIC_CXX_SETTING="STATIC_CXX=true"
29796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
29797$as_echo "static" >&6; }
29798    else
29799        LIBCXX="$LIBCXX -lstdc++"
29800        LDCXX="$CXX"
29801        STATIC_CXX_SETTING="STATIC_CXX=false"
29802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
29803$as_echo "dynamic" >&6; }
29804    fi
29805fi
29806
29807
29808# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
29809if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
29810    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
29811fi
29812
29813# TODO better (platform agnostic) test
29814if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
29815    LIBCXX="-lstdc++"
29816fi
29817
29818
29819
29820
29821
29822# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
29823
29824# When using cygwin or msys, we need a wrapper binary that renames
29825# /cygdrive/c/ arguments into c:/ arguments and peeks into
29826# @files and rewrites these too! This wrapper binary is
29827# called fixpath.
29828FIXPATH=
29829if test "x$OPENJDK_BUILD_OS" = xwindows; then
29830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29831$as_echo_n "checking if fixpath can be created... " >&6; }
29832    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29833    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29834    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29835      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29836      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29837      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29838      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29839    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29840      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29841      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29842
29843      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29844      # @ was chosen as separator to minimize risk of other tools messing around with it
29845      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29846      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29847
29848      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29849    fi
29850    rm -f $OUTPUT_ROOT/fixpath*
29851    cd $OUTPUT_ROOT
29852    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29853    cd $CURDIR
29854
29855    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29857$as_echo "no" >&6; }
29858        cat $OUTPUT_ROOT/fixpath1.log
29859        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
29860    fi
29861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29862$as_echo "yes" >&6; }
29863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
29864$as_echo_n "checking if fixpath.exe works... " >&6; }
29865    cd $OUTPUT_ROOT
29866    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
29867    cd $CURDIR
29868    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
29869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29870$as_echo "no" >&6; }
29871        cat $OUTPUT_ROOT/fixpath2.log
29872        as_fn_error $? "fixpath did not work!" "$LINENO" 5
29873    fi
29874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29875$as_echo "yes" >&6; }
29876    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
29877fi
29878
29879
29880
29881
29882###############################################################################
29883#
29884# We need to do some final tweaking, when everything else is done.
29885#
29886###############################################################################
29887
29888
29889HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
29890
29891
29892# The name of the Service Agent jar.
29893SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
29894if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29895    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
29896fi
29897
29898
29899
29900
29901###############################################################################
29902#
29903# Configure parts of the build that only affect the build performance,
29904# not the result.
29905#
29906###############################################################################
29907
29908
29909# How many cores do we have on this build system?
29910
29911# Check whether --with-num-cores was given.
29912if test "${with_num_cores+set}" = set; then :
29913  withval=$with_num_cores;
29914fi
29915
29916if test "x$with_num_cores" = x; then
29917    # The number of cores were not specified, try to probe them.
29918
29919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
29920$as_echo_n "checking for number of cores... " >&6; }
29921    NUM_CORES=1
29922    FOUND_CORES=no
29923
29924    if test -f /proc/cpuinfo; then
29925        # Looks like a Linux (or cygwin) system
29926        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
29927        FOUND_CORES=yes
29928    elif test -x /usr/sbin/psrinfo; then
29929        # Looks like a Solaris system
29930        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
29931        FOUND_CORES=yes
29932    elif test -x /usr/sbin/system_profiler; then
29933        # Looks like a MacOSX system
29934        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
29935        FOUND_CORES=yes
29936    elif test -n "$NUMBER_OF_PROCESSORS"; then
29937        # On windows, look in the env
29938        NUM_CORES=$NUMBER_OF_PROCESSORS
29939        FOUND_CORES=yes
29940    fi
29941
29942    # For c/c++ code we run twice as many concurrent build
29943    # jobs than we have cores, otherwise we will stall on io.
29944    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
29945
29946    if test "x$FOUND_CORES" = xyes; then
29947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
29948$as_echo "$NUM_CORES" >&6; }
29949    else
29950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
29951$as_echo "could not detect number of cores, defaulting to 1" >&6; }
29952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
29953$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
29954    fi
29955
29956
29957else
29958    NUM_CORES=$with_num_cores
29959    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
29960fi
29961
29962
29963
29964
29965# How much memory do we have on this build system?
29966
29967# Check whether --with-memory-size was given.
29968if test "${with_memory_size+set}" = set; then :
29969  withval=$with_memory_size;
29970fi
29971
29972if test "x$with_memory_size" = x; then
29973    # The memory size was not specified, try to probe it.
29974
29975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
29976$as_echo_n "checking for memory size... " >&6; }
29977    # Default to 1024 MB
29978    MEMORY_SIZE=1024
29979    FOUND_MEM=no
29980
29981    if test -f /proc/meminfo; then
29982        # Looks like a Linux (or cygwin) system
29983        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
29984        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
29985        FOUND_MEM=yes
29986    elif test -x /usr/sbin/prtconf; then
29987        # Looks like a Solaris system
29988        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
29989        FOUND_MEM=yes
29990    elif test -x /usr/sbin/system_profiler; then
29991        # Looks like a MacOSX system
29992        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
29993        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
29994        FOUND_MEM=yes
29995    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
29996        # Windows, but without cygwin
29997        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
29998        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
29999        FOUND_MEM=yes
30000    fi
30001
30002    if test "x$FOUND_MEM" = xyes; then
30003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30004$as_echo "$MEMORY_SIZE MB" >&6; }
30005    else
30006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30007$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30008        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30009$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30010    fi
30011
30012else
30013    MEMORY_SIZE=$with_memory_size
30014fi
30015
30016
30017
30018# Setup smart javac (after cores and memory have been setup)
30019
30020
30021# Check whether --with-sjavac-server-java was given.
30022if test "${with_sjavac_server_java+set}" = set; then :
30023  withval=$with_sjavac_server_java;
30024fi
30025
30026
30027if test "x$with_sjavac_server_java" != x; then
30028    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30029    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30030    if test "x$FOUND_VERSION" = x; then
30031        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30032    fi
30033else
30034    SJAVAC_SERVER_JAVA=""
30035    # Hotspot specific options.
30036
30037    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30038    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30039    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30040    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30041    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30042        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30043    fi
30044
30045    # JRockit specific options.
30046
30047    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30048    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30049    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30050    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30051    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30052        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30053    fi
30054
30055    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30056fi
30057
30058
30059
30060# Check whether --with-sjavac-server-cores was given.
30061if test "${with_sjavac_server_cores+set}" = set; then :
30062  withval=$with_sjavac_server_cores;
30063fi
30064
30065if test "x$with_sjavac_server_cores" != x; then
30066    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30067else
30068    if test "$NUM_CORES" -gt 16; then
30069        # We set this arbitrary limit because we want to limit the heap
30070        # size of the javac server.
30071        # In the future we will make the javac compilers in the server
30072        # share more and more state, thus enabling us to use more and
30073        # more concurrent threads in the server.
30074        SJAVAC_SERVER_CORES="16"
30075    else
30076        SJAVAC_SERVER_CORES="$NUM_CORES"
30077    fi
30078
30079    if test "$MEMORY_SIZE" -gt "17000"; then
30080        MAX_HEAP_MEM=10000
30081
30082    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30083    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30084    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30085    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30086    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30087        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30088    fi
30089
30090
30091    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30092    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30093    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30094    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30095    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30096        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30097    fi
30098
30099    elif test "$MEMORY_SIZE" -gt "10000"; then
30100        MAX_HEAP_MEM=6000
30101
30102    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30103    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30104    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30105    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30106    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30107        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30108    fi
30109
30110
30111    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30112    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30113    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30114    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30115    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30116        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30117    fi
30118
30119    elif test "$MEMORY_SIZE" -gt "5000"; then
30120        MAX_HEAP_MEM=3000
30121
30122    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30123    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30124    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30125    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30126    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30127        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30128    fi
30129
30130
30131    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30132    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30133    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30134    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30135    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30136        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30137    fi
30138
30139    elif test "$MEMORY_SIZE" -gt "3800"; then
30140        MAX_HEAP_MEM=2500
30141
30142    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30143    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30144    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30145    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30146    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30147        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30148    fi
30149
30150    elif test "$MEMORY_SIZE" -gt "1900"; then
30151        MAX_HEAP_MEM=1200
30152
30153    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30154    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30155    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30156    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30157    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30158        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30159    fi
30160
30161    elif test "$MEMORY_SIZE" -gt "1000"; then
30162        MAX_HEAP_MEM=900
30163
30164    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30165    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30166    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30167    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30168    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30169        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30170    fi
30171
30172    else
30173        MAX_HEAP_MEM=512
30174
30175    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30176    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30177    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30178    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30179    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30180        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30181    fi
30182
30183    fi
30184
30185
30186    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30187    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30188    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30189    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30190    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30191        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30192    fi
30193
30194
30195    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30196    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30197    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30198    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30199    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30200        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30201    fi
30202
30203
30204    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30205    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30206    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30207    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30208    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30209        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30210    fi
30211
30212
30213    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30214    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30216$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30217        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30219$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30220    fi
30221fi
30222
30223
30224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30225$as_echo_n "checking whether to use sjavac... " >&6; }
30226# Check whether --enable-sjavac was given.
30227if test "${enable_sjavac+set}" = set; then :
30228  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30229else
30230  ENABLE_SJAVAC='no'
30231fi
30232
30233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30234$as_echo "$ENABLE_SJAVAC" >&6; }
30235
30236
30237if test "x$ENABLE_SJAVAC" = xyes; then
30238    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30239else
30240    SJAVAC_SERVER_DIR=
30241fi
30242
30243
30244
30245
30246# Can the C/C++ compiler use precompiled headers?
30247
30248
30249###############################################################################
30250#
30251# Can the C/C++ compiler use precompiled headers?
30252#
30253# Check whether --enable-precompiled-headers was given.
30254if test "${enable_precompiled_headers+set}" = set; then :
30255  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
30256else
30257  ENABLE_PRECOMPH=yes
30258fi
30259
30260
30261USE_PRECOMPILED_HEADER=1
30262if test "x$ENABLE_PRECOMPH" = xno; then
30263    USE_PRECOMPILED_HEADER=0
30264fi
30265
30266if test "x$ENABLE_PRECOMPH" = xyes; then
30267    # Check that the compiler actually supports precomp headers.
30268    if test "x$GCC" = xyes; then
30269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30270$as_echo_n "checking that precompiled headers work... " >&6; }
30271         echo "int alfa();" > conftest.h
30272         $CXX -x c++-header conftest.h -o conftest.hpp.gch
30273         if test ! -f conftest.hpp.gch; then
30274             echo Precompiled header is not working!
30275             USE_PRECOMPILED_HEADER=0
30276             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30277$as_echo "no" >&6; }
30278         else
30279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30280$as_echo "yes" >&6; }
30281         fi
30282         rm -f conftest.h
30283    fi
30284fi
30285
30286
30287
30288
30289# Setup use of ccache, if available
30290
30291    # Check whether --enable-ccache was given.
30292if test "${enable_ccache+set}" = set; then :
30293  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30294else
30295  ENABLE_CCACHE=yes
30296fi
30297
30298    if test "x$ENABLE_CCACHE" = xyes; then
30299        # Extract the first word of "ccache", so it can be a program name with args.
30300set dummy ccache; ac_word=$2
30301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30302$as_echo_n "checking for $ac_word... " >&6; }
30303if test "${ac_cv_path_CCACHE+set}" = set; then :
30304  $as_echo_n "(cached) " >&6
30305else
30306  case $CCACHE in
30307  [\\/]* | ?:[\\/]*)
30308  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30309  ;;
30310  *)
30311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30312for as_dir in $PATH
30313do
30314  IFS=$as_save_IFS
30315  test -z "$as_dir" && as_dir=.
30316    for ac_exec_ext in '' $ac_executable_extensions; do
30317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30318    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30320    break 2
30321  fi
30322done
30323  done
30324IFS=$as_save_IFS
30325
30326  ;;
30327esac
30328fi
30329CCACHE=$ac_cv_path_CCACHE
30330if test -n "$CCACHE"; then
30331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30332$as_echo "$CCACHE" >&6; }
30333else
30334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30335$as_echo "no" >&6; }
30336fi
30337
30338
30339    else
30340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30341$as_echo_n "checking for ccache... " >&6; }
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30343$as_echo "explicitly disabled" >&6; }
30344        CCACHE=
30345    fi
30346
30347
30348
30349# Check whether --with-ccache-dir was given.
30350if test "${with_ccache_dir+set}" = set; then :
30351  withval=$with_ccache_dir;
30352fi
30353
30354
30355    if test "x$with_ccache_dir" != x; then
30356        # When using a non home ccache directory, assume the use is to share ccache files
30357        # with other users. Thus change the umask.
30358        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30359    fi
30360    CCACHE_FOUND=""
30361    if test "x$CCACHE" != x; then
30362
30363    if test "x$CCACHE" != x; then
30364        CCACHE_FOUND="true"
30365        # Only use ccache if it is 3.1.4 or later, which supports
30366        # precompiled headers.
30367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
30368$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
30369        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
30370        if test "x$HAS_GOOD_CCACHE" = x; then
30371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
30372$as_echo "no, disabling ccache" >&6; }
30373            CCACHE=
30374        else
30375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30376$as_echo "yes" >&6; }
30377            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
30378$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
30379            PUSHED_FLAGS="$CXXFLAGS"
30380            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
30381            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30382/* end confdefs.h.  */
30383
30384int
30385main ()
30386{
30387
30388  ;
30389  return 0;
30390}
30391_ACEOF
30392if ac_fn_cxx_try_compile "$LINENO"; then :
30393  CC_KNOWS_CCACHE_TRICK=yes
30394else
30395  CC_KNOWS_CCACHE_TRICK=no
30396fi
30397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30398            CXXFLAGS="$PUSHED_FLAGS"
30399            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
30400                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30401$as_echo "yes" >&6; }
30402            else
30403                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
30404$as_echo "no, disabling ccaching of precompiled headers" >&6; }
30405                CCACHE=
30406            fi
30407        fi
30408    fi
30409
30410    if test "x$CCACHE" != x; then
30411        CCACHE_SLOPPINESS=time_macros
30412        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
30413        CCACHE_FLAGS=-fpch-preprocess
30414
30415        if test "x$SET_CCACHE_DIR" != x; then
30416            mkdir -p $CCACHE_DIR > /dev/null 2>&1
30417	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
30418        fi
30419    fi
30420
30421    fi
30422
30423
30424###############################################################################
30425#
30426# And now the finish...
30427#
30428###############################################################################
30429
30430# Check for some common pitfalls
30431
30432
30433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
30434$as_echo_n "checking if build directory is on local disk... " >&6; }
30435
30436	# df -l lists only local disks; if the given directory is not found then
30437	# a non-zero exit code is given
30438  if test "x$DF" = x; then
30439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30440      # msys does not have df; use Windows "net use" instead.
30441      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
30442      if test "x$IS_NETWORK_DISK" = x; then
30443        OUTPUT_DIR_IS_LOCAL="yes"
30444      else
30445        OUTPUT_DIR_IS_LOCAL="no"
30446      fi
30447    else
30448      # No df here, say it's local
30449      OUTPUT_DIR_IS_LOCAL="yes"
30450    fi
30451  else
30452    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
30453      OUTPUT_DIR_IS_LOCAL="yes"
30454    else
30455      OUTPUT_DIR_IS_LOCAL="no"
30456    fi
30457  fi
30458
30459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
30460$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
30461
30462# Check if the user has any old-style ALT_ variables set.
30463FOUND_ALT_VARIABLES=`env | grep ^ALT_`
30464
30465# Before generating output files, test if they exist. If they do, this is a reconfigure.
30466# Since we can't properly handle the dependencies for this, warn the user about the situation
30467if test -e $OUTPUT_ROOT/spec.gmk; then
30468  IS_RECONFIGURE=yes
30469else
30470  IS_RECONFIGURE=no
30471fi
30472
30473if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
30474  HIDE_PERFORMANCE_HINTS=yes
30475else
30476  HIDE_PERFORMANCE_HINTS=no
30477  # Hide it the next time around...
30478  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
30479fi
30480
30481
30482
30483# At the end, call the custom hook. (Dummy macro if no custom sources available)
30484
30485
30486# We're messing a bit with internal autoconf variables to put the config.status
30487# in the output directory instead of the current directory.
30488CONFIG_STATUS="$OUTPUT_ROOT/config.status"
30489# Create the actual output files. Now the main work of configure is done.
30490cat >confcache <<\_ACEOF
30491# This file is a shell script that caches the results of configure
30492# tests run on this system so they can be shared between configure
30493# scripts and configure runs, see configure's option --config-cache.
30494# It is not useful on other systems.  If it contains results you don't
30495# want to keep, you may remove or edit it.
30496#
30497# config.status only pays attention to the cache file if you give it
30498# the --recheck option to rerun configure.
30499#
30500# `ac_cv_env_foo' variables (set or unset) will be overridden when
30501# loading this file, other *unset* `ac_cv_foo' will be assigned the
30502# following values.
30503
30504_ACEOF
30505
30506# The following way of writing the cache mishandles newlines in values,
30507# but we know of no workaround that is simple, portable, and efficient.
30508# So, we kill variables containing newlines.
30509# Ultrix sh set writes to stderr and can't be redirected directly,
30510# and sets the high bit in the cache file unless we assign to the vars.
30511(
30512  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30513    eval ac_val=\$$ac_var
30514    case $ac_val in #(
30515    *${as_nl}*)
30516      case $ac_var in #(
30517      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30518$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30519      esac
30520      case $ac_var in #(
30521      _ | IFS | as_nl) ;; #(
30522      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30523      *) { eval $ac_var=; unset $ac_var;} ;;
30524      esac ;;
30525    esac
30526  done
30527
30528  (set) 2>&1 |
30529    case $as_nl`(ac_space=' '; set) 2>&1` in #(
30530    *${as_nl}ac_space=\ *)
30531      # `set' does not quote correctly, so add quotes: double-quote
30532      # substitution turns \\\\ into \\, and sed turns \\ into \.
30533      sed -n \
30534	"s/'/'\\\\''/g;
30535	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30536      ;; #(
30537    *)
30538      # `set' quotes correctly as required by POSIX, so do not add quotes.
30539      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30540      ;;
30541    esac |
30542    sort
30543) |
30544  sed '
30545     /^ac_cv_env_/b end
30546     t clear
30547     :clear
30548     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30549     t end
30550     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30551     :end' >>confcache
30552if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30553  if test -w "$cache_file"; then
30554    test "x$cache_file" != "x/dev/null" &&
30555      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30556$as_echo "$as_me: updating cache $cache_file" >&6;}
30557    cat confcache >$cache_file
30558  else
30559    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30560$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30561  fi
30562fi
30563rm -f confcache
30564
30565test "x$prefix" = xNONE && prefix=$ac_default_prefix
30566# Let make expand exec_prefix.
30567test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30568
30569DEFS=-DHAVE_CONFIG_H
30570
30571ac_libobjs=
30572ac_ltlibobjs=
30573U=
30574for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30575  # 1. Remove the extension, and $U if already installed.
30576  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30577  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30578  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30579  #    will be set to the directory where LIBOBJS objects are built.
30580  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30581  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30582done
30583LIBOBJS=$ac_libobjs
30584
30585LTLIBOBJS=$ac_ltlibobjs
30586
30587
30588
30589: ${CONFIG_STATUS=./config.status}
30590ac_write_fail=0
30591ac_clean_files_save=$ac_clean_files
30592ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30593{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30594$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30595as_write_fail=0
30596cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30597#! $SHELL
30598# Generated by $as_me.
30599# Run this file to recreate the current configuration.
30600# Compiler output produced by configure, useful for debugging
30601# configure, is in config.log if it exists.
30602
30603debug=false
30604ac_cs_recheck=false
30605ac_cs_silent=false
30606
30607SHELL=\${CONFIG_SHELL-$SHELL}
30608export SHELL
30609_ASEOF
30610cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30611## -------------------- ##
30612## M4sh Initialization. ##
30613## -------------------- ##
30614
30615# Be more Bourne compatible
30616DUALCASE=1; export DUALCASE # for MKS sh
30617if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30618  emulate sh
30619  NULLCMD=:
30620  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30621  # is contrary to our usage.  Disable this feature.
30622  alias -g '${1+"$@"}'='"$@"'
30623  setopt NO_GLOB_SUBST
30624else
30625  case `(set -o) 2>/dev/null` in #(
30626  *posix*) :
30627    set -o posix ;; #(
30628  *) :
30629     ;;
30630esac
30631fi
30632
30633
30634as_nl='
30635'
30636export as_nl
30637# Printing a long string crashes Solaris 7 /usr/bin/printf.
30638as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30639as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30640as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30641# Prefer a ksh shell builtin over an external printf program on Solaris,
30642# but without wasting forks for bash or zsh.
30643if test -z "$BASH_VERSION$ZSH_VERSION" \
30644    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30645  as_echo='print -r --'
30646  as_echo_n='print -rn --'
30647elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30648  as_echo='printf %s\n'
30649  as_echo_n='printf %s'
30650else
30651  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30652    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30653    as_echo_n='/usr/ucb/echo -n'
30654  else
30655    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30656    as_echo_n_body='eval
30657      arg=$1;
30658      case $arg in #(
30659      *"$as_nl"*)
30660	expr "X$arg" : "X\\(.*\\)$as_nl";
30661	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30662      esac;
30663      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30664    '
30665    export as_echo_n_body
30666    as_echo_n='sh -c $as_echo_n_body as_echo'
30667  fi
30668  export as_echo_body
30669  as_echo='sh -c $as_echo_body as_echo'
30670fi
30671
30672# The user is always right.
30673if test "${PATH_SEPARATOR+set}" != set; then
30674  PATH_SEPARATOR=:
30675  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30676    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30677      PATH_SEPARATOR=';'
30678  }
30679fi
30680
30681
30682# IFS
30683# We need space, tab and new line, in precisely that order.  Quoting is
30684# there to prevent editors from complaining about space-tab.
30685# (If _AS_PATH_WALK were called with IFS unset, it would disable word
30686# splitting by setting IFS to empty value.)
30687IFS=" ""	$as_nl"
30688
30689# Find who we are.  Look in the path if we contain no directory separator.
30690case $0 in #((
30691  *[\\/]* ) as_myself=$0 ;;
30692  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30693for as_dir in $PATH
30694do
30695  IFS=$as_save_IFS
30696  test -z "$as_dir" && as_dir=.
30697    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30698  done
30699IFS=$as_save_IFS
30700
30701     ;;
30702esac
30703# We did not find ourselves, most probably we were run as `sh COMMAND'
30704# in which case we are not to be found in the path.
30705if test "x$as_myself" = x; then
30706  as_myself=$0
30707fi
30708if test ! -f "$as_myself"; then
30709  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30710  exit 1
30711fi
30712
30713# Unset variables that we do not need and which cause bugs (e.g. in
30714# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30715# suppresses any "Segmentation fault" message there.  '((' could
30716# trigger a bug in pdksh 5.2.14.
30717for as_var in BASH_ENV ENV MAIL MAILPATH
30718do eval test x\${$as_var+set} = xset \
30719  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30720done
30721PS1='$ '
30722PS2='> '
30723PS4='+ '
30724
30725# NLS nuisances.
30726LC_ALL=C
30727export LC_ALL
30728LANGUAGE=C
30729export LANGUAGE
30730
30731# CDPATH.
30732(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30733
30734
30735# as_fn_error STATUS ERROR [LINENO LOG_FD]
30736# ----------------------------------------
30737# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30738# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30739# script with STATUS, using 1 if that was 0.
30740as_fn_error ()
30741{
30742  as_status=$1; test $as_status -eq 0 && as_status=1
30743  if test "$4"; then
30744    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30745    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30746  fi
30747  $as_echo "$as_me: error: $2" >&2
30748  as_fn_exit $as_status
30749} # as_fn_error
30750
30751
30752# as_fn_set_status STATUS
30753# -----------------------
30754# Set $? to STATUS, without forking.
30755as_fn_set_status ()
30756{
30757  return $1
30758} # as_fn_set_status
30759
30760# as_fn_exit STATUS
30761# -----------------
30762# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30763as_fn_exit ()
30764{
30765  set +e
30766  as_fn_set_status $1
30767  exit $1
30768} # as_fn_exit
30769
30770# as_fn_unset VAR
30771# ---------------
30772# Portably unset VAR.
30773as_fn_unset ()
30774{
30775  { eval $1=; unset $1;}
30776}
30777as_unset=as_fn_unset
30778# as_fn_append VAR VALUE
30779# ----------------------
30780# Append the text in VALUE to the end of the definition contained in VAR. Take
30781# advantage of any shell optimizations that allow amortized linear growth over
30782# repeated appends, instead of the typical quadratic growth present in naive
30783# implementations.
30784if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30785  eval 'as_fn_append ()
30786  {
30787    eval $1+=\$2
30788  }'
30789else
30790  as_fn_append ()
30791  {
30792    eval $1=\$$1\$2
30793  }
30794fi # as_fn_append
30795
30796# as_fn_arith ARG...
30797# ------------------
30798# Perform arithmetic evaluation on the ARGs, and store the result in the
30799# global $as_val. Take advantage of shells that can avoid forks. The arguments
30800# must be portable across $(()) and expr.
30801if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30802  eval 'as_fn_arith ()
30803  {
30804    as_val=$(( $* ))
30805  }'
30806else
30807  as_fn_arith ()
30808  {
30809    as_val=`expr "$@" || test $? -eq 1`
30810  }
30811fi # as_fn_arith
30812
30813
30814if expr a : '\(a\)' >/dev/null 2>&1 &&
30815   test "X`expr 00001 : '.*\(...\)'`" = X001; then
30816  as_expr=expr
30817else
30818  as_expr=false
30819fi
30820
30821if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30822  as_basename=basename
30823else
30824  as_basename=false
30825fi
30826
30827if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30828  as_dirname=dirname
30829else
30830  as_dirname=false
30831fi
30832
30833as_me=`$as_basename -- "$0" ||
30834$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30835	 X"$0" : 'X\(//\)$' \| \
30836	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30837$as_echo X/"$0" |
30838    sed '/^.*\/\([^/][^/]*\)\/*$/{
30839	    s//\1/
30840	    q
30841	  }
30842	  /^X\/\(\/\/\)$/{
30843	    s//\1/
30844	    q
30845	  }
30846	  /^X\/\(\/\).*/{
30847	    s//\1/
30848	    q
30849	  }
30850	  s/.*/./; q'`
30851
30852# Avoid depending upon Character Ranges.
30853as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30854as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30855as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30856as_cr_digits='0123456789'
30857as_cr_alnum=$as_cr_Letters$as_cr_digits
30858
30859ECHO_C= ECHO_N= ECHO_T=
30860case `echo -n x` in #(((((
30861-n*)
30862  case `echo 'xy\c'` in
30863  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
30864  xy)  ECHO_C='\c';;
30865  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
30866       ECHO_T='	';;
30867  esac;;
30868*)
30869  ECHO_N='-n';;
30870esac
30871
30872rm -f conf$$ conf$$.exe conf$$.file
30873if test -d conf$$.dir; then
30874  rm -f conf$$.dir/conf$$.file
30875else
30876  rm -f conf$$.dir
30877  mkdir conf$$.dir 2>/dev/null
30878fi
30879if (echo >conf$$.file) 2>/dev/null; then
30880  if ln -s conf$$.file conf$$ 2>/dev/null; then
30881    as_ln_s='ln -s'
30882    # ... but there are two gotchas:
30883    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30884    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30885    # In both cases, we have to default to `cp -p'.
30886    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30887      as_ln_s='cp -p'
30888  elif ln conf$$.file conf$$ 2>/dev/null; then
30889    as_ln_s=ln
30890  else
30891    as_ln_s='cp -p'
30892  fi
30893else
30894  as_ln_s='cp -p'
30895fi
30896rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30897rmdir conf$$.dir 2>/dev/null
30898
30899
30900# as_fn_mkdir_p
30901# -------------
30902# Create "$as_dir" as a directory, including parents if necessary.
30903as_fn_mkdir_p ()
30904{
30905
30906  case $as_dir in #(
30907  -*) as_dir=./$as_dir;;
30908  esac
30909  test -d "$as_dir" || eval $as_mkdir_p || {
30910    as_dirs=
30911    while :; do
30912      case $as_dir in #(
30913      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30914      *) as_qdir=$as_dir;;
30915      esac
30916      as_dirs="'$as_qdir' $as_dirs"
30917      as_dir=`$as_dirname -- "$as_dir" ||
30918$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30919	 X"$as_dir" : 'X\(//\)[^/]' \| \
30920	 X"$as_dir" : 'X\(//\)$' \| \
30921	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30922$as_echo X"$as_dir" |
30923    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30924	    s//\1/
30925	    q
30926	  }
30927	  /^X\(\/\/\)[^/].*/{
30928	    s//\1/
30929	    q
30930	  }
30931	  /^X\(\/\/\)$/{
30932	    s//\1/
30933	    q
30934	  }
30935	  /^X\(\/\).*/{
30936	    s//\1/
30937	    q
30938	  }
30939	  s/.*/./; q'`
30940      test -d "$as_dir" && break
30941    done
30942    test -z "$as_dirs" || eval "mkdir $as_dirs"
30943  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
30944
30945
30946} # as_fn_mkdir_p
30947if mkdir -p . 2>/dev/null; then
30948  as_mkdir_p='mkdir -p "$as_dir"'
30949else
30950  test -d ./-p && rmdir ./-p
30951  as_mkdir_p=false
30952fi
30953
30954if test -x / >/dev/null 2>&1; then
30955  as_test_x='test -x'
30956else
30957  if ls -dL / >/dev/null 2>&1; then
30958    as_ls_L_option=L
30959  else
30960    as_ls_L_option=
30961  fi
30962  as_test_x='
30963    eval sh -c '\''
30964      if test -d "$1"; then
30965	test -d "$1/.";
30966      else
30967	case $1 in #(
30968	-*)set "./$1";;
30969	esac;
30970	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
30971	???[sx]*):;;*)false;;esac;fi
30972    '\'' sh
30973  '
30974fi
30975as_executable_p=$as_test_x
30976
30977# Sed expression to map a string onto a valid CPP name.
30978as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30979
30980# Sed expression to map a string onto a valid variable name.
30981as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30982
30983
30984exec 6>&1
30985## ----------------------------------- ##
30986## Main body of $CONFIG_STATUS script. ##
30987## ----------------------------------- ##
30988_ASEOF
30989test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30990
30991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30992# Save the log message, to keep $0 and so on meaningful, and to
30993# report actual input values of CONFIG_FILES etc. instead of their
30994# values after options handling.
30995ac_log="
30996This file was extended by OpenJDK $as_me jdk8, which was
30997generated by GNU Autoconf 2.67.  Invocation command line was
30998
30999  CONFIG_FILES    = $CONFIG_FILES
31000  CONFIG_HEADERS  = $CONFIG_HEADERS
31001  CONFIG_LINKS    = $CONFIG_LINKS
31002  CONFIG_COMMANDS = $CONFIG_COMMANDS
31003  $ $0 $@
31004
31005on `(hostname || uname -n) 2>/dev/null | sed 1q`
31006"
31007
31008_ACEOF
31009
31010case $ac_config_files in *"
31011"*) set x $ac_config_files; shift; ac_config_files=$*;;
31012esac
31013
31014case $ac_config_headers in *"
31015"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31016esac
31017
31018
31019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31020# Files that config.status was made for.
31021config_files="$ac_config_files"
31022config_headers="$ac_config_headers"
31023
31024_ACEOF
31025
31026cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31027ac_cs_usage="\
31028\`$as_me' instantiates files and other configuration actions
31029from templates according to the current configuration.  Unless the files
31030and actions are specified as TAGs, all are instantiated by default.
31031
31032Usage: $0 [OPTION]... [TAG]...
31033
31034  -h, --help       print this help, then exit
31035  -V, --version    print version number and configuration settings, then exit
31036      --config     print configuration, then exit
31037  -q, --quiet, --silent
31038                   do not print progress messages
31039  -d, --debug      don't remove temporary files
31040      --recheck    update $as_me by reconfiguring in the same conditions
31041      --file=FILE[:TEMPLATE]
31042                   instantiate the configuration file FILE
31043      --header=FILE[:TEMPLATE]
31044                   instantiate the configuration header FILE
31045
31046Configuration files:
31047$config_files
31048
31049Configuration headers:
31050$config_headers
31051
31052Report bugs to <build-dev@openjdk.java.net>.
31053OpenJDK home page: <http://openjdk.java.net>."
31054
31055_ACEOF
31056cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31057ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31058ac_cs_version="\\
31059OpenJDK config.status jdk8
31060configured by $0, generated by GNU Autoconf 2.67,
31061  with options \\"\$ac_cs_config\\"
31062
31063Copyright (C) 2010 Free Software Foundation, Inc.
31064This config.status script is free software; the Free Software Foundation
31065gives unlimited permission to copy, distribute and modify it."
31066
31067ac_pwd='$ac_pwd'
31068srcdir='$srcdir'
31069AWK='$AWK'
31070test -n "\$AWK" || AWK=awk
31071_ACEOF
31072
31073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31074# The default lists apply if the user does not specify any file.
31075ac_need_defaults=:
31076while test $# != 0
31077do
31078  case $1 in
31079  --*=?*)
31080    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31081    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31082    ac_shift=:
31083    ;;
31084  --*=)
31085    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31086    ac_optarg=
31087    ac_shift=:
31088    ;;
31089  *)
31090    ac_option=$1
31091    ac_optarg=$2
31092    ac_shift=shift
31093    ;;
31094  esac
31095
31096  case $ac_option in
31097  # Handling of the options.
31098  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31099    ac_cs_recheck=: ;;
31100  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31101    $as_echo "$ac_cs_version"; exit ;;
31102  --config | --confi | --conf | --con | --co | --c )
31103    $as_echo "$ac_cs_config"; exit ;;
31104  --debug | --debu | --deb | --de | --d | -d )
31105    debug=: ;;
31106  --file | --fil | --fi | --f )
31107    $ac_shift
31108    case $ac_optarg in
31109    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31110    '') as_fn_error $? "missing file argument" ;;
31111    esac
31112    as_fn_append CONFIG_FILES " '$ac_optarg'"
31113    ac_need_defaults=false;;
31114  --header | --heade | --head | --hea )
31115    $ac_shift
31116    case $ac_optarg in
31117    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31118    esac
31119    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31120    ac_need_defaults=false;;
31121  --he | --h)
31122    # Conflict between --help and --header
31123    as_fn_error $? "ambiguous option: \`$1'
31124Try \`$0 --help' for more information.";;
31125  --help | --hel | -h )
31126    $as_echo "$ac_cs_usage"; exit ;;
31127  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31128  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31129    ac_cs_silent=: ;;
31130
31131  # This is an error.
31132  -*) as_fn_error $? "unrecognized option: \`$1'
31133Try \`$0 --help' for more information." ;;
31134
31135  *) as_fn_append ac_config_targets " $1"
31136     ac_need_defaults=false ;;
31137
31138  esac
31139  shift
31140done
31141
31142ac_configure_extra_args=
31143
31144if $ac_cs_silent; then
31145  exec 6>/dev/null
31146  ac_configure_extra_args="$ac_configure_extra_args --silent"
31147fi
31148
31149_ACEOF
31150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31151if \$ac_cs_recheck; then
31152  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31153  shift
31154  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31155  CONFIG_SHELL='$SHELL'
31156  export CONFIG_SHELL
31157  exec "\$@"
31158fi
31159
31160_ACEOF
31161cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31162exec 5>>config.log
31163{
31164  echo
31165  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31166## Running $as_me. ##
31167_ASBOX
31168  $as_echo "$ac_log"
31169} >&5
31170
31171_ACEOF
31172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31173_ACEOF
31174
31175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31176
31177# Handling of arguments.
31178for ac_config_target in $ac_config_targets
31179do
31180  case $ac_config_target in
31181    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31182    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31183    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31184    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31185    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31186    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31187    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31188
31189  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31190  esac
31191done
31192
31193
31194# If the user did not use the arguments to specify the items to instantiate,
31195# then the envvar interface is used.  Set only those that are not.
31196# We use the long form for the default assignment because of an extremely
31197# bizarre bug on SunOS 4.1.3.
31198if $ac_need_defaults; then
31199  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31200  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31201fi
31202
31203# Have a temporary directory for convenience.  Make it in the build tree
31204# simply because there is no reason against having it here, and in addition,
31205# creating and moving files from /tmp can sometimes cause problems.
31206# Hook for its removal unless debugging.
31207# Note that there is a small window in which the directory will not be cleaned:
31208# after its creation but before its name has been assigned to `$tmp'.
31209$debug ||
31210{
31211  tmp=
31212  trap 'exit_status=$?
31213  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31214' 0
31215  trap 'as_fn_exit 1' 1 2 13 15
31216}
31217# Create a (secure) tmp directory for tmp files.
31218
31219{
31220  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31221  test -n "$tmp" && test -d "$tmp"
31222}  ||
31223{
31224  tmp=./conf$$-$RANDOM
31225  (umask 077 && mkdir "$tmp")
31226} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31227
31228# Set up the scripts for CONFIG_FILES section.
31229# No need to generate them if there are no CONFIG_FILES.
31230# This happens for instance with `./config.status config.h'.
31231if test -n "$CONFIG_FILES"; then
31232
31233
31234ac_cr=`echo X | tr X '\015'`
31235# On cygwin, bash can eat \r inside `` if the user requested igncr.
31236# But we know of no other shell where ac_cr would be empty at this
31237# point, so we can use a bashism as a fallback.
31238if test "x$ac_cr" = x; then
31239  eval ac_cr=\$\'\\r\'
31240fi
31241ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31242if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31243  ac_cs_awk_cr='\\r'
31244else
31245  ac_cs_awk_cr=$ac_cr
31246fi
31247
31248echo 'BEGIN {' >"$tmp/subs1.awk" &&
31249_ACEOF
31250
31251
31252{
31253  echo "cat >conf$$subs.awk <<_ACEOF" &&
31254  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31255  echo "_ACEOF"
31256} >conf$$subs.sh ||
31257  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31258ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31259ac_delim='%!_!# '
31260for ac_last_try in false false false false false :; do
31261  . ./conf$$subs.sh ||
31262    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31263
31264  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31265  if test $ac_delim_n = $ac_delim_num; then
31266    break
31267  elif $ac_last_try; then
31268    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31269  else
31270    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31271  fi
31272done
31273rm -f conf$$subs.sh
31274
31275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31276cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31277_ACEOF
31278sed -n '
31279h
31280s/^/S["/; s/!.*/"]=/
31281p
31282g
31283s/^[^!]*!//
31284:repl
31285t repl
31286s/'"$ac_delim"'$//
31287t delim
31288:nl
31289h
31290s/\(.\{148\}\)..*/\1/
31291t more1
31292s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31293p
31294n
31295b repl
31296:more1
31297s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31298p
31299g
31300s/.\{148\}//
31301t nl
31302:delim
31303h
31304s/\(.\{148\}\)..*/\1/
31305t more2
31306s/["\\]/\\&/g; s/^/"/; s/$/"/
31307p
31308b
31309:more2
31310s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31311p
31312g
31313s/.\{148\}//
31314t delim
31315' <conf$$subs.awk | sed '
31316/^[^""]/{
31317  N
31318  s/\n//
31319}
31320' >>$CONFIG_STATUS || ac_write_fail=1
31321rm -f conf$$subs.awk
31322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31323_ACAWK
31324cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31325  for (key in S) S_is_set[key] = 1
31326  FS = ""
31327
31328}
31329{
31330  line = $ 0
31331  nfields = split(line, field, "@")
31332  substed = 0
31333  len = length(field[1])
31334  for (i = 2; i < nfields; i++) {
31335    key = field[i]
31336    keylen = length(key)
31337    if (S_is_set[key]) {
31338      value = S[key]
31339      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31340      len += length(value) + length(field[++i])
31341      substed = 1
31342    } else
31343      len += 1 + keylen
31344  }
31345
31346  print line
31347}
31348
31349_ACAWK
31350_ACEOF
31351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31352if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31353  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31354else
31355  cat
31356fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31357  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31358_ACEOF
31359
31360# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31361# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31362# trailing colons and then remove the whole line if VPATH becomes empty
31363# (actually we leave an empty line to preserve line numbers).
31364if test "x$srcdir" = x.; then
31365  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31366h
31367s///
31368s/^/:/
31369s/[	 ]*$/:/
31370s/:\$(srcdir):/:/g
31371s/:\${srcdir}:/:/g
31372s/:@srcdir@:/:/g
31373s/^:*//
31374s/:*$//
31375x
31376s/\(=[	 ]*\).*/\1/
31377G
31378s/\n//
31379s/^[^=]*=[	 ]*$//
31380}'
31381fi
31382
31383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31384fi # test -n "$CONFIG_FILES"
31385
31386# Set up the scripts for CONFIG_HEADERS section.
31387# No need to generate them if there are no CONFIG_HEADERS.
31388# This happens for instance with `./config.status Makefile'.
31389if test -n "$CONFIG_HEADERS"; then
31390cat >"$tmp/defines.awk" <<\_ACAWK ||
31391BEGIN {
31392_ACEOF
31393
31394# Transform confdefs.h into an awk script `defines.awk', embedded as
31395# here-document in config.status, that substitutes the proper values into
31396# config.h.in to produce config.h.
31397
31398# Create a delimiter string that does not exist in confdefs.h, to ease
31399# handling of long lines.
31400ac_delim='%!_!# '
31401for ac_last_try in false false :; do
31402  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31403  if test -z "$ac_t"; then
31404    break
31405  elif $ac_last_try; then
31406    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31407  else
31408    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31409  fi
31410done
31411
31412# For the awk script, D is an array of macro values keyed by name,
31413# likewise P contains macro parameters if any.  Preserve backslash
31414# newline sequences.
31415
31416ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31417sed -n '
31418s/.\{148\}/&'"$ac_delim"'/g
31419t rset
31420:rset
31421s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
31422t def
31423d
31424:def
31425s/\\$//
31426t bsnl
31427s/["\\]/\\&/g
31428s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31429D["\1"]=" \3"/p
31430s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
31431d
31432:bsnl
31433s/["\\]/\\&/g
31434s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31435D["\1"]=" \3\\\\\\n"\\/p
31436t cont
31437s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31438t cont
31439d
31440:cont
31441n
31442s/.\{148\}/&'"$ac_delim"'/g
31443t clear
31444:clear
31445s/\\$//
31446t bsnlc
31447s/["\\]/\\&/g; s/^/"/; s/$/"/p
31448d
31449:bsnlc
31450s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31451b cont
31452' <confdefs.h | sed '
31453s/'"$ac_delim"'/"\\\
31454"/g' >>$CONFIG_STATUS || ac_write_fail=1
31455
31456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31457  for (key in D) D_is_set[key] = 1
31458  FS = ""
31459}
31460/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31461  line = \$ 0
31462  split(line, arg, " ")
31463  if (arg[1] == "#") {
31464    defundef = arg[2]
31465    mac1 = arg[3]
31466  } else {
31467    defundef = substr(arg[1], 2)
31468    mac1 = arg[2]
31469  }
31470  split(mac1, mac2, "(") #)
31471  macro = mac2[1]
31472  prefix = substr(line, 1, index(line, defundef) - 1)
31473  if (D_is_set[macro]) {
31474    # Preserve the white space surrounding the "#".
31475    print prefix "define", macro P[macro] D[macro]
31476    next
31477  } else {
31478    # Replace #undef with comments.  This is necessary, for example,
31479    # in the case of _POSIX_SOURCE, which is predefined and required
31480    # on some systems where configure will not decide to define it.
31481    if (defundef == "undef") {
31482      print "/*", prefix defundef, macro, "*/"
31483      next
31484    }
31485  }
31486}
31487{ print }
31488_ACAWK
31489_ACEOF
31490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31491  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31492fi # test -n "$CONFIG_HEADERS"
31493
31494
31495eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
31496shift
31497for ac_tag
31498do
31499  case $ac_tag in
31500  :[FHLC]) ac_mode=$ac_tag; continue;;
31501  esac
31502  case $ac_mode$ac_tag in
31503  :[FHL]*:*);;
31504  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
31505  :[FH]-) ac_tag=-:-;;
31506  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31507  esac
31508  ac_save_IFS=$IFS
31509  IFS=:
31510  set x $ac_tag
31511  IFS=$ac_save_IFS
31512  shift
31513  ac_file=$1
31514  shift
31515
31516  case $ac_mode in
31517  :L) ac_source=$1;;
31518  :[FH])
31519    ac_file_inputs=
31520    for ac_f
31521    do
31522      case $ac_f in
31523      -) ac_f="$tmp/stdin";;
31524      *) # Look for the file first in the build tree, then in the source tree
31525	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
31526	 # because $ac_f cannot contain `:'.
31527	 test -f "$ac_f" ||
31528	   case $ac_f in
31529	   [\\/$]*) false;;
31530	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31531	   esac ||
31532	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
31533      esac
31534      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31535      as_fn_append ac_file_inputs " '$ac_f'"
31536    done
31537
31538    # Let's still pretend it is `configure' which instantiates (i.e., don't
31539    # use $as_me), people would be surprised to read:
31540    #    /* config.h.  Generated by config.status.  */
31541    configure_input='Generated from '`
31542	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31543	`' by configure.'
31544    if test x"$ac_file" != x-; then
31545      configure_input="$ac_file.  $configure_input"
31546      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31547$as_echo "$as_me: creating $ac_file" >&6;}
31548    fi
31549    # Neutralize special characters interpreted by sed in replacement strings.
31550    case $configure_input in #(
31551    *\&* | *\|* | *\\* )
31552       ac_sed_conf_input=`$as_echo "$configure_input" |
31553       sed 's/[\\\\&|]/\\\\&/g'`;; #(
31554    *) ac_sed_conf_input=$configure_input;;
31555    esac
31556
31557    case $ac_tag in
31558    *:-:* | *:-) cat >"$tmp/stdin" \
31559      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
31560    esac
31561    ;;
31562  esac
31563
31564  ac_dir=`$as_dirname -- "$ac_file" ||
31565$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31566	 X"$ac_file" : 'X\(//\)[^/]' \| \
31567	 X"$ac_file" : 'X\(//\)$' \| \
31568	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31569$as_echo X"$ac_file" |
31570    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31571	    s//\1/
31572	    q
31573	  }
31574	  /^X\(\/\/\)[^/].*/{
31575	    s//\1/
31576	    q
31577	  }
31578	  /^X\(\/\/\)$/{
31579	    s//\1/
31580	    q
31581	  }
31582	  /^X\(\/\).*/{
31583	    s//\1/
31584	    q
31585	  }
31586	  s/.*/./; q'`
31587  as_dir="$ac_dir"; as_fn_mkdir_p
31588  ac_builddir=.
31589
31590case "$ac_dir" in
31591.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31592*)
31593  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31594  # A ".." for each directory in $ac_dir_suffix.
31595  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31596  case $ac_top_builddir_sub in
31597  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31598  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31599  esac ;;
31600esac
31601ac_abs_top_builddir=$ac_pwd
31602ac_abs_builddir=$ac_pwd$ac_dir_suffix
31603# for backward compatibility:
31604ac_top_builddir=$ac_top_build_prefix
31605
31606case $srcdir in
31607  .)  # We are building in place.
31608    ac_srcdir=.
31609    ac_top_srcdir=$ac_top_builddir_sub
31610    ac_abs_top_srcdir=$ac_pwd ;;
31611  [\\/]* | ?:[\\/]* )  # Absolute name.
31612    ac_srcdir=$srcdir$ac_dir_suffix;
31613    ac_top_srcdir=$srcdir
31614    ac_abs_top_srcdir=$srcdir ;;
31615  *) # Relative name.
31616    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31617    ac_top_srcdir=$ac_top_build_prefix$srcdir
31618    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31619esac
31620ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31621
31622
31623  case $ac_mode in
31624  :F)
31625  #
31626  # CONFIG_FILE
31627  #
31628
31629_ACEOF
31630
31631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31632# If the template does not know about datarootdir, expand it.
31633# FIXME: This hack should be removed a few years after 2.60.
31634ac_datarootdir_hack=; ac_datarootdir_seen=
31635ac_sed_dataroot='
31636/datarootdir/ {
31637  p
31638  q
31639}
31640/@datadir@/p
31641/@docdir@/p
31642/@infodir@/p
31643/@localedir@/p
31644/@mandir@/p'
31645case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31646*datarootdir*) ac_datarootdir_seen=yes;;
31647*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31648  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31649$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31650_ACEOF
31651cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31652  ac_datarootdir_hack='
31653  s&@datadir@&$datadir&g
31654  s&@docdir@&$docdir&g
31655  s&@infodir@&$infodir&g
31656  s&@localedir@&$localedir&g
31657  s&@mandir@&$mandir&g
31658  s&\\\${datarootdir}&$datarootdir&g' ;;
31659esac
31660_ACEOF
31661
31662# Neutralize VPATH when `$srcdir' = `.'.
31663# Shell code in configure.ac might set extrasub.
31664# FIXME: do we really want to maintain this feature?
31665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31666ac_sed_extra="$ac_vpsub
31667$extrasub
31668_ACEOF
31669cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31670:t
31671/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31672s|@configure_input@|$ac_sed_conf_input|;t t
31673s&@top_builddir@&$ac_top_builddir_sub&;t t
31674s&@top_build_prefix@&$ac_top_build_prefix&;t t
31675s&@srcdir@&$ac_srcdir&;t t
31676s&@abs_srcdir@&$ac_abs_srcdir&;t t
31677s&@top_srcdir@&$ac_top_srcdir&;t t
31678s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31679s&@builddir@&$ac_builddir&;t t
31680s&@abs_builddir@&$ac_abs_builddir&;t t
31681s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31682$ac_datarootdir_hack
31683"
31684eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
31685  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31686
31687test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31688  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
31689  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
31690  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31691which seems to be undefined.  Please make sure it is defined" >&5
31692$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31693which seems to be undefined.  Please make sure it is defined" >&2;}
31694
31695  rm -f "$tmp/stdin"
31696  case $ac_file in
31697  -) cat "$tmp/out" && rm -f "$tmp/out";;
31698  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
31699  esac \
31700  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31701 ;;
31702  :H)
31703  #
31704  # CONFIG_HEADER
31705  #
31706  if test x"$ac_file" != x-; then
31707    {
31708      $as_echo "/* $configure_input  */" \
31709      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
31710    } >"$tmp/config.h" \
31711      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31712    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
31713      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
31714$as_echo "$as_me: $ac_file is unchanged" >&6;}
31715    else
31716      rm -f "$ac_file"
31717      mv "$tmp/config.h" "$ac_file" \
31718	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
31719    fi
31720  else
31721    $as_echo "/* $configure_input  */" \
31722      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
31723      || as_fn_error $? "could not create -" "$LINENO" 5
31724  fi
31725 ;;
31726
31727
31728  esac
31729
31730done # for ac_tag
31731
31732
31733as_fn_exit 0
31734_ACEOF
31735ac_clean_files=$ac_clean_files_save
31736
31737test $ac_write_fail = 0 ||
31738  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
31739
31740
31741# configure is writing to config.log, and then calls config.status.
31742# config.status does its own redirection, appending to config.log.
31743# Unfortunately, on DOS this fails, as config.log is still kept open
31744# by configure, so config.status won't be able to write to it; its
31745# output is simply discarded.  So we exec the FD to /dev/null,
31746# effectively closing config.log, so it can be properly (re)opened and
31747# appended to by config.status.  When coming back to configure, we
31748# need to make the FD available again.
31749if test "$no_create" != yes; then
31750  ac_cs_success=:
31751  ac_config_status_args=
31752  test "$silent" = yes &&
31753    ac_config_status_args="$ac_config_status_args --quiet"
31754  exec 5>/dev/null
31755  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31756  exec 5>>config.log
31757  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31758  # would make configure fail if this is the last instruction.
31759  $ac_cs_success || as_fn_exit 1
31760fi
31761if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31762  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31763$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31764fi
31765
31766
31767# Make the compare script executable
31768$CHMOD +x $OUTPUT_ROOT/compare.sh
31769
31770# Finally output some useful information to the user
31771
31772# Finally output some useful information to the user
31773
31774if test "x$CCACHE_FOUND" != x; then
31775	if  test "x$HAS_GOOD_CCACHE" = x; then
31776		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
31777		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
31778	else
31779		CCACHE_STATUS="installed and in use"
31780	fi
31781else
31782	if test "x$GCC" = xyes; then
31783		CCACHE_STATUS="not installed (consider installing)"
31784		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
31785	else
31786		CCACHE_STATUS="not available for your system"
31787	fi
31788fi
31789
31790printf "\n"
31791printf "====================================================\n"
31792printf "A new configuration has been successfully created in\n"
31793printf "$OUTPUT_ROOT\n"
31794if test "x$CONFIGURE_COMMAND_LINE" != x; then
31795	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
31796else
31797	printf "using default settings.\n"
31798fi
31799
31800printf "\n"
31801printf "Configuration summary:\n"
31802printf "* Debug level:    $DEBUG_LEVEL\n"
31803printf "* JDK variant:    $JDK_VARIANT\n"
31804printf "* JVM variants:   $with_jvm_variants\n"
31805printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
31806
31807printf "\n"
31808printf "Tools summary:\n"
31809if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
31810  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
31811fi
31812printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
31813printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
31814printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
31815
31816printf "\n"
31817printf "Build performance summary:\n"
31818printf "* Cores to use:   $NUM_CORES\n"
31819printf "* Memory limit:   $MEMORY_SIZE MB\n"
31820printf "* ccache status:  $CCACHE_STATUS\n"
31821printf "\n"
31822
31823if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
31824	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
31825	printf "$CCACHE_HELP_MSG\n"
31826
31827    # Print a helpful message on how to acquire the necessary build dependency.
31828    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
31829    MISSING_DEPENDENCY=ccache
31830    PKGHANDLER_COMMAND=
31831
31832    case $PKGHANDLER in
31833	apt-get)
31834                apt_help     $MISSING_DEPENDENCY ;;
31835    yum)
31836                yum_help     $MISSING_DEPENDENCY ;;
31837	port)
31838                port_help    $MISSING_DEPENDENCY ;;
31839	pkgutil)
31840                pkgutil_help $MISSING_DEPENDENCY ;;
31841	pkgadd)
31842                pkgadd_help  $MISSING_DEPENDENCY ;;
31843    * )
31844      break ;;
31845    esac
31846
31847    if test "x$PKGHANDLER_COMMAND" != x; then
31848        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31849    fi
31850
31851	printf "$HELP_MSG\n"
31852	printf "\n"
31853fi
31854
31855if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
31856	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
31857	printf "will result in longer build times.\n"
31858	printf "\n"
31859fi
31860
31861if test "x$FOUND_ALT_VARIABLES" != "x"; then
31862	printf "WARNING: You have old-style ALT_ environment variables set.\n"
31863	printf "These are not respected, and will be ignored. It is recommended\n"
31864	printf "that you clean your environment. The following variables are set:\n"
31865	printf "$FOUND_ALT_VARIABLES\n"
31866	printf "\n"
31867fi
31868
31869if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
31870	printf "WARNING: Your build output directory is not on a local disk.\n"
31871	printf "This will severely degrade build performance!\n"
31872	printf "It is recommended that you create an output directory on a local disk,\n"
31873	printf "and run the configure script again from that directory.\n"
31874	printf "\n"
31875fi
31876
31877if test "x$IS_RECONFIGURE" = "xyes"; then
31878	printf "WARNING: The result of this configuration has overridden an older\n"
31879	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
31880	printf "proper build. Failure to do so might result in strange build problems.\n"
31881	printf "\n"
31882fi
31883
31884