generated-configure.sh revision 537:51d3b65b8093
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
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755FULL_VERSION
756RELEASE
757JDK_VERSION
758RUNTIME_NAME
759COPYRIGHT_YEAR
760MACOSX_BUNDLE_ID_BASE
761MACOSX_BUNDLE_NAME_BASE
762COMPANY_NAME
763JDK_RC_PLATFORM_NAME
764PRODUCT_SUFFIX
765PRODUCT_NAME
766LAUNCHER_NAME
767MILESTONE
768JDK_BUILD_NUMBER
769JDK_UPDATE_VERSION
770JDK_MICRO_VERSION
771JDK_MINOR_VERSION
772JDK_MAJOR_VERSION
773COMPRESS_JARS
774UNLIMITED_CRYPTO
775CACERTS_FILE
776TEST_IN_BUILD
777BUILD_HEADLESS
778SUPPORT_HEADFUL
779SUPPORT_HEADLESS
780SET_OPENJDK
781BDEPS_FTP
782BDEPS_UNZIP
783OS_VERSION_MICRO
784OS_VERSION_MINOR
785OS_VERSION_MAJOR
786PKG_CONFIG
787COMM
788TIME
789STAT
790HG
791READELF
792OTOOL
793LDD
794ZIP
795UNZIP
796FIND_DELETE
797MAKE
798CHECK_TOOLSDIR_MAKE
799CHECK_TOOLSDIR_GMAKE
800CHECK_MAKE
801CHECK_GMAKE
802PKGHANDLER
803OUTPUT_ROOT
804CONF_NAME
805SPEC
806BUILD_VARIANT_RELEASE
807DEBUG_CLASSFILES
808FASTDEBUG
809VARIANT
810DEBUG_LEVEL
811MACOSX_UNIVERSAL
812JVM_VARIANT_ZEROSHARK
813JVM_VARIANT_ZERO
814JVM_VARIANT_KERNEL
815JVM_VARIANT_CLIENT
816JVM_VARIANT_SERVER
817JVM_VARIANTS
818JDK_VARIANT
819BUILD_LOG_WRAPPER
820BUILD_LOG_PREVIOUS
821BUILD_LOG
822SYS_ROOT
823PATH_SEP
824SRC_ROOT
825DEFINE_CROSS_COMPILE_ARCH
826LP64
827OPENJDK_TARGET_OS_API_DIR
828OPENJDK_TARGET_CPU_JLI_CFLAGS
829OPENJDK_TARGET_CPU_OSARCH
830OPENJDK_TARGET_CPU_ISADIR
831OPENJDK_TARGET_CPU_LIBDIR
832OPENJDK_TARGET_CPU_LEGACY_LIB
833OPENJDK_TARGET_CPU_LEGACY
834REQUIRED_OS_VERSION
835REQUIRED_OS_NAME
836COMPILE_TYPE
837OPENJDK_TARGET_CPU_ENDIAN
838OPENJDK_TARGET_CPU_BITS
839OPENJDK_TARGET_CPU_ARCH
840OPENJDK_TARGET_CPU
841OPENJDK_TARGET_OS_API
842OPENJDK_TARGET_OS
843OPENJDK_BUILD_CPU_ENDIAN
844OPENJDK_BUILD_CPU_BITS
845OPENJDK_BUILD_CPU_ARCH
846OPENJDK_BUILD_CPU
847OPENJDK_BUILD_OS_API
848OPENJDK_BUILD_OS
849OPENJDK_BUILD_AUTOCONF_NAME
850OPENJDK_TARGET_AUTOCONF_NAME
851target_os
852target_vendor
853target_cpu
854target
855host_os
856host_vendor
857host_cpu
858host
859build_os
860build_vendor
861build_cpu
862build
863SETFILE
864DF
865READLINK
866CYGPATH
867NAWK
868SED
869FGREP
870EGREP
871GREP
872AWK
873XARGS
874WHICH
875WC
876UNIQ
877UNAME
878TR
879TOUCH
880TEE
881TAR
882TAIL
883SORT
884SH
885RM
886THEPWDCMD
887PRINTF
888MV
889MKTEMP
890MKDIR
891LS
892LN
893HEAD
894FIND
895FILE
896EXPR
897ECHO
898DIRNAME
899DIFF
900DATE
901CUT
902CP
903CMP
904CHMOD
905CAT
906BASH
907BASENAME
908DATE_WHEN_CONFIGURED
909CONFIGURE_COMMAND_LINE
910CUSTOM_MAKE_DIR
911target_alias
912host_alias
913build_alias
914LIBS
915ECHO_T
916ECHO_N
917ECHO_C
918DEFS
919mandir
920localedir
921libdir
922psdir
923pdfdir
924dvidir
925htmldir
926infodir
927docdir
928oldincludedir
929includedir
930localstatedir
931sharedstatedir
932sysconfdir
933datadir
934datarootdir
935libexecdir
936sbindir
937bindir
938program_transform_name
939prefix
940exec_prefix
941PACKAGE_URL
942PACKAGE_BUGREPORT
943PACKAGE_STRING
944PACKAGE_VERSION
945PACKAGE_TARNAME
946PACKAGE_NAME
947PATH_SEPARATOR
948SHELL'
949ac_subst_files=''
950ac_user_opts='
951enable_option_checking
952with_custom_make_dir
953with_target_bits
954with_sys_root
955with_tools_dir
956with_devkit
957with_jdk_variant
958with_jvm_variants
959enable_debug
960with_debug_level
961with_conf_name
962with_builddeps_conf
963with_builddeps_server
964with_builddeps_dir
965with_builddeps_group
966enable_openjdk_only
967enable_headful
968enable_hotspot_test_in_build
969with_cacerts_file
970enable_unlimited_crypto
971with_boot_jdk
972with_boot_jdk_jvmargs
973with_add_source_root
974with_override_source_root
975with_adds_and_overrides
976with_override_langtools
977with_override_corba
978with_override_jaxp
979with_override_jaxws
980with_override_hotspot
981with_override_jdk
982with_import_hotspot
983with_msvcr_dll
984with_extra_cflags
985with_extra_cxxflags
986with_extra_ldflags
987enable_debug_symbols
988enable_zip_debug_info
989enable_macosx_runtime_support
990with_x
991with_cups
992with_cups_include
993with_freetype
994with_alsa
995with_alsa_include
996with_alsa_lib
997with_zlib
998with_stdc__lib
999with_num_cores
1000with_memory_size
1001with_sjavac_server_java
1002with_sjavac_server_cores
1003enable_sjavac
1004enable_precompiled_headers
1005enable_ccache
1006with_ccache_dir
1007'
1008      ac_precious_vars='build_alias
1009host_alias
1010target_alias
1011PKG_CONFIG
1012CC
1013CFLAGS
1014LDFLAGS
1015LIBS
1016CPPFLAGS
1017CXX
1018CXXFLAGS
1019CCC
1020OBJC
1021OBJCFLAGS
1022CPP
1023CXXCPP
1024XMKMF
1025FREETYPE2_CFLAGS
1026FREETYPE2_LIBS
1027ALSA_CFLAGS
1028ALSA_LIBS'
1029
1030
1031# Initialize some variables set by options.
1032ac_init_help=
1033ac_init_version=false
1034ac_unrecognized_opts=
1035ac_unrecognized_sep=
1036# The variables have the same names as the options, with
1037# dashes changed to underlines.
1038cache_file=/dev/null
1039exec_prefix=NONE
1040no_create=
1041no_recursion=
1042prefix=NONE
1043program_prefix=NONE
1044program_suffix=NONE
1045program_transform_name=s,x,x,
1046silent=
1047site=
1048srcdir=
1049verbose=
1050x_includes=NONE
1051x_libraries=NONE
1052
1053# Installation directory options.
1054# These are left unexpanded so users can "make install exec_prefix=/foo"
1055# and all the variables that are supposed to be based on exec_prefix
1056# by default will actually change.
1057# Use braces instead of parens because sh, perl, etc. also accept them.
1058# (The list follows the same order as the GNU Coding Standards.)
1059bindir='${exec_prefix}/bin'
1060sbindir='${exec_prefix}/sbin'
1061libexecdir='${exec_prefix}/libexec'
1062datarootdir='${prefix}/share'
1063datadir='${datarootdir}'
1064sysconfdir='${prefix}/etc'
1065sharedstatedir='${prefix}/com'
1066localstatedir='${prefix}/var'
1067includedir='${prefix}/include'
1068oldincludedir='/usr/include'
1069docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1070infodir='${datarootdir}/info'
1071htmldir='${docdir}'
1072dvidir='${docdir}'
1073pdfdir='${docdir}'
1074psdir='${docdir}'
1075libdir='${exec_prefix}/lib'
1076localedir='${datarootdir}/locale'
1077mandir='${datarootdir}/man'
1078
1079ac_prev=
1080ac_dashdash=
1081for ac_option
1082do
1083  # If the previous option needs an argument, assign it.
1084  if test -n "$ac_prev"; then
1085    eval $ac_prev=\$ac_option
1086    ac_prev=
1087    continue
1088  fi
1089
1090  case $ac_option in
1091  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1092  *=)   ac_optarg= ;;
1093  *)    ac_optarg=yes ;;
1094  esac
1095
1096  # Accept the important Cygnus configure options, so we can diagnose typos.
1097
1098  case $ac_dashdash$ac_option in
1099  --)
1100    ac_dashdash=yes ;;
1101
1102  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1103    ac_prev=bindir ;;
1104  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1105    bindir=$ac_optarg ;;
1106
1107  -build | --build | --buil | --bui | --bu)
1108    ac_prev=build_alias ;;
1109  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1110    build_alias=$ac_optarg ;;
1111
1112  -cache-file | --cache-file | --cache-fil | --cache-fi \
1113  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1114    ac_prev=cache_file ;;
1115  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1116  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1117    cache_file=$ac_optarg ;;
1118
1119  --config-cache | -C)
1120    cache_file=config.cache ;;
1121
1122  -datadir | --datadir | --datadi | --datad)
1123    ac_prev=datadir ;;
1124  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1125    datadir=$ac_optarg ;;
1126
1127  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1128  | --dataroo | --dataro | --datar)
1129    ac_prev=datarootdir ;;
1130  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1131  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1132    datarootdir=$ac_optarg ;;
1133
1134  -disable-* | --disable-*)
1135    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1136    # Reject names that are not valid shell variable names.
1137    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1138      as_fn_error $? "invalid feature name: $ac_useropt"
1139    ac_useropt_orig=$ac_useropt
1140    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141    case $ac_user_opts in
1142      *"
1143"enable_$ac_useropt"
1144"*) ;;
1145      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1146	 ac_unrecognized_sep=', ';;
1147    esac
1148    eval enable_$ac_useropt=no ;;
1149
1150  -docdir | --docdir | --docdi | --doc | --do)
1151    ac_prev=docdir ;;
1152  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1153    docdir=$ac_optarg ;;
1154
1155  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1156    ac_prev=dvidir ;;
1157  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1158    dvidir=$ac_optarg ;;
1159
1160  -enable-* | --enable-*)
1161    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1162    # Reject names that are not valid shell variable names.
1163    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1164      as_fn_error $? "invalid feature name: $ac_useropt"
1165    ac_useropt_orig=$ac_useropt
1166    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167    case $ac_user_opts in
1168      *"
1169"enable_$ac_useropt"
1170"*) ;;
1171      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1172	 ac_unrecognized_sep=', ';;
1173    esac
1174    eval enable_$ac_useropt=\$ac_optarg ;;
1175
1176  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1177  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1178  | --exec | --exe | --ex)
1179    ac_prev=exec_prefix ;;
1180  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1181  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1182  | --exec=* | --exe=* | --ex=*)
1183    exec_prefix=$ac_optarg ;;
1184
1185  -gas | --gas | --ga | --g)
1186    # Obsolete; use --with-gas.
1187    with_gas=yes ;;
1188
1189  -help | --help | --hel | --he | -h)
1190    ac_init_help=long ;;
1191  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1192    ac_init_help=recursive ;;
1193  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1194    ac_init_help=short ;;
1195
1196  -host | --host | --hos | --ho)
1197    ac_prev=host_alias ;;
1198  -host=* | --host=* | --hos=* | --ho=*)
1199    host_alias=$ac_optarg ;;
1200
1201  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1202    ac_prev=htmldir ;;
1203  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1204  | --ht=*)
1205    htmldir=$ac_optarg ;;
1206
1207  -includedir | --includedir | --includedi | --included | --include \
1208  | --includ | --inclu | --incl | --inc)
1209    ac_prev=includedir ;;
1210  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1211  | --includ=* | --inclu=* | --incl=* | --inc=*)
1212    includedir=$ac_optarg ;;
1213
1214  -infodir | --infodir | --infodi | --infod | --info | --inf)
1215    ac_prev=infodir ;;
1216  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1217    infodir=$ac_optarg ;;
1218
1219  -libdir | --libdir | --libdi | --libd)
1220    ac_prev=libdir ;;
1221  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1222    libdir=$ac_optarg ;;
1223
1224  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1225  | --libexe | --libex | --libe)
1226    ac_prev=libexecdir ;;
1227  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1228  | --libexe=* | --libex=* | --libe=*)
1229    libexecdir=$ac_optarg ;;
1230
1231  -localedir | --localedir | --localedi | --localed | --locale)
1232    ac_prev=localedir ;;
1233  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1234    localedir=$ac_optarg ;;
1235
1236  -localstatedir | --localstatedir | --localstatedi | --localstated \
1237  | --localstate | --localstat | --localsta | --localst | --locals)
1238    ac_prev=localstatedir ;;
1239  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1240  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1241    localstatedir=$ac_optarg ;;
1242
1243  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1244    ac_prev=mandir ;;
1245  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1246    mandir=$ac_optarg ;;
1247
1248  -nfp | --nfp | --nf)
1249    # Obsolete; use --without-fp.
1250    with_fp=no ;;
1251
1252  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1253  | --no-cr | --no-c | -n)
1254    no_create=yes ;;
1255
1256  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1257  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1258    no_recursion=yes ;;
1259
1260  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1261  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1262  | --oldin | --oldi | --old | --ol | --o)
1263    ac_prev=oldincludedir ;;
1264  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1265  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1266  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1267    oldincludedir=$ac_optarg ;;
1268
1269  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1270    ac_prev=prefix ;;
1271  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1272    prefix=$ac_optarg ;;
1273
1274  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1275  | --program-pre | --program-pr | --program-p)
1276    ac_prev=program_prefix ;;
1277  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1278  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1279    program_prefix=$ac_optarg ;;
1280
1281  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1282  | --program-suf | --program-su | --program-s)
1283    ac_prev=program_suffix ;;
1284  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1285  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1286    program_suffix=$ac_optarg ;;
1287
1288  -program-transform-name | --program-transform-name \
1289  | --program-transform-nam | --program-transform-na \
1290  | --program-transform-n | --program-transform- \
1291  | --program-transform | --program-transfor \
1292  | --program-transfo | --program-transf \
1293  | --program-trans | --program-tran \
1294  | --progr-tra | --program-tr | --program-t)
1295    ac_prev=program_transform_name ;;
1296  -program-transform-name=* | --program-transform-name=* \
1297  | --program-transform-nam=* | --program-transform-na=* \
1298  | --program-transform-n=* | --program-transform-=* \
1299  | --program-transform=* | --program-transfor=* \
1300  | --program-transfo=* | --program-transf=* \
1301  | --program-trans=* | --program-tran=* \
1302  | --progr-tra=* | --program-tr=* | --program-t=*)
1303    program_transform_name=$ac_optarg ;;
1304
1305  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1306    ac_prev=pdfdir ;;
1307  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1308    pdfdir=$ac_optarg ;;
1309
1310  -psdir | --psdir | --psdi | --psd | --ps)
1311    ac_prev=psdir ;;
1312  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1313    psdir=$ac_optarg ;;
1314
1315  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1316  | -silent | --silent | --silen | --sile | --sil)
1317    silent=yes ;;
1318
1319  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1320    ac_prev=sbindir ;;
1321  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1322  | --sbi=* | --sb=*)
1323    sbindir=$ac_optarg ;;
1324
1325  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1326  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1327  | --sharedst | --shareds | --shared | --share | --shar \
1328  | --sha | --sh)
1329    ac_prev=sharedstatedir ;;
1330  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1331  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1332  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1333  | --sha=* | --sh=*)
1334    sharedstatedir=$ac_optarg ;;
1335
1336  -site | --site | --sit)
1337    ac_prev=site ;;
1338  -site=* | --site=* | --sit=*)
1339    site=$ac_optarg ;;
1340
1341  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1342    ac_prev=srcdir ;;
1343  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1344    srcdir=$ac_optarg ;;
1345
1346  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1347  | --syscon | --sysco | --sysc | --sys | --sy)
1348    ac_prev=sysconfdir ;;
1349  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1350  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1351    sysconfdir=$ac_optarg ;;
1352
1353  -target | --target | --targe | --targ | --tar | --ta | --t)
1354    ac_prev=target_alias ;;
1355  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1356    target_alias=$ac_optarg ;;
1357
1358  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1359    verbose=yes ;;
1360
1361  -version | --version | --versio | --versi | --vers | -V)
1362    ac_init_version=: ;;
1363
1364  -with-* | --with-*)
1365    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1366    # Reject names that are not valid shell variable names.
1367    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1368      as_fn_error $? "invalid package name: $ac_useropt"
1369    ac_useropt_orig=$ac_useropt
1370    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1371    case $ac_user_opts in
1372      *"
1373"with_$ac_useropt"
1374"*) ;;
1375      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1376	 ac_unrecognized_sep=', ';;
1377    esac
1378    eval with_$ac_useropt=\$ac_optarg ;;
1379
1380  -without-* | --without-*)
1381    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1382    # Reject names that are not valid shell variable names.
1383    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1384      as_fn_error $? "invalid package name: $ac_useropt"
1385    ac_useropt_orig=$ac_useropt
1386    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1387    case $ac_user_opts in
1388      *"
1389"with_$ac_useropt"
1390"*) ;;
1391      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1392	 ac_unrecognized_sep=', ';;
1393    esac
1394    eval with_$ac_useropt=no ;;
1395
1396  --x)
1397    # Obsolete; use --with-x.
1398    with_x=yes ;;
1399
1400  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1401  | --x-incl | --x-inc | --x-in | --x-i)
1402    ac_prev=x_includes ;;
1403  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1404  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1405    x_includes=$ac_optarg ;;
1406
1407  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1408  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1409    ac_prev=x_libraries ;;
1410  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1411  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1412    x_libraries=$ac_optarg ;;
1413
1414  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1415Try \`$0 --help' for more information"
1416    ;;
1417
1418  *=*)
1419    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1420    # Reject names that are not valid shell variable names.
1421    case $ac_envvar in #(
1422      '' | [0-9]* | *[!_$as_cr_alnum]* )
1423      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1424    esac
1425    eval $ac_envvar=\$ac_optarg
1426    export $ac_envvar ;;
1427
1428  *)
1429    # FIXME: should be removed in autoconf 3.0.
1430    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1431    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1432      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1433    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1434    ;;
1435
1436  esac
1437done
1438
1439if test -n "$ac_prev"; then
1440  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1441  as_fn_error $? "missing argument to $ac_option"
1442fi
1443
1444if test -n "$ac_unrecognized_opts"; then
1445  case $enable_option_checking in
1446    no) ;;
1447    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1448    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1449  esac
1450fi
1451
1452# Check all directory arguments for consistency.
1453for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1454		datadir sysconfdir sharedstatedir localstatedir includedir \
1455		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1456		libdir localedir mandir
1457do
1458  eval ac_val=\$$ac_var
1459  # Remove trailing slashes.
1460  case $ac_val in
1461    */ )
1462      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1463      eval $ac_var=\$ac_val;;
1464  esac
1465  # Be sure to have absolute directory names.
1466  case $ac_val in
1467    [\\/$]* | ?:[\\/]* )  continue;;
1468    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1469  esac
1470  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1471done
1472
1473# There might be people who depend on the old broken behavior: `$host'
1474# used to hold the argument of --host etc.
1475# FIXME: To remove some day.
1476build=$build_alias
1477host=$host_alias
1478target=$target_alias
1479
1480# FIXME: To remove some day.
1481if test "x$host_alias" != x; then
1482  if test "x$build_alias" = x; then
1483    cross_compiling=maybe
1484    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1485    If a cross compiler is detected then cross compile mode will be used" >&2
1486  elif test "x$build_alias" != "x$host_alias"; then
1487    cross_compiling=yes
1488  fi
1489fi
1490
1491ac_tool_prefix=
1492test -n "$host_alias" && ac_tool_prefix=$host_alias-
1493
1494test "$silent" = yes && exec 6>/dev/null
1495
1496
1497ac_pwd=`pwd` && test -n "$ac_pwd" &&
1498ac_ls_di=`ls -di .` &&
1499ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1500  as_fn_error $? "working directory cannot be determined"
1501test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1502  as_fn_error $? "pwd does not report name of working directory"
1503
1504
1505# Find the source files, if location was not specified.
1506if test -z "$srcdir"; then
1507  ac_srcdir_defaulted=yes
1508  # Try the directory containing this script, then the parent directory.
1509  ac_confdir=`$as_dirname -- "$as_myself" ||
1510$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1511	 X"$as_myself" : 'X\(//\)[^/]' \| \
1512	 X"$as_myself" : 'X\(//\)$' \| \
1513	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1514$as_echo X"$as_myself" |
1515    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1516	    s//\1/
1517	    q
1518	  }
1519	  /^X\(\/\/\)[^/].*/{
1520	    s//\1/
1521	    q
1522	  }
1523	  /^X\(\/\/\)$/{
1524	    s//\1/
1525	    q
1526	  }
1527	  /^X\(\/\).*/{
1528	    s//\1/
1529	    q
1530	  }
1531	  s/.*/./; q'`
1532  srcdir=$ac_confdir
1533  if test ! -r "$srcdir/$ac_unique_file"; then
1534    srcdir=..
1535  fi
1536else
1537  ac_srcdir_defaulted=no
1538fi
1539if test ! -r "$srcdir/$ac_unique_file"; then
1540  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1541  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1542fi
1543ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1544ac_abs_confdir=`(
1545	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1546	pwd)`
1547# When building in place, set srcdir=.
1548if test "$ac_abs_confdir" = "$ac_pwd"; then
1549  srcdir=.
1550fi
1551# Remove unnecessary trailing slashes from srcdir.
1552# Double slashes in file names in object file debugging info
1553# mess up M-x gdb in Emacs.
1554case $srcdir in
1555*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1556esac
1557for ac_var in $ac_precious_vars; do
1558  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_env_${ac_var}_value=\$${ac_var}
1560  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1561  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1562done
1563
1564#
1565# Report the --help message.
1566#
1567if test "$ac_init_help" = "long"; then
1568  # Omit some internal or obsolete options to make the list less imposing.
1569  # This message is too long to be a string in the A/UX 3.1 sh.
1570  cat <<_ACEOF
1571\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1572
1573Usage: $0 [OPTION]... [VAR=VALUE]...
1574
1575To assign environment variables (e.g., CC, CFLAGS...), specify them as
1576VAR=VALUE.  See below for descriptions of some of the useful variables.
1577
1578Defaults for the options are specified in brackets.
1579
1580Configuration:
1581  -h, --help              display this help and exit
1582      --help=short        display options specific to this package
1583      --help=recursive    display the short help of all the included packages
1584  -V, --version           display version information and exit
1585  -q, --quiet, --silent   do not print \`checking ...' messages
1586      --cache-file=FILE   cache test results in FILE [disabled]
1587  -C, --config-cache      alias for \`--cache-file=config.cache'
1588  -n, --no-create         do not create output files
1589      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1590
1591Installation directories:
1592  --prefix=PREFIX         install architecture-independent files in PREFIX
1593                          [$ac_default_prefix]
1594  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1595                          [PREFIX]
1596
1597By default, \`make install' will install all the files in
1598\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1599an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1600for instance \`--prefix=\$HOME'.
1601
1602For better control, use the options below.
1603
1604Fine tuning of the installation directories:
1605  --bindir=DIR            user executables [EPREFIX/bin]
1606  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1607  --libexecdir=DIR        program executables [EPREFIX/libexec]
1608  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1609  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1610  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1611  --libdir=DIR            object code libraries [EPREFIX/lib]
1612  --includedir=DIR        C header files [PREFIX/include]
1613  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1614  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1615  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1616  --infodir=DIR           info documentation [DATAROOTDIR/info]
1617  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1618  --mandir=DIR            man documentation [DATAROOTDIR/man]
1619  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1620  --htmldir=DIR           html documentation [DOCDIR]
1621  --dvidir=DIR            dvi documentation [DOCDIR]
1622  --pdfdir=DIR            pdf documentation [DOCDIR]
1623  --psdir=DIR             ps documentation [DOCDIR]
1624_ACEOF
1625
1626  cat <<\_ACEOF
1627
1628X features:
1629  --x-includes=DIR    X include files are in DIR
1630  --x-libraries=DIR   X library files are in DIR
1631
1632System types:
1633  --build=BUILD     configure for building on BUILD [guessed]
1634  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1635  --target=TARGET   configure for building compilers for TARGET [HOST]
1636_ACEOF
1637fi
1638
1639if test -n "$ac_init_help"; then
1640  case $ac_init_help in
1641     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1642   esac
1643  cat <<\_ACEOF
1644
1645Optional Features:
1646  --disable-option-checking  ignore unrecognized --enable/--with options
1647  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1648  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1649  --enable-debug          set the debug level to fastdebug (shorthand for
1650                          --with-debug-level=fastdebug) [disabled]
1651  --enable-openjdk-only   supress building closed source even if present
1652                          [disabled]
1653  --disable-headful       disable building headful support (graphical UI
1654                          support) [enabled]
1655  --enable-hotspot-test-in-build
1656                          run the Queens test after Hotspot build [disabled]
1657  --enable-unlimited-crypto
1658                          Enable unlimited crypto policy [disabled]
1659  --disable-debug-symbols disable generation of debug symbols [enabled]
1660  --disable-zip-debug-info
1661                          disable zipping of debug-info files [enabled]
1662  --disable-macosx-runtime-support
1663                          disable the use of MacOSX Java runtime support
1664                          framework [enabled]
1665  --enable-sjavac         use sjavac to do fast incremental compiles
1666                          [disabled]
1667  --disable-precompiled-headers
1668                          disable using precompiled headers when compiling C++
1669                          [enabled]
1670  --disable-ccache        disable using ccache to speed up recompilations
1671                          [enabled]
1672
1673Optional Packages:
1674  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1675  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1676  --with-custom-make-dir  use this directory for custom build/make files
1677  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1678                          support it), e.g. --with-target-bits=32 [guessed]
1679  --with-sys-root         pass this sys-root to the compilers and tools (for
1680                          cross-compiling)
1681  --with-tools-dir        search this directory for compilers and tools (for
1682                          cross-compiling)
1683  --with-devkit           use this directory as base for tools-dir and
1684                          sys-root (for cross-compiling)
1685  --with-jdk-variant      JDK variant to build (normal) [normal]
1686  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1687                          client, kernel, zero, zeroshark) [server]
1688  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1689                          [release]
1690  --with-conf-name        use this as the name of the configuration [generated
1691                          from important configuration options]
1692  --with-builddeps-conf   use this configuration file for the builddeps
1693  --with-builddeps-server download and use build dependencies from this server
1694                          url
1695  --with-builddeps-dir    store downloaded build dependencies here
1696                          [/localhome/builddeps]
1697  --with-builddeps-group  chgrp the downloaded build dependencies to this
1698                          group
1699  --with-cacerts-file     specify alternative cacerts file
1700  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1701  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1702                          invocations of the Boot JDK, overriding the default
1703                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1704                          -enableassertions"
1705  --with-add-source-root  for each and every source directory, look in this
1706                          additional source root for the same directory; if it
1707                          exists and have files in it, include it in the build
1708  --with-override-source-root
1709                          for each and every source directory, look in this
1710                          override source root for the same directory; if it
1711                          exists, use that directory instead and ignore the
1712                          directory in the original source root
1713  --with-adds-and-overrides
1714                          use the subdirs 'adds' and 'overrides' in the
1715                          specified directory as add-source-root and
1716                          override-source-root
1717  --with-override-langtools
1718                          use this langtools dir for the build
1719  --with-override-corba   use this corba dir for the build
1720  --with-override-jaxp    use this jaxp dir for the build
1721  --with-override-jaxws   use this jaxws dir for the build
1722  --with-override-hotspot use this hotspot dir for the build
1723  --with-override-jdk     use this jdk dir for the build
1724  --with-import-hotspot   import hotspot binaries from this jdk image or
1725                          hotspot build dist dir instead of building from
1726                          source
1727  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1728                          only) [probed]
1729  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1730  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1731  --with-extra-ldflags    extra flags to be used when linking jdk
1732  --with-x                use the X Window System
1733  --with-cups             specify prefix directory for the cups package
1734                          (expecting the headers under PATH/include)
1735  --with-cups-include     specify directory for the cups include files
1736  --with-freetype         specify prefix directory for the freetype2 package
1737                          (expecting the libraries under PATH/lib and the
1738                          headers under PATH/include)
1739  --with-alsa             specify prefix directory for the alsa package
1740                          (expecting the libraries under PATH/lib and the
1741                          headers under PATH/include)
1742  --with-alsa-include     specify directory for the alsa include files
1743  --with-alsa-lib         specify directory for the alsa library
1744  --with-zlib             use zlib from build system or OpenJDK source
1745                          (system, bundled) [bundled]
1746  --with-stdc++lib=<static>,<dynamic>,<default>
1747                          force linking of the C++ runtime on Linux to either
1748                          static or dynamic, default is static with dynamic as
1749                          fallback
1750  --with-num-cores        number of cores in the build system, e.g.
1751                          --with-num-cores=8 [probed]
1752  --with-memory-size      memory (in MB) available in the build system, e.g.
1753                          --with-memory-size=1024 [probed]
1754  --with-sjavac-server-java
1755                          use this java binary for running the sjavac
1756                          background server [Boot JDK java]
1757  --with-sjavac-server-cores
1758                          use at most this number of concurrent threads on the
1759                          sjavac server [probed]
1760  --with-ccache-dir       where to store ccache files [~/.ccache]
1761
1762Some influential environment variables:
1763  PKG_CONFIG  path to pkg-config utility
1764  CC          C compiler command
1765  CFLAGS      C compiler flags
1766  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1767              nonstandard directory <lib dir>
1768  LIBS        libraries to pass to the linker, e.g. -l<library>
1769  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1770              you have headers in a nonstandard directory <include dir>
1771  CXX         C++ compiler command
1772  CXXFLAGS    C++ compiler flags
1773  OBJC        Objective C compiler command
1774  OBJCFLAGS   Objective C compiler flags
1775  CPP         C preprocessor
1776  CXXCPP      C++ preprocessor
1777  XMKMF       Path to xmkmf, Makefile generator for X Window System
1778  FREETYPE2_CFLAGS
1779              C compiler flags for FREETYPE2, overriding pkg-config
1780  FREETYPE2_LIBS
1781              linker flags for FREETYPE2, overriding pkg-config
1782  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1783  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1784
1785Use these variables to override the choices made by `configure' or to help
1786it to find libraries and programs with nonstandard names/locations.
1787
1788Report bugs to <build-dev@openjdk.java.net>.
1789OpenJDK home page: <http://openjdk.java.net>.
1790_ACEOF
1791ac_status=$?
1792fi
1793
1794if test "$ac_init_help" = "recursive"; then
1795  # If there are subdirs, report their specific --help.
1796  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1797    test -d "$ac_dir" ||
1798      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1799      continue
1800    ac_builddir=.
1801
1802case "$ac_dir" in
1803.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1804*)
1805  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1806  # A ".." for each directory in $ac_dir_suffix.
1807  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1808  case $ac_top_builddir_sub in
1809  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1810  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1811  esac ;;
1812esac
1813ac_abs_top_builddir=$ac_pwd
1814ac_abs_builddir=$ac_pwd$ac_dir_suffix
1815# for backward compatibility:
1816ac_top_builddir=$ac_top_build_prefix
1817
1818case $srcdir in
1819  .)  # We are building in place.
1820    ac_srcdir=.
1821    ac_top_srcdir=$ac_top_builddir_sub
1822    ac_abs_top_srcdir=$ac_pwd ;;
1823  [\\/]* | ?:[\\/]* )  # Absolute name.
1824    ac_srcdir=$srcdir$ac_dir_suffix;
1825    ac_top_srcdir=$srcdir
1826    ac_abs_top_srcdir=$srcdir ;;
1827  *) # Relative name.
1828    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1829    ac_top_srcdir=$ac_top_build_prefix$srcdir
1830    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1831esac
1832ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1833
1834    cd "$ac_dir" || { ac_status=$?; continue; }
1835    # Check for guested configure.
1836    if test -f "$ac_srcdir/configure.gnu"; then
1837      echo &&
1838      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1839    elif test -f "$ac_srcdir/configure"; then
1840      echo &&
1841      $SHELL "$ac_srcdir/configure" --help=recursive
1842    else
1843      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1844    fi || ac_status=$?
1845    cd "$ac_pwd" || { ac_status=$?; break; }
1846  done
1847fi
1848
1849test -n "$ac_init_help" && exit $ac_status
1850if $ac_init_version; then
1851  cat <<\_ACEOF
1852OpenJDK configure jdk8
1853generated by GNU Autoconf 2.67
1854
1855Copyright (C) 2010 Free Software Foundation, Inc.
1856This configure script is free software; the Free Software Foundation
1857gives unlimited permission to copy, distribute and modify it.
1858_ACEOF
1859  exit
1860fi
1861
1862## ------------------------ ##
1863## Autoconf initialization. ##
1864## ------------------------ ##
1865
1866# ac_fn_c_try_compile LINENO
1867# --------------------------
1868# Try to compile conftest.$ac_ext, and return whether this succeeded.
1869ac_fn_c_try_compile ()
1870{
1871  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872  rm -f conftest.$ac_objext
1873  if { { ac_try="$ac_compile"
1874case "(($ac_try" in
1875  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876  *) ac_try_echo=$ac_try;;
1877esac
1878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879$as_echo "$ac_try_echo"; } >&5
1880  (eval "$ac_compile") 2>conftest.err
1881  ac_status=$?
1882  if test -s conftest.err; then
1883    grep -v '^ *+' conftest.err >conftest.er1
1884    cat conftest.er1 >&5
1885    mv -f conftest.er1 conftest.err
1886  fi
1887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888  test $ac_status = 0; } && {
1889	 test -z "$ac_c_werror_flag" ||
1890	 test ! -s conftest.err
1891       } && test -s conftest.$ac_objext; then :
1892  ac_retval=0
1893else
1894  $as_echo "$as_me: failed program was:" >&5
1895sed 's/^/| /' conftest.$ac_ext >&5
1896
1897	ac_retval=1
1898fi
1899  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1900  as_fn_set_status $ac_retval
1901
1902} # ac_fn_c_try_compile
1903
1904# ac_fn_cxx_try_compile LINENO
1905# ----------------------------
1906# Try to compile conftest.$ac_ext, and return whether this succeeded.
1907ac_fn_cxx_try_compile ()
1908{
1909  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910  rm -f conftest.$ac_objext
1911  if { { ac_try="$ac_compile"
1912case "(($ac_try" in
1913  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1914  *) ac_try_echo=$ac_try;;
1915esac
1916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1917$as_echo "$ac_try_echo"; } >&5
1918  (eval "$ac_compile") 2>conftest.err
1919  ac_status=$?
1920  if test -s conftest.err; then
1921    grep -v '^ *+' conftest.err >conftest.er1
1922    cat conftest.er1 >&5
1923    mv -f conftest.er1 conftest.err
1924  fi
1925  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1926  test $ac_status = 0; } && {
1927	 test -z "$ac_cxx_werror_flag" ||
1928	 test ! -s conftest.err
1929       } && test -s conftest.$ac_objext; then :
1930  ac_retval=0
1931else
1932  $as_echo "$as_me: failed program was:" >&5
1933sed 's/^/| /' conftest.$ac_ext >&5
1934
1935	ac_retval=1
1936fi
1937  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938  as_fn_set_status $ac_retval
1939
1940} # ac_fn_cxx_try_compile
1941
1942# ac_fn_objc_try_compile LINENO
1943# -----------------------------
1944# Try to compile conftest.$ac_ext, and return whether this succeeded.
1945ac_fn_objc_try_compile ()
1946{
1947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948  rm -f conftest.$ac_objext
1949  if { { ac_try="$ac_compile"
1950case "(($ac_try" in
1951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1952  *) ac_try_echo=$ac_try;;
1953esac
1954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1955$as_echo "$ac_try_echo"; } >&5
1956  (eval "$ac_compile") 2>conftest.err
1957  ac_status=$?
1958  if test -s conftest.err; then
1959    grep -v '^ *+' conftest.err >conftest.er1
1960    cat conftest.er1 >&5
1961    mv -f conftest.er1 conftest.err
1962  fi
1963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964  test $ac_status = 0; } && {
1965	 test -z "$ac_objc_werror_flag" ||
1966	 test ! -s conftest.err
1967       } && test -s conftest.$ac_objext; then :
1968  ac_retval=0
1969else
1970  $as_echo "$as_me: failed program was:" >&5
1971sed 's/^/| /' conftest.$ac_ext >&5
1972
1973	ac_retval=1
1974fi
1975  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1976  as_fn_set_status $ac_retval
1977
1978} # ac_fn_objc_try_compile
1979
1980# ac_fn_c_try_cpp LINENO
1981# ----------------------
1982# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1983ac_fn_c_try_cpp ()
1984{
1985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986  if { { ac_try="$ac_cpp conftest.$ac_ext"
1987case "(($ac_try" in
1988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1989  *) ac_try_echo=$ac_try;;
1990esac
1991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1992$as_echo "$ac_try_echo"; } >&5
1993  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1994  ac_status=$?
1995  if test -s conftest.err; then
1996    grep -v '^ *+' conftest.err >conftest.er1
1997    cat conftest.er1 >&5
1998    mv -f conftest.er1 conftest.err
1999  fi
2000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2001  test $ac_status = 0; } > conftest.i && {
2002	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2003	 test ! -s conftest.err
2004       }; then :
2005  ac_retval=0
2006else
2007  $as_echo "$as_me: failed program was:" >&5
2008sed 's/^/| /' conftest.$ac_ext >&5
2009
2010    ac_retval=1
2011fi
2012  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2013  as_fn_set_status $ac_retval
2014
2015} # ac_fn_c_try_cpp
2016
2017# ac_fn_cxx_try_cpp LINENO
2018# ------------------------
2019# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2020ac_fn_cxx_try_cpp ()
2021{
2022  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023  if { { ac_try="$ac_cpp conftest.$ac_ext"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } > conftest.i && {
2039	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2040	 test ! -s conftest.err
2041       }; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047    ac_retval=1
2048fi
2049  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_cxx_try_cpp
2053
2054# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2055# ---------------------------------------------------------
2056# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2057# the include files in INCLUDES and setting the cache variable VAR
2058# accordingly.
2059ac_fn_cxx_check_header_mongrel ()
2060{
2061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062  if eval "test \"\${$3+set}\"" = set; then :
2063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2064$as_echo_n "checking for $2... " >&6; }
2065if eval "test \"\${$3+set}\"" = set; then :
2066  $as_echo_n "(cached) " >&6
2067fi
2068eval ac_res=\$$3
2069	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070$as_echo "$ac_res" >&6; }
2071else
2072  # Is the header compilable?
2073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2074$as_echo_n "checking $2 usability... " >&6; }
2075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h.  */
2077$4
2078#include <$2>
2079_ACEOF
2080if ac_fn_cxx_try_compile "$LINENO"; then :
2081  ac_header_compiler=yes
2082else
2083  ac_header_compiler=no
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2087$as_echo "$ac_header_compiler" >&6; }
2088
2089# Is the header present?
2090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2091$as_echo_n "checking $2 presence... " >&6; }
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h.  */
2094#include <$2>
2095_ACEOF
2096if ac_fn_cxx_try_cpp "$LINENO"; then :
2097  ac_header_preproc=yes
2098else
2099  ac_header_preproc=no
2100fi
2101rm -f conftest.err conftest.i conftest.$ac_ext
2102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2103$as_echo "$ac_header_preproc" >&6; }
2104
2105# So?  What about this header?
2106case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2107  yes:no: )
2108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2109$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2110    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2111$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2112    ;;
2113  no:yes:* )
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2115$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2117$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2119$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2121$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2123$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2124( $as_echo "## ----------------------------------------- ##
2125## Report this to build-dev@openjdk.java.net ##
2126## ----------------------------------------- ##"
2127     ) | sed "s/^/$as_me: WARNING:     /" >&2
2128    ;;
2129esac
2130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2131$as_echo_n "checking for $2... " >&6; }
2132if eval "test \"\${$3+set}\"" = set; then :
2133  $as_echo_n "(cached) " >&6
2134else
2135  eval "$3=\$ac_header_compiler"
2136fi
2137eval ac_res=\$$3
2138	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2139$as_echo "$ac_res" >&6; }
2140fi
2141  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2142
2143} # ac_fn_cxx_check_header_mongrel
2144
2145# ac_fn_cxx_try_run LINENO
2146# ------------------------
2147# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2148# that executables *can* be run.
2149ac_fn_cxx_try_run ()
2150{
2151  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152  if { { ac_try="$ac_link"
2153case "(($ac_try" in
2154  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2155  *) ac_try_echo=$ac_try;;
2156esac
2157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2158$as_echo "$ac_try_echo"; } >&5
2159  (eval "$ac_link") 2>&5
2160  ac_status=$?
2161  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2162  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2163  { { case "(($ac_try" in
2164  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2165  *) ac_try_echo=$ac_try;;
2166esac
2167eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2168$as_echo "$ac_try_echo"; } >&5
2169  (eval "$ac_try") 2>&5
2170  ac_status=$?
2171  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2172  test $ac_status = 0; }; }; then :
2173  ac_retval=0
2174else
2175  $as_echo "$as_me: program exited with status $ac_status" >&5
2176       $as_echo "$as_me: failed program was:" >&5
2177sed 's/^/| /' conftest.$ac_ext >&5
2178
2179       ac_retval=$ac_status
2180fi
2181  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2182  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2183  as_fn_set_status $ac_retval
2184
2185} # ac_fn_cxx_try_run
2186
2187# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2188# ---------------------------------------------------------
2189# Tests whether HEADER exists and can be compiled using the include files in
2190# INCLUDES, setting the cache variable VAR accordingly.
2191ac_fn_cxx_check_header_compile ()
2192{
2193  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2195$as_echo_n "checking for $2... " >&6; }
2196if eval "test \"\${$3+set}\"" = set; then :
2197  $as_echo_n "(cached) " >&6
2198else
2199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h.  */
2201$4
2202#include <$2>
2203_ACEOF
2204if ac_fn_cxx_try_compile "$LINENO"; then :
2205  eval "$3=yes"
2206else
2207  eval "$3=no"
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2215
2216} # ac_fn_cxx_check_header_compile
2217
2218# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2219# ----------------------------------------------
2220# Tries to find the compile-time value of EXPR in a program that includes
2221# INCLUDES, setting VAR accordingly. Returns whether the value could be
2222# computed
2223ac_fn_cxx_compute_int ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if test "$cross_compiling" = yes; then
2227    # Depending upon the size, compute the lo and hi bounds.
2228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h.  */
2230$4
2231int
2232main ()
2233{
2234static int test_array [1 - 2 * !(($2) >= 0)];
2235test_array [0] = 0
2236
2237  ;
2238  return 0;
2239}
2240_ACEOF
2241if ac_fn_cxx_try_compile "$LINENO"; then :
2242  ac_lo=0 ac_mid=0
2243  while :; do
2244    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h.  */
2246$4
2247int
2248main ()
2249{
2250static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2251test_array [0] = 0
2252
2253  ;
2254  return 0;
2255}
2256_ACEOF
2257if ac_fn_cxx_try_compile "$LINENO"; then :
2258  ac_hi=$ac_mid; break
2259else
2260  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2261			if test $ac_lo -le $ac_mid; then
2262			  ac_lo= ac_hi=
2263			  break
2264			fi
2265			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2266fi
2267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2268  done
2269else
2270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h.  */
2272$4
2273int
2274main ()
2275{
2276static int test_array [1 - 2 * !(($2) < 0)];
2277test_array [0] = 0
2278
2279  ;
2280  return 0;
2281}
2282_ACEOF
2283if ac_fn_cxx_try_compile "$LINENO"; then :
2284  ac_hi=-1 ac_mid=-1
2285  while :; do
2286    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287/* end confdefs.h.  */
2288$4
2289int
2290main ()
2291{
2292static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2293test_array [0] = 0
2294
2295  ;
2296  return 0;
2297}
2298_ACEOF
2299if ac_fn_cxx_try_compile "$LINENO"; then :
2300  ac_lo=$ac_mid; break
2301else
2302  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2303			if test $ac_mid -le $ac_hi; then
2304			  ac_lo= ac_hi=
2305			  break
2306			fi
2307			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2308fi
2309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310  done
2311else
2312  ac_lo= ac_hi=
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315fi
2316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317# Binary search between lo and hi bounds.
2318while test "x$ac_lo" != "x$ac_hi"; do
2319  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h.  */
2322$4
2323int
2324main ()
2325{
2326static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2327test_array [0] = 0
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid
2335else
2336  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339done
2340case $ac_lo in #((
2341?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2342'') ac_retval=1 ;;
2343esac
2344  else
2345    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h.  */
2347$4
2348static long int longval () { return $2; }
2349static unsigned long int ulongval () { return $2; }
2350#include <stdio.h>
2351#include <stdlib.h>
2352int
2353main ()
2354{
2355
2356  FILE *f = fopen ("conftest.val", "w");
2357  if (! f)
2358    return 1;
2359  if (($2) < 0)
2360    {
2361      long int i = longval ();
2362      if (i != ($2))
2363	return 1;
2364      fprintf (f, "%ld", i);
2365    }
2366  else
2367    {
2368      unsigned long int i = ulongval ();
2369      if (i != ($2))
2370	return 1;
2371      fprintf (f, "%lu", i);
2372    }
2373  /* Do not output a trailing newline, as this causes \r\n confusion
2374     on some platforms.  */
2375  return ferror (f) || fclose (f) != 0;
2376
2377  ;
2378  return 0;
2379}
2380_ACEOF
2381if ac_fn_cxx_try_run "$LINENO"; then :
2382  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2383else
2384  ac_retval=1
2385fi
2386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2387  conftest.$ac_objext conftest.beam conftest.$ac_ext
2388rm -f conftest.val
2389
2390  fi
2391  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2392  as_fn_set_status $ac_retval
2393
2394} # ac_fn_cxx_compute_int
2395
2396# ac_fn_cxx_try_link LINENO
2397# -------------------------
2398# Try to link conftest.$ac_ext, and return whether this succeeded.
2399ac_fn_cxx_try_link ()
2400{
2401  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2402  rm -f conftest.$ac_objext conftest$ac_exeext
2403  if { { ac_try="$ac_link"
2404case "(($ac_try" in
2405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2406  *) ac_try_echo=$ac_try;;
2407esac
2408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2409$as_echo "$ac_try_echo"; } >&5
2410  (eval "$ac_link") 2>conftest.err
2411  ac_status=$?
2412  if test -s conftest.err; then
2413    grep -v '^ *+' conftest.err >conftest.er1
2414    cat conftest.er1 >&5
2415    mv -f conftest.er1 conftest.err
2416  fi
2417  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2418  test $ac_status = 0; } && {
2419	 test -z "$ac_cxx_werror_flag" ||
2420	 test ! -s conftest.err
2421       } && test -s conftest$ac_exeext && {
2422	 test "$cross_compiling" = yes ||
2423	 $as_test_x conftest$ac_exeext
2424       }; then :
2425  ac_retval=0
2426else
2427  $as_echo "$as_me: failed program was:" >&5
2428sed 's/^/| /' conftest.$ac_ext >&5
2429
2430	ac_retval=1
2431fi
2432  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2433  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2434  # interfere with the next link command; also delete a directory that is
2435  # left behind by Apple's compiler.  We do this before executing the actions.
2436  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2437  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438  as_fn_set_status $ac_retval
2439
2440} # ac_fn_cxx_try_link
2441
2442# ac_fn_cxx_check_func LINENO FUNC VAR
2443# ------------------------------------
2444# Tests whether FUNC exists, setting the cache variable VAR accordingly
2445ac_fn_cxx_check_func ()
2446{
2447  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2449$as_echo_n "checking for $2... " >&6; }
2450if eval "test \"\${$3+set}\"" = set; then :
2451  $as_echo_n "(cached) " >&6
2452else
2453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2456   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2457#define $2 innocuous_$2
2458
2459/* System header to define __stub macros and hopefully few prototypes,
2460    which can conflict with char $2 (); below.
2461    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2462    <limits.h> exists even on freestanding compilers.  */
2463
2464#ifdef __STDC__
2465# include <limits.h>
2466#else
2467# include <assert.h>
2468#endif
2469
2470#undef $2
2471
2472/* Override any GCC internal prototype to avoid an error.
2473   Use char because int might match the return type of a GCC
2474   builtin and then its argument prototype would still apply.  */
2475#ifdef __cplusplus
2476extern "C"
2477#endif
2478char $2 ();
2479/* The GNU C library defines this for functions which it implements
2480    to always fail with ENOSYS.  Some functions are actually named
2481    something starting with __ and the normal name is an alias.  */
2482#if defined __stub_$2 || defined __stub___$2
2483choke me
2484#endif
2485
2486int
2487main ()
2488{
2489return $2 ();
2490  ;
2491  return 0;
2492}
2493_ACEOF
2494if ac_fn_cxx_try_link "$LINENO"; then :
2495  eval "$3=yes"
2496else
2497  eval "$3=no"
2498fi
2499rm -f core conftest.err conftest.$ac_objext \
2500    conftest$ac_exeext conftest.$ac_ext
2501fi
2502eval ac_res=\$$3
2503	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2504$as_echo "$ac_res" >&6; }
2505  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2506
2507} # ac_fn_cxx_check_func
2508
2509# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2510# -------------------------------------------------------
2511# Tests whether HEADER exists and can be compiled using the include files in
2512# INCLUDES, setting the cache variable VAR accordingly.
2513ac_fn_c_check_header_compile ()
2514{
2515  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2517$as_echo_n "checking for $2... " >&6; }
2518if eval "test \"\${$3+set}\"" = set; then :
2519  $as_echo_n "(cached) " >&6
2520else
2521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2522/* end confdefs.h.  */
2523$4
2524#include <$2>
2525_ACEOF
2526if ac_fn_c_try_compile "$LINENO"; then :
2527  eval "$3=yes"
2528else
2529  eval "$3=no"
2530fi
2531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2532fi
2533eval ac_res=\$$3
2534	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2535$as_echo "$ac_res" >&6; }
2536  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2537
2538} # ac_fn_c_check_header_compile
2539cat >config.log <<_ACEOF
2540This file contains any messages produced by compilers while
2541running configure, to aid debugging if configure makes a mistake.
2542
2543It was created by OpenJDK $as_me jdk8, which was
2544generated by GNU Autoconf 2.67.  Invocation command line was
2545
2546  $ $0 $@
2547
2548_ACEOF
2549exec 5>>config.log
2550{
2551cat <<_ASUNAME
2552## --------- ##
2553## Platform. ##
2554## --------- ##
2555
2556hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2557uname -m = `(uname -m) 2>/dev/null || echo unknown`
2558uname -r = `(uname -r) 2>/dev/null || echo unknown`
2559uname -s = `(uname -s) 2>/dev/null || echo unknown`
2560uname -v = `(uname -v) 2>/dev/null || echo unknown`
2561
2562/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2563/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2564
2565/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2566/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2567/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2568/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2569/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2570/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2571/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2572
2573_ASUNAME
2574
2575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2576for as_dir in $PATH
2577do
2578  IFS=$as_save_IFS
2579  test -z "$as_dir" && as_dir=.
2580    $as_echo "PATH: $as_dir"
2581  done
2582IFS=$as_save_IFS
2583
2584} >&5
2585
2586cat >&5 <<_ACEOF
2587
2588
2589## ----------- ##
2590## Core tests. ##
2591## ----------- ##
2592
2593_ACEOF
2594
2595
2596# Keep a trace of the command line.
2597# Strip out --no-create and --no-recursion so they do not pile up.
2598# Strip out --silent because we don't want to record it for future runs.
2599# Also quote any args containing shell meta-characters.
2600# Make two passes to allow for proper duplicate-argument suppression.
2601ac_configure_args=
2602ac_configure_args0=
2603ac_configure_args1=
2604ac_must_keep_next=false
2605for ac_pass in 1 2
2606do
2607  for ac_arg
2608  do
2609    case $ac_arg in
2610    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2611    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2612    | -silent | --silent | --silen | --sile | --sil)
2613      continue ;;
2614    *\'*)
2615      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2616    esac
2617    case $ac_pass in
2618    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2619    2)
2620      as_fn_append ac_configure_args1 " '$ac_arg'"
2621      if test $ac_must_keep_next = true; then
2622	ac_must_keep_next=false # Got value, back to normal.
2623      else
2624	case $ac_arg in
2625	  *=* | --config-cache | -C | -disable-* | --disable-* \
2626	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2627	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2628	  | -with-* | --with-* | -without-* | --without-* | --x)
2629	    case "$ac_configure_args0 " in
2630	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2631	    esac
2632	    ;;
2633	  -* ) ac_must_keep_next=true ;;
2634	esac
2635      fi
2636      as_fn_append ac_configure_args " '$ac_arg'"
2637      ;;
2638    esac
2639  done
2640done
2641{ ac_configure_args0=; unset ac_configure_args0;}
2642{ ac_configure_args1=; unset ac_configure_args1;}
2643
2644# When interrupted or exit'd, cleanup temporary files, and complete
2645# config.log.  We remove comments because anyway the quotes in there
2646# would cause problems or look ugly.
2647# WARNING: Use '\'' to represent an apostrophe within the trap.
2648# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2649trap 'exit_status=$?
2650  # Save into config.log some information that might help in debugging.
2651  {
2652    echo
2653
2654    $as_echo "## ---------------- ##
2655## Cache variables. ##
2656## ---------------- ##"
2657    echo
2658    # The following way of writing the cache mishandles newlines in values,
2659(
2660  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2661    eval ac_val=\$$ac_var
2662    case $ac_val in #(
2663    *${as_nl}*)
2664      case $ac_var in #(
2665      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2666$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2667      esac
2668      case $ac_var in #(
2669      _ | IFS | as_nl) ;; #(
2670      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2671      *) { eval $ac_var=; unset $ac_var;} ;;
2672      esac ;;
2673    esac
2674  done
2675  (set) 2>&1 |
2676    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2677    *${as_nl}ac_space=\ *)
2678      sed -n \
2679	"s/'\''/'\''\\\\'\'''\''/g;
2680	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2681      ;; #(
2682    *)
2683      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2684      ;;
2685    esac |
2686    sort
2687)
2688    echo
2689
2690    $as_echo "## ----------------- ##
2691## Output variables. ##
2692## ----------------- ##"
2693    echo
2694    for ac_var in $ac_subst_vars
2695    do
2696      eval ac_val=\$$ac_var
2697      case $ac_val in
2698      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2699      esac
2700      $as_echo "$ac_var='\''$ac_val'\''"
2701    done | sort
2702    echo
2703
2704    if test -n "$ac_subst_files"; then
2705      $as_echo "## ------------------- ##
2706## File substitutions. ##
2707## ------------------- ##"
2708      echo
2709      for ac_var in $ac_subst_files
2710      do
2711	eval ac_val=\$$ac_var
2712	case $ac_val in
2713	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2714	esac
2715	$as_echo "$ac_var='\''$ac_val'\''"
2716      done | sort
2717      echo
2718    fi
2719
2720    if test -s confdefs.h; then
2721      $as_echo "## ----------- ##
2722## confdefs.h. ##
2723## ----------- ##"
2724      echo
2725      cat confdefs.h
2726      echo
2727    fi
2728    test "$ac_signal" != 0 &&
2729      $as_echo "$as_me: caught signal $ac_signal"
2730    $as_echo "$as_me: exit $exit_status"
2731  } >&5
2732  rm -f core *.core core.conftest.* &&
2733    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2734    exit $exit_status
2735' 0
2736for ac_signal in 1 2 13 15; do
2737  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2738done
2739ac_signal=0
2740
2741# confdefs.h avoids OS command line length limits that DEFS can exceed.
2742rm -f -r conftest* confdefs.h
2743
2744$as_echo "/* confdefs.h */" > confdefs.h
2745
2746# Predefined preprocessor variables.
2747
2748cat >>confdefs.h <<_ACEOF
2749#define PACKAGE_NAME "$PACKAGE_NAME"
2750_ACEOF
2751
2752cat >>confdefs.h <<_ACEOF
2753#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2754_ACEOF
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_VERSION "$PACKAGE_VERSION"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_STRING "$PACKAGE_STRING"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_URL "$PACKAGE_URL"
2770_ACEOF
2771
2772
2773# Let the site file select an alternate cache file if it wants to.
2774# Prefer an explicitly selected file to automatically selected ones.
2775ac_site_file1=NONE
2776ac_site_file2=NONE
2777if test -n "$CONFIG_SITE"; then
2778  # We do not want a PATH search for config.site.
2779  case $CONFIG_SITE in #((
2780    -*)  ac_site_file1=./$CONFIG_SITE;;
2781    */*) ac_site_file1=$CONFIG_SITE;;
2782    *)   ac_site_file1=./$CONFIG_SITE;;
2783  esac
2784elif test "x$prefix" != xNONE; then
2785  ac_site_file1=$prefix/share/config.site
2786  ac_site_file2=$prefix/etc/config.site
2787else
2788  ac_site_file1=$ac_default_prefix/share/config.site
2789  ac_site_file2=$ac_default_prefix/etc/config.site
2790fi
2791for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2792do
2793  test "x$ac_site_file" = xNONE && continue
2794  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2795    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2796$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2797    sed 's/^/| /' "$ac_site_file" >&5
2798    . "$ac_site_file" \
2799      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2801as_fn_error $? "failed to load site script $ac_site_file
2802See \`config.log' for more details" "$LINENO" 5 ; }
2803  fi
2804done
2805
2806if test -r "$cache_file"; then
2807  # Some versions of bash will fail to source /dev/null (special files
2808  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2809  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2810    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2811$as_echo "$as_me: loading cache $cache_file" >&6;}
2812    case $cache_file in
2813      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2814      *)                      . "./$cache_file";;
2815    esac
2816  fi
2817else
2818  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2819$as_echo "$as_me: creating cache $cache_file" >&6;}
2820  >$cache_file
2821fi
2822
2823# Check that the precious variables saved in the cache have kept the same
2824# value.
2825ac_cache_corrupted=false
2826for ac_var in $ac_precious_vars; do
2827  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2828  eval ac_new_set=\$ac_env_${ac_var}_set
2829  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2830  eval ac_new_val=\$ac_env_${ac_var}_value
2831  case $ac_old_set,$ac_new_set in
2832    set,)
2833      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2834$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2835      ac_cache_corrupted=: ;;
2836    ,set)
2837      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2838$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2839      ac_cache_corrupted=: ;;
2840    ,);;
2841    *)
2842      if test "x$ac_old_val" != "x$ac_new_val"; then
2843	# differences in whitespace do not lead to failure.
2844	ac_old_val_w=`echo x $ac_old_val`
2845	ac_new_val_w=`echo x $ac_new_val`
2846	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2847	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2848$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2849	  ac_cache_corrupted=:
2850	else
2851	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2852$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2853	  eval $ac_var=\$ac_old_val
2854	fi
2855	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2856$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2857	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2858$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2859      fi;;
2860  esac
2861  # Pass precious variables to config.status.
2862  if test "$ac_new_set" = set; then
2863    case $ac_new_val in
2864    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2865    *) ac_arg=$ac_var=$ac_new_val ;;
2866    esac
2867    case " $ac_configure_args " in
2868      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2869      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2870    esac
2871  fi
2872done
2873if $ac_cache_corrupted; then
2874  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2876  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2877$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2878  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2879fi
2880## -------------------- ##
2881## Main body of script. ##
2882## -------------------- ##
2883
2884ac_ext=c
2885ac_cpp='$CPP $CPPFLAGS'
2886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2888ac_compiler_gnu=$ac_cv_c_compiler_gnu
2889
2890
2891
2892ac_aux_dir=
2893for ac_dir in build-aux "$srcdir"/build-aux; do
2894  if test -f "$ac_dir/install-sh"; then
2895    ac_aux_dir=$ac_dir
2896    ac_install_sh="$ac_aux_dir/install-sh -c"
2897    break
2898  elif test -f "$ac_dir/install.sh"; then
2899    ac_aux_dir=$ac_dir
2900    ac_install_sh="$ac_aux_dir/install.sh -c"
2901    break
2902  elif test -f "$ac_dir/shtool"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/shtool install -c"
2905    break
2906  fi
2907done
2908if test -z "$ac_aux_dir"; then
2909  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2910fi
2911
2912# These three variables are undocumented and unsupported,
2913# and are intended to be withdrawn in a future Autoconf release.
2914# They can cause serious problems if a builder's source tree is in a directory
2915# whose full name contains unusual characters.
2916ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2917ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2918ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2919
2920
2921# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2922#
2923# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2924#
2925# This program is free software; you can redistribute it and/or modify
2926# it under the terms of the GNU General Public License as published by
2927# the Free Software Foundation; either version 2 of the License, or
2928# (at your option) any later version.
2929#
2930# This program is distributed in the hope that it will be useful, but
2931# WITHOUT ANY WARRANTY; without even the implied warranty of
2932# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2933# General Public License for more details.
2934#
2935# You should have received a copy of the GNU General Public License
2936# along with this program; if not, write to the Free Software
2937# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2938#
2939# As a special exception to the GNU General Public License, if you
2940# distribute this file as part of a program that contains a
2941# configuration script generated by Autoconf, you may include it under
2942# the same distribution terms that you use for the rest of that program.
2943
2944# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2945# ----------------------------------
2946# PKG_PROG_PKG_CONFIG
2947
2948# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2949#
2950# Check to see whether a particular set of modules exists.  Similar
2951# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2952#
2953#
2954# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2955# this or PKG_CHECK_MODULES is called, or make sure to call
2956# PKG_CHECK_EXISTS manually
2957# --------------------------------------------------------------
2958
2959
2960
2961# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2962# ---------------------------------------------
2963# _PKG_CONFIG
2964
2965# _PKG_SHORT_ERRORS_SUPPORTED
2966# -----------------------------
2967# _PKG_SHORT_ERRORS_SUPPORTED
2968
2969
2970# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2971# [ACTION-IF-NOT-FOUND])
2972#
2973#
2974# Note that if there is a possibility the first call to
2975# PKG_CHECK_MODULES might not happen, you should be sure to include an
2976# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2977#
2978#
2979# --------------------------------------------------------------
2980# PKG_CHECK_MODULES
2981
2982
2983# Include these first...
2984#
2985# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2986# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2987#
2988# This code is free software; you can redistribute it and/or modify it
2989# under the terms of the GNU General Public License version 2 only, as
2990# published by the Free Software Foundation.  Oracle designates this
2991# particular file as subject to the "Classpath" exception as provided
2992# by Oracle in the LICENSE file that accompanied this code.
2993#
2994# This code is distributed in the hope that it will be useful, but WITHOUT
2995# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2996# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2997# version 2 for more details (a copy is included in the LICENSE file that
2998# accompanied this code).
2999#
3000# You should have received a copy of the GNU General Public License version
3001# 2 along with this work; if not, write to the Free Software Foundation,
3002# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3003#
3004# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3005# or visit www.oracle.com if you need additional information or have any
3006# questions.
3007#
3008
3009
3010
3011# This will make sure the given variable points to a full and proper
3012# path. This means:
3013# 1) There will be no spaces in the path. On posix platforms,
3014#    spaces in the path will result in an error. On Windows,
3015#    the path will be rewritten using short-style to be space-free.
3016# 2) The path will be absolute, and it will be in unix-style (on
3017#     cygwin).
3018# $1: The name of the variable to fix
3019
3020
3021# This will make sure the given variable points to a executable
3022# with a full and proper path. This means:
3023# 1) There will be no spaces in the path. On posix platforms,
3024#    spaces in the path will result in an error. On Windows,
3025#    the path will be rewritten using short-style to be space-free.
3026# 2) The path will be absolute, and it will be in unix-style (on
3027#     cygwin).
3028# Any arguments given to the executable is preserved.
3029# If the input variable does not have a directory specification, then
3030# it need to be in the PATH.
3031# $1: The name of the variable to fix
3032
3033
3034
3035
3036
3037
3038# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3039# $1: variable to check
3040# $2: executable name to print in warning (optional)
3041
3042
3043# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3044# Arguments as AC_PATH_PROG:
3045# $1: variable to set
3046# $2: executable name to look for
3047
3048
3049# Setup the most fundamental tools that relies on not much else to set up,
3050# but is used by much of the early bootstrap code.
3051
3052
3053# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3054
3055
3056
3057
3058
3059
3060
3061#%%% Simple tools %%%
3062
3063# Check if we have found a usable version of make
3064# $1: the path to a potential make binary (or empty)
3065# $2: the description on how we found this
3066
3067
3068# Goes looking for a usable version of GNU make.
3069
3070
3071
3072
3073
3074
3075# Check if build directory is on local disk. If not possible to determine,
3076# we prefer to claim it's local.
3077# Argument 1: directory to test
3078# Argument 2: what to do if it is on local disk
3079# Argument 3: what to do otherwise (remote disk or failure)
3080
3081
3082
3083
3084#
3085# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3086# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3087#
3088# This code is free software; you can redistribute it and/or modify it
3089# under the terms of the GNU General Public License version 2 only, as
3090# published by the Free Software Foundation.  Oracle designates this
3091# particular file as subject to the "Classpath" exception as provided
3092# by Oracle in the LICENSE file that accompanied this code.
3093#
3094# This code is distributed in the hope that it will be useful, but WITHOUT
3095# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3096# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3097# version 2 for more details (a copy is included in the LICENSE file that
3098# accompanied this code).
3099#
3100# You should have received a copy of the GNU General Public License version
3101# 2 along with this work; if not, write to the Free Software Foundation,
3102# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3103#
3104# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3105# or visit www.oracle.com if you need additional information or have any
3106# questions.
3107#
3108
3109
3110
3111
3112
3113# Helper function which possibly converts a path using DOS-style short mode.
3114# If so, the updated path is stored in $new_path.
3115# $1: The path to check
3116
3117
3118# Helper function which possibly converts a path using DOS-style short mode.
3119# If so, the updated path is stored in $new_path.
3120# $1: The path to check
3121
3122
3123# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3124# and could probably be heavily simplified. However, all changes in this
3125# area tend to need lot of testing in different scenarios, and in lack of
3126# proper unit testing, cleaning this up has not been deemed worth the effort
3127# at the moment.
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3138
3139
3140
3141
3142#
3143# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3144# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3145#
3146# This code is free software; you can redistribute it and/or modify it
3147# under the terms of the GNU General Public License version 2 only, as
3148# published by the Free Software Foundation.  Oracle designates this
3149# particular file as subject to the "Classpath" exception as provided
3150# by Oracle in the LICENSE file that accompanied this code.
3151#
3152# This code is distributed in the hope that it will be useful, but WITHOUT
3153# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3154# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3155# version 2 for more details (a copy is included in the LICENSE file that
3156# accompanied this code).
3157#
3158# You should have received a copy of the GNU General Public License version
3159# 2 along with this work; if not, write to the Free Software Foundation,
3160# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3161#
3162# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3163# or visit www.oracle.com if you need additional information or have any
3164# questions.
3165#
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177# ... then the rest
3178#
3179# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3180# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3181#
3182# This code is free software; you can redistribute it and/or modify it
3183# under the terms of the GNU General Public License version 2 only, as
3184# published by the Free Software Foundation.  Oracle designates this
3185# particular file as subject to the "Classpath" exception as provided
3186# by Oracle in the LICENSE file that accompanied this code.
3187#
3188# This code is distributed in the hope that it will be useful, but WITHOUT
3189# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3190# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3191# version 2 for more details (a copy is included in the LICENSE file that
3192# accompanied this code).
3193#
3194# You should have received a copy of the GNU General Public License version
3195# 2 along with this work; if not, write to the Free Software Foundation,
3196# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3197#
3198# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3199# or visit www.oracle.com if you need additional information or have any
3200# questions.
3201#
3202
3203# Execute the check given as argument, and verify the result
3204# If the Boot JDK was previously found, do nothing
3205# $1 A command line (typically autoconf macro) to execute
3206
3207
3208# Test: Is bootjdk explicitely set by command line arguments?
3209
3210
3211# Test: Is bootjdk available from builddeps?
3212
3213
3214# Test: Is $JAVA_HOME set?
3215
3216
3217# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3218
3219
3220# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3221
3222
3223# Look for a jdk in the given path. If there are multiple, try to select the newest.
3224# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3225# $1 = Path to directory containing jdk installations.
3226# $2 = String to append to the found JDK directory to get the proper JDK home
3227
3228
3229# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3230# environmental variable as base for where to look.
3231# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3232
3233
3234# Test: Is there a JDK installed in default, well-known locations?
3235
3236
3237# Check that a command-line tool in the Boot JDK is correct
3238# $1 = name of variable to assign
3239# $2 = name of binary
3240
3241
3242###############################################################################
3243#
3244# We need a Boot JDK to bootstrap the build.
3245#
3246
3247
3248
3249
3250
3251#
3252# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3253# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3254#
3255# This code is free software; you can redistribute it and/or modify it
3256# under the terms of the GNU General Public License version 2 only, as
3257# published by the Free Software Foundation.  Oracle designates this
3258# particular file as subject to the "Classpath" exception as provided
3259# by Oracle in the LICENSE file that accompanied this code.
3260#
3261# This code is distributed in the hope that it will be useful, but WITHOUT
3262# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3263# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3264# version 2 for more details (a copy is included in the LICENSE file that
3265# accompanied this code).
3266#
3267# You should have received a copy of the GNU General Public License version
3268# 2 along with this work; if not, write to the Free Software Foundation,
3269# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3270#
3271# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3272# or visit www.oracle.com if you need additional information or have any
3273# questions.
3274#
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293#
3294# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318
3319
3320
3321
3322cygwin_help() {
3323    case $1 in
3324    unzip)
3325        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3326    zip)
3327        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3328    make)
3329        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3330    * )
3331       break ;;
3332    esac
3333}
3334
3335apt_help() {
3336    case $1 in
3337    devkit)
3338        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3339    openjdk)
3340        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3341    alsa)
3342        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3343    cups)
3344        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3345    freetype2)
3346        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3347    pulse)
3348        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3349    x11)
3350        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3351    ccache)
3352        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3353    * )
3354       break ;;
3355    esac
3356}
3357
3358yum_help() {
3359    case $1 in
3360    devkit)
3361        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3362    openjdk)
3363        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3364    alsa)
3365        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3366    cups)
3367        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3368    freetype2)
3369        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3370    pulse)
3371        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3372    x11)
3373        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3374    ccache)
3375        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3376    * )
3377       break ;;
3378    esac
3379}
3380
3381port_help() {
3382    PKGHANDLER_COMMAND=""
3383}
3384
3385pkgutil_help() {
3386    PKGHANDLER_COMMAND=""
3387}
3388
3389pkgadd_help() {
3390    PKGHANDLER_COMMAND=""
3391}
3392
3393
3394
3395#
3396# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3397# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3398#
3399# This code is free software; you can redistribute it and/or modify it
3400# under the terms of the GNU General Public License version 2 only, as
3401# published by the Free Software Foundation.  Oracle designates this
3402# particular file as subject to the "Classpath" exception as provided
3403# by Oracle in the LICENSE file that accompanied this code.
3404#
3405# This code is distributed in the hope that it will be useful, but WITHOUT
3406# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3407# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3408# version 2 for more details (a copy is included in the LICENSE file that
3409# accompanied this code).
3410#
3411# You should have received a copy of the GNU General Public License version
3412# 2 along with this work; if not, write to the Free Software Foundation,
3413# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3414#
3415# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3416# or visit www.oracle.com if you need additional information or have any
3417# questions.
3418#
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434# Support for customization of the build process. Some build files
3435# will include counterparts from this location, if they exist. This allows
3436# for a degree of customization of the build targets and the rules/recipes
3437# to create them
3438
3439# Check whether --with-custom-make-dir was given.
3440if test "${with_custom_make_dir+set}" = set; then :
3441  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3442fi
3443
3444
3445
3446#
3447# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3448# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3449#
3450# This code is free software; you can redistribute it and/or modify it
3451# under the terms of the GNU General Public License version 2 only, as
3452# published by the Free Software Foundation.  Oracle designates this
3453# particular file as subject to the "Classpath" exception as provided
3454# by Oracle in the LICENSE file that accompanied this code.
3455#
3456# This code is distributed in the hope that it will be useful, but WITHOUT
3457# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3458# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3459# version 2 for more details (a copy is included in the LICENSE file that
3460# accompanied this code).
3461#
3462# You should have received a copy of the GNU General Public License version
3463# 2 along with this work; if not, write to the Free Software Foundation,
3464# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3465#
3466# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3467# or visit www.oracle.com if you need additional information or have any
3468# questions.
3469#
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485#
3486# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3487# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3488#
3489# This code is free software; you can redistribute it and/or modify it
3490# under the terms of the GNU General Public License version 2 only, as
3491# published by the Free Software Foundation.  Oracle designates this
3492# particular file as subject to the "Classpath" exception as provided
3493# by Oracle in the LICENSE file that accompanied this code.
3494#
3495# This code is distributed in the hope that it will be useful, but WITHOUT
3496# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3497# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3498# version 2 for more details (a copy is included in the LICENSE file that
3499# accompanied this code).
3500#
3501# You should have received a copy of the GNU General Public License version
3502# 2 along with this work; if not, write to the Free Software Foundation,
3503# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3504#
3505# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3506# or visit www.oracle.com if you need additional information or have any
3507# questions.
3508#
3509
3510# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3511# Converts autoconf style CPU name to OpenJDK style, into
3512# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3513
3514
3515# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3516# Converts autoconf style OS name to OpenJDK style, into
3517# VAR_OS and VAR_OS_API.
3518
3519
3520# Expects $host_os $host_cpu $build_os and $build_cpu
3521# and $with_target_bits to have been setup!
3522#
3523# Translate the standard triplet(quadruplet) definition
3524# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3525# OPENJDK_BUILD_OS, etc.
3526
3527
3528# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3529# accordingly. Must be done after setting up build and target system, but before
3530# doing anything else with these values.
3531
3532
3533    # Setup the legacy variables, for controlling the old makefiles.
3534    #
3535
3536
3537
3538
3539#%%% Build and target systems %%%
3540
3541
3542
3543
3544# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3545# Add -mX to various FLAGS variables.
3546
3547
3548
3549
3550
3551
3552#
3553# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3554# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3555#
3556# This code is free software; you can redistribute it and/or modify it
3557# under the terms of the GNU General Public License version 2 only, as
3558# published by the Free Software Foundation.  Oracle designates this
3559# particular file as subject to the "Classpath" exception as provided
3560# by Oracle in the LICENSE file that accompanied this code.
3561#
3562# This code is distributed in the hope that it will be useful, but WITHOUT
3563# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3564# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3565# version 2 for more details (a copy is included in the LICENSE file that
3566# accompanied this code).
3567#
3568# You should have received a copy of the GNU General Public License version
3569# 2 along with this work; if not, write to the Free Software Foundation,
3570# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3571#
3572# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3573# or visit www.oracle.com if you need additional information or have any
3574# questions.
3575#
3576
3577
3578
3579
3580
3581
3582
3583
3584#
3585# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3587#
3588# This code is free software; you can redistribute it and/or modify it
3589# under the terms of the GNU General Public License version 2 only, as
3590# published by the Free Software Foundation.  Oracle designates this
3591# particular file as subject to the "Classpath" exception as provided
3592# by Oracle in the LICENSE file that accompanied this code.
3593#
3594# This code is distributed in the hope that it will be useful, but WITHOUT
3595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3597# version 2 for more details (a copy is included in the LICENSE file that
3598# accompanied this code).
3599#
3600# You should have received a copy of the GNU General Public License version
3601# 2 along with this work; if not, write to the Free Software Foundation,
3602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3603#
3604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3605# or visit www.oracle.com if you need additional information or have any
3606# questions.
3607#
3608
3609# $1 = compiler to test (CC or CXX)
3610# $2 = human readable name of compiler (C or C++)
3611
3612
3613
3614
3615
3616# $1 = compiler to test (CC or CXX)
3617# $2 = human readable name of compiler (C or C++)
3618# $3 = list of compiler names to search for
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631#
3632# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3633# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3634#
3635# This code is free software; you can redistribute it and/or modify it
3636# under the terms of the GNU General Public License version 2 only, as
3637# published by the Free Software Foundation.  Oracle designates this
3638# particular file as subject to the "Classpath" exception as provided
3639# by Oracle in the LICENSE file that accompanied this code.
3640#
3641# This code is distributed in the hope that it will be useful, but WITHOUT
3642# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3643# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3644# version 2 for more details (a copy is included in the LICENSE file that
3645# accompanied this code).
3646#
3647# You should have received a copy of the GNU General Public License version
3648# 2 along with this work; if not, write to the Free Software Foundation,
3649# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3650#
3651# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3652# or visit www.oracle.com if you need additional information or have any
3653# questions.
3654#
3655
3656
3657
3658
3659
3660
3661
3662# Check if the VS env variables were setup prior to running configure.
3663# If not, then find vcvarsall.bat and run it automatically, and integrate
3664# the set env variables into the spec file.
3665
3666
3667
3668
3669
3670
3671# This line needs to be here, verbatim, after all includes and the dummy hook
3672# definitions. It is replaced with custom functionality when building
3673# custom sources.
3674#CUSTOM_AUTOCONF_INCLUDE
3675
3676# Do not change or remove the following line, it is needed for consistency checks:
3677DATE_WHEN_GENERATED=1355849613
3678
3679###############################################################################
3680#
3681# Initialization / Boot-strapping
3682#
3683# The bootstrapping process needs to solve the "chicken or the egg" problem,
3684# thus it jumps back and forth, each time gaining something needed later on.
3685#
3686###############################################################################
3687
3688# Basic initialization that must happen first of all
3689
3690# Save the original command line. This is passed to us by the wrapper configure script.
3691
3692DATE_WHEN_CONFIGURED=`LANG=C date`
3693
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3695$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3697$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3698
3699
3700
3701# Start with tools that do not need have cross compilation support
3702# and can be expected to be found in the default PATH. These tools are
3703# used by configure. Nor are these tools expected to be found in the
3704# devkit from the builddeps server either, since they are
3705# needed to download the devkit.
3706
3707# First are all the simple required tools.
3708
3709    for ac_prog in basename
3710do
3711  # Extract the first word of "$ac_prog", so it can be a program name with args.
3712set dummy $ac_prog; ac_word=$2
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714$as_echo_n "checking for $ac_word... " >&6; }
3715if test "${ac_cv_path_BASENAME+set}" = set; then :
3716  $as_echo_n "(cached) " >&6
3717else
3718  case $BASENAME in
3719  [\\/]* | ?:[\\/]*)
3720  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3721  ;;
3722  *)
3723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726  IFS=$as_save_IFS
3727  test -z "$as_dir" && as_dir=.
3728    for ac_exec_ext in '' $ac_executable_extensions; do
3729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3730    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3732    break 2
3733  fi
3734done
3735  done
3736IFS=$as_save_IFS
3737
3738  ;;
3739esac
3740fi
3741BASENAME=$ac_cv_path_BASENAME
3742if test -n "$BASENAME"; then
3743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3744$as_echo "$BASENAME" >&6; }
3745else
3746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
3748fi
3749
3750
3751  test -n "$BASENAME" && break
3752done
3753
3754
3755    if test "x$BASENAME" = x; then
3756        if test "xbasename" = x; then
3757          PROG_NAME=basename
3758        else
3759          PROG_NAME=basename
3760        fi
3761        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3762$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3763        as_fn_error $? "Cannot continue" "$LINENO" 5
3764    fi
3765
3766
3767
3768    for ac_prog in bash
3769do
3770  # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
3774if test "${ac_cv_path_BASH+set}" = set; then :
3775  $as_echo_n "(cached) " >&6
3776else
3777  case $BASH in
3778  [\\/]* | ?:[\\/]*)
3779  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3780  ;;
3781  *)
3782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785  IFS=$as_save_IFS
3786  test -z "$as_dir" && as_dir=.
3787    for ac_exec_ext in '' $ac_executable_extensions; do
3788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3789    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3791    break 2
3792  fi
3793done
3794  done
3795IFS=$as_save_IFS
3796
3797  ;;
3798esac
3799fi
3800BASH=$ac_cv_path_BASH
3801if test -n "$BASH"; then
3802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3803$as_echo "$BASH" >&6; }
3804else
3805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
3807fi
3808
3809
3810  test -n "$BASH" && break
3811done
3812
3813
3814    if test "x$BASH" = x; then
3815        if test "xbash" = x; then
3816          PROG_NAME=bash
3817        else
3818          PROG_NAME=bash
3819        fi
3820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3822        as_fn_error $? "Cannot continue" "$LINENO" 5
3823    fi
3824
3825
3826
3827    for ac_prog in cat
3828do
3829  # Extract the first word of "$ac_prog", so it can be a program name with args.
3830set dummy $ac_prog; ac_word=$2
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832$as_echo_n "checking for $ac_word... " >&6; }
3833if test "${ac_cv_path_CAT+set}" = set; then :
3834  $as_echo_n "(cached) " >&6
3835else
3836  case $CAT in
3837  [\\/]* | ?:[\\/]*)
3838  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3839  ;;
3840  *)
3841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844  IFS=$as_save_IFS
3845  test -z "$as_dir" && as_dir=.
3846    for ac_exec_ext in '' $ac_executable_extensions; do
3847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3848    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850    break 2
3851  fi
3852done
3853  done
3854IFS=$as_save_IFS
3855
3856  ;;
3857esac
3858fi
3859CAT=$ac_cv_path_CAT
3860if test -n "$CAT"; then
3861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3862$as_echo "$CAT" >&6; }
3863else
3864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
3866fi
3867
3868
3869  test -n "$CAT" && break
3870done
3871
3872
3873    if test "x$CAT" = x; then
3874        if test "xcat" = x; then
3875          PROG_NAME=cat
3876        else
3877          PROG_NAME=cat
3878        fi
3879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3881        as_fn_error $? "Cannot continue" "$LINENO" 5
3882    fi
3883
3884
3885
3886    for ac_prog in chmod
3887do
3888  # Extract the first word of "$ac_prog", so it can be a program name with args.
3889set dummy $ac_prog; ac_word=$2
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3891$as_echo_n "checking for $ac_word... " >&6; }
3892if test "${ac_cv_path_CHMOD+set}" = set; then :
3893  $as_echo_n "(cached) " >&6
3894else
3895  case $CHMOD in
3896  [\\/]* | ?:[\\/]*)
3897  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3898  ;;
3899  *)
3900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3901for as_dir in $PATH
3902do
3903  IFS=$as_save_IFS
3904  test -z "$as_dir" && as_dir=.
3905    for ac_exec_ext in '' $ac_executable_extensions; do
3906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3907    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3909    break 2
3910  fi
3911done
3912  done
3913IFS=$as_save_IFS
3914
3915  ;;
3916esac
3917fi
3918CHMOD=$ac_cv_path_CHMOD
3919if test -n "$CHMOD"; then
3920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3921$as_echo "$CHMOD" >&6; }
3922else
3923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3924$as_echo "no" >&6; }
3925fi
3926
3927
3928  test -n "$CHMOD" && break
3929done
3930
3931
3932    if test "x$CHMOD" = x; then
3933        if test "xchmod" = x; then
3934          PROG_NAME=chmod
3935        else
3936          PROG_NAME=chmod
3937        fi
3938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3940        as_fn_error $? "Cannot continue" "$LINENO" 5
3941    fi
3942
3943
3944
3945    for ac_prog in cmp
3946do
3947  # Extract the first word of "$ac_prog", so it can be a program name with args.
3948set dummy $ac_prog; ac_word=$2
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3950$as_echo_n "checking for $ac_word... " >&6; }
3951if test "${ac_cv_path_CMP+set}" = set; then :
3952  $as_echo_n "(cached) " >&6
3953else
3954  case $CMP in
3955  [\\/]* | ?:[\\/]*)
3956  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3957  ;;
3958  *)
3959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960for as_dir in $PATH
3961do
3962  IFS=$as_save_IFS
3963  test -z "$as_dir" && as_dir=.
3964    for ac_exec_ext in '' $ac_executable_extensions; do
3965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3966    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3968    break 2
3969  fi
3970done
3971  done
3972IFS=$as_save_IFS
3973
3974  ;;
3975esac
3976fi
3977CMP=$ac_cv_path_CMP
3978if test -n "$CMP"; then
3979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3980$as_echo "$CMP" >&6; }
3981else
3982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984fi
3985
3986
3987  test -n "$CMP" && break
3988done
3989
3990
3991    if test "x$CMP" = x; then
3992        if test "xcmp" = x; then
3993          PROG_NAME=cmp
3994        else
3995          PROG_NAME=cmp
3996        fi
3997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3999        as_fn_error $? "Cannot continue" "$LINENO" 5
4000    fi
4001
4002
4003
4004    for ac_prog in cp
4005do
4006  # Extract the first word of "$ac_prog", so it can be a program name with args.
4007set dummy $ac_prog; ac_word=$2
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4009$as_echo_n "checking for $ac_word... " >&6; }
4010if test "${ac_cv_path_CP+set}" = set; then :
4011  $as_echo_n "(cached) " >&6
4012else
4013  case $CP in
4014  [\\/]* | ?:[\\/]*)
4015  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4016  ;;
4017  *)
4018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in $PATH
4020do
4021  IFS=$as_save_IFS
4022  test -z "$as_dir" && as_dir=.
4023    for ac_exec_ext in '' $ac_executable_extensions; do
4024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4025    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4027    break 2
4028  fi
4029done
4030  done
4031IFS=$as_save_IFS
4032
4033  ;;
4034esac
4035fi
4036CP=$ac_cv_path_CP
4037if test -n "$CP"; then
4038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4039$as_echo "$CP" >&6; }
4040else
4041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042$as_echo "no" >&6; }
4043fi
4044
4045
4046  test -n "$CP" && break
4047done
4048
4049
4050    if test "x$CP" = x; then
4051        if test "xcp" = x; then
4052          PROG_NAME=cp
4053        else
4054          PROG_NAME=cp
4055        fi
4056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4058        as_fn_error $? "Cannot continue" "$LINENO" 5
4059    fi
4060
4061
4062
4063    for ac_prog in cut
4064do
4065  # Extract the first word of "$ac_prog", so it can be a program name with args.
4066set dummy $ac_prog; ac_word=$2
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4068$as_echo_n "checking for $ac_word... " >&6; }
4069if test "${ac_cv_path_CUT+set}" = set; then :
4070  $as_echo_n "(cached) " >&6
4071else
4072  case $CUT in
4073  [\\/]* | ?:[\\/]*)
4074  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4075  ;;
4076  *)
4077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4078for as_dir in $PATH
4079do
4080  IFS=$as_save_IFS
4081  test -z "$as_dir" && as_dir=.
4082    for ac_exec_ext in '' $ac_executable_extensions; do
4083  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4084    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4086    break 2
4087  fi
4088done
4089  done
4090IFS=$as_save_IFS
4091
4092  ;;
4093esac
4094fi
4095CUT=$ac_cv_path_CUT
4096if test -n "$CUT"; then
4097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4098$as_echo "$CUT" >&6; }
4099else
4100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
4102fi
4103
4104
4105  test -n "$CUT" && break
4106done
4107
4108
4109    if test "x$CUT" = x; then
4110        if test "xcut" = x; then
4111          PROG_NAME=cut
4112        else
4113          PROG_NAME=cut
4114        fi
4115        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4116$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4117        as_fn_error $? "Cannot continue" "$LINENO" 5
4118    fi
4119
4120
4121
4122    for ac_prog in date
4123do
4124  # Extract the first word of "$ac_prog", so it can be a program name with args.
4125set dummy $ac_prog; ac_word=$2
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4127$as_echo_n "checking for $ac_word... " >&6; }
4128if test "${ac_cv_path_DATE+set}" = set; then :
4129  $as_echo_n "(cached) " >&6
4130else
4131  case $DATE in
4132  [\\/]* | ?:[\\/]*)
4133  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4134  ;;
4135  *)
4136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4137for as_dir in $PATH
4138do
4139  IFS=$as_save_IFS
4140  test -z "$as_dir" && as_dir=.
4141    for ac_exec_ext in '' $ac_executable_extensions; do
4142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4143    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4145    break 2
4146  fi
4147done
4148  done
4149IFS=$as_save_IFS
4150
4151  ;;
4152esac
4153fi
4154DATE=$ac_cv_path_DATE
4155if test -n "$DATE"; then
4156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4157$as_echo "$DATE" >&6; }
4158else
4159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4160$as_echo "no" >&6; }
4161fi
4162
4163
4164  test -n "$DATE" && break
4165done
4166
4167
4168    if test "x$DATE" = x; then
4169        if test "xdate" = x; then
4170          PROG_NAME=date
4171        else
4172          PROG_NAME=date
4173        fi
4174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4176        as_fn_error $? "Cannot continue" "$LINENO" 5
4177    fi
4178
4179
4180
4181    for ac_prog in gdiff diff
4182do
4183  # Extract the first word of "$ac_prog", so it can be a program name with args.
4184set dummy $ac_prog; ac_word=$2
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4186$as_echo_n "checking for $ac_word... " >&6; }
4187if test "${ac_cv_path_DIFF+set}" = set; then :
4188  $as_echo_n "(cached) " >&6
4189else
4190  case $DIFF in
4191  [\\/]* | ?:[\\/]*)
4192  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4193  ;;
4194  *)
4195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4196for as_dir in $PATH
4197do
4198  IFS=$as_save_IFS
4199  test -z "$as_dir" && as_dir=.
4200    for ac_exec_ext in '' $ac_executable_extensions; do
4201  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4202    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4204    break 2
4205  fi
4206done
4207  done
4208IFS=$as_save_IFS
4209
4210  ;;
4211esac
4212fi
4213DIFF=$ac_cv_path_DIFF
4214if test -n "$DIFF"; then
4215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4216$as_echo "$DIFF" >&6; }
4217else
4218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4219$as_echo "no" >&6; }
4220fi
4221
4222
4223  test -n "$DIFF" && break
4224done
4225
4226
4227    if test "x$DIFF" = x; then
4228        if test "xgdiff diff" = x; then
4229          PROG_NAME=diff
4230        else
4231          PROG_NAME=gdiff diff
4232        fi
4233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4235        as_fn_error $? "Cannot continue" "$LINENO" 5
4236    fi
4237
4238
4239
4240    for ac_prog in dirname
4241do
4242  # Extract the first word of "$ac_prog", so it can be a program name with args.
4243set dummy $ac_prog; ac_word=$2
4244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4245$as_echo_n "checking for $ac_word... " >&6; }
4246if test "${ac_cv_path_DIRNAME+set}" = set; then :
4247  $as_echo_n "(cached) " >&6
4248else
4249  case $DIRNAME in
4250  [\\/]* | ?:[\\/]*)
4251  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4252  ;;
4253  *)
4254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257  IFS=$as_save_IFS
4258  test -z "$as_dir" && as_dir=.
4259    for ac_exec_ext in '' $ac_executable_extensions; do
4260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4261    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4263    break 2
4264  fi
4265done
4266  done
4267IFS=$as_save_IFS
4268
4269  ;;
4270esac
4271fi
4272DIRNAME=$ac_cv_path_DIRNAME
4273if test -n "$DIRNAME"; then
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4275$as_echo "$DIRNAME" >&6; }
4276else
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4278$as_echo "no" >&6; }
4279fi
4280
4281
4282  test -n "$DIRNAME" && break
4283done
4284
4285
4286    if test "x$DIRNAME" = x; then
4287        if test "xdirname" = x; then
4288          PROG_NAME=dirname
4289        else
4290          PROG_NAME=dirname
4291        fi
4292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4293$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4294        as_fn_error $? "Cannot continue" "$LINENO" 5
4295    fi
4296
4297
4298
4299    for ac_prog in echo
4300do
4301  # Extract the first word of "$ac_prog", so it can be a program name with args.
4302set dummy $ac_prog; ac_word=$2
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4304$as_echo_n "checking for $ac_word... " >&6; }
4305if test "${ac_cv_path_ECHO+set}" = set; then :
4306  $as_echo_n "(cached) " >&6
4307else
4308  case $ECHO in
4309  [\\/]* | ?:[\\/]*)
4310  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4311  ;;
4312  *)
4313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4314for as_dir in $PATH
4315do
4316  IFS=$as_save_IFS
4317  test -z "$as_dir" && as_dir=.
4318    for ac_exec_ext in '' $ac_executable_extensions; do
4319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4320    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4322    break 2
4323  fi
4324done
4325  done
4326IFS=$as_save_IFS
4327
4328  ;;
4329esac
4330fi
4331ECHO=$ac_cv_path_ECHO
4332if test -n "$ECHO"; then
4333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4334$as_echo "$ECHO" >&6; }
4335else
4336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4337$as_echo "no" >&6; }
4338fi
4339
4340
4341  test -n "$ECHO" && break
4342done
4343
4344
4345    if test "x$ECHO" = x; then
4346        if test "xecho" = x; then
4347          PROG_NAME=echo
4348        else
4349          PROG_NAME=echo
4350        fi
4351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4352$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4353        as_fn_error $? "Cannot continue" "$LINENO" 5
4354    fi
4355
4356
4357
4358    for ac_prog in expr
4359do
4360  # Extract the first word of "$ac_prog", so it can be a program name with args.
4361set dummy $ac_prog; ac_word=$2
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4363$as_echo_n "checking for $ac_word... " >&6; }
4364if test "${ac_cv_path_EXPR+set}" = set; then :
4365  $as_echo_n "(cached) " >&6
4366else
4367  case $EXPR in
4368  [\\/]* | ?:[\\/]*)
4369  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4370  ;;
4371  *)
4372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373for as_dir in $PATH
4374do
4375  IFS=$as_save_IFS
4376  test -z "$as_dir" && as_dir=.
4377    for ac_exec_ext in '' $ac_executable_extensions; do
4378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4379    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4381    break 2
4382  fi
4383done
4384  done
4385IFS=$as_save_IFS
4386
4387  ;;
4388esac
4389fi
4390EXPR=$ac_cv_path_EXPR
4391if test -n "$EXPR"; then
4392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4393$as_echo "$EXPR" >&6; }
4394else
4395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4396$as_echo "no" >&6; }
4397fi
4398
4399
4400  test -n "$EXPR" && break
4401done
4402
4403
4404    if test "x$EXPR" = x; then
4405        if test "xexpr" = x; then
4406          PROG_NAME=expr
4407        else
4408          PROG_NAME=expr
4409        fi
4410        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4411$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4412        as_fn_error $? "Cannot continue" "$LINENO" 5
4413    fi
4414
4415
4416
4417    for ac_prog in file
4418do
4419  # Extract the first word of "$ac_prog", so it can be a program name with args.
4420set dummy $ac_prog; ac_word=$2
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4422$as_echo_n "checking for $ac_word... " >&6; }
4423if test "${ac_cv_path_FILE+set}" = set; then :
4424  $as_echo_n "(cached) " >&6
4425else
4426  case $FILE in
4427  [\\/]* | ?:[\\/]*)
4428  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4429  ;;
4430  *)
4431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4432for as_dir in $PATH
4433do
4434  IFS=$as_save_IFS
4435  test -z "$as_dir" && as_dir=.
4436    for ac_exec_ext in '' $ac_executable_extensions; do
4437  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4438    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4440    break 2
4441  fi
4442done
4443  done
4444IFS=$as_save_IFS
4445
4446  ;;
4447esac
4448fi
4449FILE=$ac_cv_path_FILE
4450if test -n "$FILE"; then
4451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4452$as_echo "$FILE" >&6; }
4453else
4454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4455$as_echo "no" >&6; }
4456fi
4457
4458
4459  test -n "$FILE" && break
4460done
4461
4462
4463    if test "x$FILE" = x; then
4464        if test "xfile" = x; then
4465          PROG_NAME=file
4466        else
4467          PROG_NAME=file
4468        fi
4469        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4470$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4471        as_fn_error $? "Cannot continue" "$LINENO" 5
4472    fi
4473
4474
4475
4476    for ac_prog in find
4477do
4478  # Extract the first word of "$ac_prog", so it can be a program name with args.
4479set dummy $ac_prog; ac_word=$2
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4481$as_echo_n "checking for $ac_word... " >&6; }
4482if test "${ac_cv_path_FIND+set}" = set; then :
4483  $as_echo_n "(cached) " >&6
4484else
4485  case $FIND in
4486  [\\/]* | ?:[\\/]*)
4487  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4488  ;;
4489  *)
4490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in $PATH
4492do
4493  IFS=$as_save_IFS
4494  test -z "$as_dir" && as_dir=.
4495    for ac_exec_ext in '' $ac_executable_extensions; do
4496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4497    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4499    break 2
4500  fi
4501done
4502  done
4503IFS=$as_save_IFS
4504
4505  ;;
4506esac
4507fi
4508FIND=$ac_cv_path_FIND
4509if test -n "$FIND"; then
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4511$as_echo "$FIND" >&6; }
4512else
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
4515fi
4516
4517
4518  test -n "$FIND" && break
4519done
4520
4521
4522    if test "x$FIND" = x; then
4523        if test "xfind" = x; then
4524          PROG_NAME=find
4525        else
4526          PROG_NAME=find
4527        fi
4528        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4529$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4530        as_fn_error $? "Cannot continue" "$LINENO" 5
4531    fi
4532
4533
4534
4535    for ac_prog in head
4536do
4537  # Extract the first word of "$ac_prog", so it can be a program name with args.
4538set dummy $ac_prog; ac_word=$2
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
4541if test "${ac_cv_path_HEAD+set}" = set; then :
4542  $as_echo_n "(cached) " >&6
4543else
4544  case $HEAD in
4545  [\\/]* | ?:[\\/]*)
4546  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4547  ;;
4548  *)
4549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552  IFS=$as_save_IFS
4553  test -z "$as_dir" && as_dir=.
4554    for ac_exec_ext in '' $ac_executable_extensions; do
4555  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4556    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4558    break 2
4559  fi
4560done
4561  done
4562IFS=$as_save_IFS
4563
4564  ;;
4565esac
4566fi
4567HEAD=$ac_cv_path_HEAD
4568if test -n "$HEAD"; then
4569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4570$as_echo "$HEAD" >&6; }
4571else
4572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
4574fi
4575
4576
4577  test -n "$HEAD" && break
4578done
4579
4580
4581    if test "x$HEAD" = x; then
4582        if test "xhead" = x; then
4583          PROG_NAME=head
4584        else
4585          PROG_NAME=head
4586        fi
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4589        as_fn_error $? "Cannot continue" "$LINENO" 5
4590    fi
4591
4592
4593
4594    for ac_prog in ln
4595do
4596  # Extract the first word of "$ac_prog", so it can be a program name with args.
4597set dummy $ac_prog; ac_word=$2
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4599$as_echo_n "checking for $ac_word... " >&6; }
4600if test "${ac_cv_path_LN+set}" = set; then :
4601  $as_echo_n "(cached) " >&6
4602else
4603  case $LN in
4604  [\\/]* | ?:[\\/]*)
4605  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4606  ;;
4607  *)
4608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH
4610do
4611  IFS=$as_save_IFS
4612  test -z "$as_dir" && as_dir=.
4613    for ac_exec_ext in '' $ac_executable_extensions; do
4614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4615    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4617    break 2
4618  fi
4619done
4620  done
4621IFS=$as_save_IFS
4622
4623  ;;
4624esac
4625fi
4626LN=$ac_cv_path_LN
4627if test -n "$LN"; then
4628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4629$as_echo "$LN" >&6; }
4630else
4631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632$as_echo "no" >&6; }
4633fi
4634
4635
4636  test -n "$LN" && break
4637done
4638
4639
4640    if test "x$LN" = x; then
4641        if test "xln" = x; then
4642          PROG_NAME=ln
4643        else
4644          PROG_NAME=ln
4645        fi
4646        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4648        as_fn_error $? "Cannot continue" "$LINENO" 5
4649    fi
4650
4651
4652
4653    for ac_prog in ls
4654do
4655  # Extract the first word of "$ac_prog", so it can be a program name with args.
4656set dummy $ac_prog; ac_word=$2
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4658$as_echo_n "checking for $ac_word... " >&6; }
4659if test "${ac_cv_path_LS+set}" = set; then :
4660  $as_echo_n "(cached) " >&6
4661else
4662  case $LS in
4663  [\\/]* | ?:[\\/]*)
4664  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4665  ;;
4666  *)
4667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670  IFS=$as_save_IFS
4671  test -z "$as_dir" && as_dir=.
4672    for ac_exec_ext in '' $ac_executable_extensions; do
4673  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4674    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4676    break 2
4677  fi
4678done
4679  done
4680IFS=$as_save_IFS
4681
4682  ;;
4683esac
4684fi
4685LS=$ac_cv_path_LS
4686if test -n "$LS"; then
4687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4688$as_echo "$LS" >&6; }
4689else
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4691$as_echo "no" >&6; }
4692fi
4693
4694
4695  test -n "$LS" && break
4696done
4697
4698
4699    if test "x$LS" = x; then
4700        if test "xls" = x; then
4701          PROG_NAME=ls
4702        else
4703          PROG_NAME=ls
4704        fi
4705        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4706$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4707        as_fn_error $? "Cannot continue" "$LINENO" 5
4708    fi
4709
4710
4711
4712    for ac_prog in mkdir
4713do
4714  # Extract the first word of "$ac_prog", so it can be a program name with args.
4715set dummy $ac_prog; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
4718if test "${ac_cv_path_MKDIR+set}" = set; then :
4719  $as_echo_n "(cached) " >&6
4720else
4721  case $MKDIR in
4722  [\\/]* | ?:[\\/]*)
4723  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4724  ;;
4725  *)
4726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729  IFS=$as_save_IFS
4730  test -z "$as_dir" && as_dir=.
4731    for ac_exec_ext in '' $ac_executable_extensions; do
4732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4733    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735    break 2
4736  fi
4737done
4738  done
4739IFS=$as_save_IFS
4740
4741  ;;
4742esac
4743fi
4744MKDIR=$ac_cv_path_MKDIR
4745if test -n "$MKDIR"; then
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4747$as_echo "$MKDIR" >&6; }
4748else
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
4751fi
4752
4753
4754  test -n "$MKDIR" && break
4755done
4756
4757
4758    if test "x$MKDIR" = x; then
4759        if test "xmkdir" = x; then
4760          PROG_NAME=mkdir
4761        else
4762          PROG_NAME=mkdir
4763        fi
4764        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4765$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4766        as_fn_error $? "Cannot continue" "$LINENO" 5
4767    fi
4768
4769
4770
4771    for ac_prog in mktemp
4772do
4773  # Extract the first word of "$ac_prog", so it can be a program name with args.
4774set dummy $ac_prog; ac_word=$2
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
4777if test "${ac_cv_path_MKTEMP+set}" = set; then :
4778  $as_echo_n "(cached) " >&6
4779else
4780  case $MKTEMP in
4781  [\\/]* | ?:[\\/]*)
4782  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4783  ;;
4784  *)
4785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in $PATH
4787do
4788  IFS=$as_save_IFS
4789  test -z "$as_dir" && as_dir=.
4790    for ac_exec_ext in '' $ac_executable_extensions; do
4791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4792    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794    break 2
4795  fi
4796done
4797  done
4798IFS=$as_save_IFS
4799
4800  ;;
4801esac
4802fi
4803MKTEMP=$ac_cv_path_MKTEMP
4804if test -n "$MKTEMP"; then
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4806$as_echo "$MKTEMP" >&6; }
4807else
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
4810fi
4811
4812
4813  test -n "$MKTEMP" && break
4814done
4815
4816
4817    if test "x$MKTEMP" = x; then
4818        if test "xmktemp" = x; then
4819          PROG_NAME=mktemp
4820        else
4821          PROG_NAME=mktemp
4822        fi
4823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4824$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4825        as_fn_error $? "Cannot continue" "$LINENO" 5
4826    fi
4827
4828
4829
4830    for ac_prog in mv
4831do
4832  # Extract the first word of "$ac_prog", so it can be a program name with args.
4833set dummy $ac_prog; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
4836if test "${ac_cv_path_MV+set}" = set; then :
4837  $as_echo_n "(cached) " >&6
4838else
4839  case $MV in
4840  [\\/]* | ?:[\\/]*)
4841  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4842  ;;
4843  *)
4844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in $PATH
4846do
4847  IFS=$as_save_IFS
4848  test -z "$as_dir" && as_dir=.
4849    for ac_exec_ext in '' $ac_executable_extensions; do
4850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4851    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4853    break 2
4854  fi
4855done
4856  done
4857IFS=$as_save_IFS
4858
4859  ;;
4860esac
4861fi
4862MV=$ac_cv_path_MV
4863if test -n "$MV"; then
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4865$as_echo "$MV" >&6; }
4866else
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
4869fi
4870
4871
4872  test -n "$MV" && break
4873done
4874
4875
4876    if test "x$MV" = x; then
4877        if test "xmv" = x; then
4878          PROG_NAME=mv
4879        else
4880          PROG_NAME=mv
4881        fi
4882        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4883$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4884        as_fn_error $? "Cannot continue" "$LINENO" 5
4885    fi
4886
4887
4888
4889    for ac_prog in printf
4890do
4891  # Extract the first word of "$ac_prog", so it can be a program name with args.
4892set dummy $ac_prog; ac_word=$2
4893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if test "${ac_cv_path_PRINTF+set}" = set; then :
4896  $as_echo_n "(cached) " >&6
4897else
4898  case $PRINTF in
4899  [\\/]* | ?:[\\/]*)
4900  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4901  ;;
4902  *)
4903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in $PATH
4905do
4906  IFS=$as_save_IFS
4907  test -z "$as_dir" && as_dir=.
4908    for ac_exec_ext in '' $ac_executable_extensions; do
4909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4910    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912    break 2
4913  fi
4914done
4915  done
4916IFS=$as_save_IFS
4917
4918  ;;
4919esac
4920fi
4921PRINTF=$ac_cv_path_PRINTF
4922if test -n "$PRINTF"; then
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4924$as_echo "$PRINTF" >&6; }
4925else
4926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
4930
4931  test -n "$PRINTF" && break
4932done
4933
4934
4935    if test "x$PRINTF" = x; then
4936        if test "xprintf" = x; then
4937          PROG_NAME=printf
4938        else
4939          PROG_NAME=printf
4940        fi
4941        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4942$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4943        as_fn_error $? "Cannot continue" "$LINENO" 5
4944    fi
4945
4946
4947
4948    for ac_prog in pwd
4949do
4950  # Extract the first word of "$ac_prog", so it can be a program name with args.
4951set dummy $ac_prog; ac_word=$2
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953$as_echo_n "checking for $ac_word... " >&6; }
4954if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4955  $as_echo_n "(cached) " >&6
4956else
4957  case $THEPWDCMD in
4958  [\\/]* | ?:[\\/]*)
4959  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4960  ;;
4961  *)
4962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965  IFS=$as_save_IFS
4966  test -z "$as_dir" && as_dir=.
4967    for ac_exec_ext in '' $ac_executable_extensions; do
4968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971    break 2
4972  fi
4973done
4974  done
4975IFS=$as_save_IFS
4976
4977  ;;
4978esac
4979fi
4980THEPWDCMD=$ac_cv_path_THEPWDCMD
4981if test -n "$THEPWDCMD"; then
4982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4983$as_echo "$THEPWDCMD" >&6; }
4984else
4985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986$as_echo "no" >&6; }
4987fi
4988
4989
4990  test -n "$THEPWDCMD" && break
4991done
4992
4993
4994    if test "x$THEPWDCMD" = x; then
4995        if test "xpwd" = x; then
4996          PROG_NAME=thepwdcmd
4997        else
4998          PROG_NAME=pwd
4999        fi
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5001$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5002        as_fn_error $? "Cannot continue" "$LINENO" 5
5003    fi
5004
5005
5006
5007    for ac_prog in rm
5008do
5009  # Extract the first word of "$ac_prog", so it can be a program name with args.
5010set dummy $ac_prog; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if test "${ac_cv_path_RM+set}" = set; then :
5014  $as_echo_n "(cached) " >&6
5015else
5016  case $RM in
5017  [\\/]* | ?:[\\/]*)
5018  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5019  ;;
5020  *)
5021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024  IFS=$as_save_IFS
5025  test -z "$as_dir" && as_dir=.
5026    for ac_exec_ext in '' $ac_executable_extensions; do
5027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5028    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030    break 2
5031  fi
5032done
5033  done
5034IFS=$as_save_IFS
5035
5036  ;;
5037esac
5038fi
5039RM=$ac_cv_path_RM
5040if test -n "$RM"; then
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5042$as_echo "$RM" >&6; }
5043else
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048
5049  test -n "$RM" && break
5050done
5051
5052
5053    if test "x$RM" = x; then
5054        if test "xrm" = x; then
5055          PROG_NAME=rm
5056        else
5057          PROG_NAME=rm
5058        fi
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5060$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5061        as_fn_error $? "Cannot continue" "$LINENO" 5
5062    fi
5063
5064
5065
5066    for ac_prog in sh
5067do
5068  # Extract the first word of "$ac_prog", so it can be a program name with args.
5069set dummy $ac_prog; ac_word=$2
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
5072if test "${ac_cv_path_SH+set}" = set; then :
5073  $as_echo_n "(cached) " >&6
5074else
5075  case $SH in
5076  [\\/]* | ?:[\\/]*)
5077  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5078  ;;
5079  *)
5080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083  IFS=$as_save_IFS
5084  test -z "$as_dir" && as_dir=.
5085    for ac_exec_ext in '' $ac_executable_extensions; do
5086  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5087    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089    break 2
5090  fi
5091done
5092  done
5093IFS=$as_save_IFS
5094
5095  ;;
5096esac
5097fi
5098SH=$ac_cv_path_SH
5099if test -n "$SH"; then
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5101$as_echo "$SH" >&6; }
5102else
5103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
5105fi
5106
5107
5108  test -n "$SH" && break
5109done
5110
5111
5112    if test "x$SH" = x; then
5113        if test "xsh" = x; then
5114          PROG_NAME=sh
5115        else
5116          PROG_NAME=sh
5117        fi
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5119$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5120        as_fn_error $? "Cannot continue" "$LINENO" 5
5121    fi
5122
5123
5124
5125    for ac_prog in sort
5126do
5127  # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if test "${ac_cv_path_SORT+set}" = set; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $SORT in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5146    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157SORT=$ac_cv_path_SORT
5158if test -n "$SORT"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5160$as_echo "$SORT" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167  test -n "$SORT" && break
5168done
5169
5170
5171    if test "x$SORT" = x; then
5172        if test "xsort" = x; then
5173          PROG_NAME=sort
5174        else
5175          PROG_NAME=sort
5176        fi
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5178$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5179        as_fn_error $? "Cannot continue" "$LINENO" 5
5180    fi
5181
5182
5183
5184    for ac_prog in tail
5185do
5186  # Extract the first word of "$ac_prog", so it can be a program name with args.
5187set dummy $ac_prog; ac_word=$2
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5189$as_echo_n "checking for $ac_word... " >&6; }
5190if test "${ac_cv_path_TAIL+set}" = set; then :
5191  $as_echo_n "(cached) " >&6
5192else
5193  case $TAIL in
5194  [\\/]* | ?:[\\/]*)
5195  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5196  ;;
5197  *)
5198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201  IFS=$as_save_IFS
5202  test -z "$as_dir" && as_dir=.
5203    for ac_exec_ext in '' $ac_executable_extensions; do
5204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5205    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5207    break 2
5208  fi
5209done
5210  done
5211IFS=$as_save_IFS
5212
5213  ;;
5214esac
5215fi
5216TAIL=$ac_cv_path_TAIL
5217if test -n "$TAIL"; then
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5219$as_echo "$TAIL" >&6; }
5220else
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
5223fi
5224
5225
5226  test -n "$TAIL" && break
5227done
5228
5229
5230    if test "x$TAIL" = x; then
5231        if test "xtail" = x; then
5232          PROG_NAME=tail
5233        else
5234          PROG_NAME=tail
5235        fi
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5237$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5238        as_fn_error $? "Cannot continue" "$LINENO" 5
5239    fi
5240
5241
5242
5243    for ac_prog in tar
5244do
5245  # Extract the first word of "$ac_prog", so it can be a program name with args.
5246set dummy $ac_prog; ac_word=$2
5247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248$as_echo_n "checking for $ac_word... " >&6; }
5249if test "${ac_cv_path_TAR+set}" = set; then :
5250  $as_echo_n "(cached) " >&6
5251else
5252  case $TAR in
5253  [\\/]* | ?:[\\/]*)
5254  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5255  ;;
5256  *)
5257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5258for as_dir in $PATH
5259do
5260  IFS=$as_save_IFS
5261  test -z "$as_dir" && as_dir=.
5262    for ac_exec_ext in '' $ac_executable_extensions; do
5263  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5264    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5266    break 2
5267  fi
5268done
5269  done
5270IFS=$as_save_IFS
5271
5272  ;;
5273esac
5274fi
5275TAR=$ac_cv_path_TAR
5276if test -n "$TAR"; then
5277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5278$as_echo "$TAR" >&6; }
5279else
5280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5281$as_echo "no" >&6; }
5282fi
5283
5284
5285  test -n "$TAR" && break
5286done
5287
5288
5289    if test "x$TAR" = x; then
5290        if test "xtar" = x; then
5291          PROG_NAME=tar
5292        else
5293          PROG_NAME=tar
5294        fi
5295        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5296$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5297        as_fn_error $? "Cannot continue" "$LINENO" 5
5298    fi
5299
5300
5301
5302    for ac_prog in tee
5303do
5304  # Extract the first word of "$ac_prog", so it can be a program name with args.
5305set dummy $ac_prog; ac_word=$2
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5307$as_echo_n "checking for $ac_word... " >&6; }
5308if test "${ac_cv_path_TEE+set}" = set; then :
5309  $as_echo_n "(cached) " >&6
5310else
5311  case $TEE in
5312  [\\/]* | ?:[\\/]*)
5313  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5314  ;;
5315  *)
5316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5317for as_dir in $PATH
5318do
5319  IFS=$as_save_IFS
5320  test -z "$as_dir" && as_dir=.
5321    for ac_exec_ext in '' $ac_executable_extensions; do
5322  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5323    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5325    break 2
5326  fi
5327done
5328  done
5329IFS=$as_save_IFS
5330
5331  ;;
5332esac
5333fi
5334TEE=$ac_cv_path_TEE
5335if test -n "$TEE"; then
5336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5337$as_echo "$TEE" >&6; }
5338else
5339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
5341fi
5342
5343
5344  test -n "$TEE" && break
5345done
5346
5347
5348    if test "x$TEE" = x; then
5349        if test "xtee" = x; then
5350          PROG_NAME=tee
5351        else
5352          PROG_NAME=tee
5353        fi
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5355$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5356        as_fn_error $? "Cannot continue" "$LINENO" 5
5357    fi
5358
5359
5360
5361    for ac_prog in touch
5362do
5363  # Extract the first word of "$ac_prog", so it can be a program name with args.
5364set dummy $ac_prog; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if test "${ac_cv_path_TOUCH+set}" = set; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $TOUCH in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5382    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393TOUCH=$ac_cv_path_TOUCH
5394if test -n "$TOUCH"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5396$as_echo "$TOUCH" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403  test -n "$TOUCH" && break
5404done
5405
5406
5407    if test "x$TOUCH" = x; then
5408        if test "xtouch" = x; then
5409          PROG_NAME=touch
5410        else
5411          PROG_NAME=touch
5412        fi
5413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5415        as_fn_error $? "Cannot continue" "$LINENO" 5
5416    fi
5417
5418
5419
5420    for ac_prog in tr
5421do
5422  # Extract the first word of "$ac_prog", so it can be a program name with args.
5423set dummy $ac_prog; ac_word=$2
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425$as_echo_n "checking for $ac_word... " >&6; }
5426if test "${ac_cv_path_TR+set}" = set; then :
5427  $as_echo_n "(cached) " >&6
5428else
5429  case $TR in
5430  [\\/]* | ?:[\\/]*)
5431  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5432  ;;
5433  *)
5434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435for as_dir in $PATH
5436do
5437  IFS=$as_save_IFS
5438  test -z "$as_dir" && as_dir=.
5439    for ac_exec_ext in '' $ac_executable_extensions; do
5440  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5441    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443    break 2
5444  fi
5445done
5446  done
5447IFS=$as_save_IFS
5448
5449  ;;
5450esac
5451fi
5452TR=$ac_cv_path_TR
5453if test -n "$TR"; then
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5455$as_echo "$TR" >&6; }
5456else
5457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458$as_echo "no" >&6; }
5459fi
5460
5461
5462  test -n "$TR" && break
5463done
5464
5465
5466    if test "x$TR" = x; then
5467        if test "xtr" = x; then
5468          PROG_NAME=tr
5469        else
5470          PROG_NAME=tr
5471        fi
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5473$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5474        as_fn_error $? "Cannot continue" "$LINENO" 5
5475    fi
5476
5477
5478
5479    for ac_prog in uname
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if test "${ac_cv_path_UNAME+set}" = set; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $UNAME in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5500    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511UNAME=$ac_cv_path_UNAME
5512if test -n "$UNAME"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5514$as_echo "$UNAME" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$UNAME" && break
5522done
5523
5524
5525    if test "x$UNAME" = x; then
5526        if test "xuname" = x; then
5527          PROG_NAME=uname
5528        else
5529          PROG_NAME=uname
5530        fi
5531        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5532$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5533        as_fn_error $? "Cannot continue" "$LINENO" 5
5534    fi
5535
5536
5537
5538    for ac_prog in uniq
5539do
5540  # Extract the first word of "$ac_prog", so it can be a program name with args.
5541set dummy $ac_prog; ac_word=$2
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5543$as_echo_n "checking for $ac_word... " >&6; }
5544if test "${ac_cv_path_UNIQ+set}" = set; then :
5545  $as_echo_n "(cached) " >&6
5546else
5547  case $UNIQ in
5548  [\\/]* | ?:[\\/]*)
5549  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5550  ;;
5551  *)
5552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555  IFS=$as_save_IFS
5556  test -z "$as_dir" && as_dir=.
5557    for ac_exec_ext in '' $ac_executable_extensions; do
5558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5559    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5561    break 2
5562  fi
5563done
5564  done
5565IFS=$as_save_IFS
5566
5567  ;;
5568esac
5569fi
5570UNIQ=$ac_cv_path_UNIQ
5571if test -n "$UNIQ"; then
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5573$as_echo "$UNIQ" >&6; }
5574else
5575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
5577fi
5578
5579
5580  test -n "$UNIQ" && break
5581done
5582
5583
5584    if test "x$UNIQ" = x; then
5585        if test "xuniq" = x; then
5586          PROG_NAME=uniq
5587        else
5588          PROG_NAME=uniq
5589        fi
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5591$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5592        as_fn_error $? "Cannot continue" "$LINENO" 5
5593    fi
5594
5595
5596
5597    for ac_prog in wc
5598do
5599  # Extract the first word of "$ac_prog", so it can be a program name with args.
5600set dummy $ac_prog; ac_word=$2
5601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
5603if test "${ac_cv_path_WC+set}" = set; then :
5604  $as_echo_n "(cached) " >&6
5605else
5606  case $WC in
5607  [\\/]* | ?:[\\/]*)
5608  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5609  ;;
5610  *)
5611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5612for as_dir in $PATH
5613do
5614  IFS=$as_save_IFS
5615  test -z "$as_dir" && as_dir=.
5616    for ac_exec_ext in '' $ac_executable_extensions; do
5617  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5618    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5620    break 2
5621  fi
5622done
5623  done
5624IFS=$as_save_IFS
5625
5626  ;;
5627esac
5628fi
5629WC=$ac_cv_path_WC
5630if test -n "$WC"; then
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5632$as_echo "$WC" >&6; }
5633else
5634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5635$as_echo "no" >&6; }
5636fi
5637
5638
5639  test -n "$WC" && break
5640done
5641
5642
5643    if test "x$WC" = x; then
5644        if test "xwc" = x; then
5645          PROG_NAME=wc
5646        else
5647          PROG_NAME=wc
5648        fi
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5650$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5651        as_fn_error $? "Cannot continue" "$LINENO" 5
5652    fi
5653
5654
5655
5656    for ac_prog in which
5657do
5658  # Extract the first word of "$ac_prog", so it can be a program name with args.
5659set dummy $ac_prog; ac_word=$2
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661$as_echo_n "checking for $ac_word... " >&6; }
5662if test "${ac_cv_path_WHICH+set}" = set; then :
5663  $as_echo_n "(cached) " >&6
5664else
5665  case $WHICH in
5666  [\\/]* | ?:[\\/]*)
5667  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5668  ;;
5669  *)
5670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673  IFS=$as_save_IFS
5674  test -z "$as_dir" && as_dir=.
5675    for ac_exec_ext in '' $ac_executable_extensions; do
5676  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5677    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5679    break 2
5680  fi
5681done
5682  done
5683IFS=$as_save_IFS
5684
5685  ;;
5686esac
5687fi
5688WHICH=$ac_cv_path_WHICH
5689if test -n "$WHICH"; then
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5691$as_echo "$WHICH" >&6; }
5692else
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
5695fi
5696
5697
5698  test -n "$WHICH" && break
5699done
5700
5701
5702    if test "x$WHICH" = x; then
5703        if test "xwhich" = x; then
5704          PROG_NAME=which
5705        else
5706          PROG_NAME=which
5707        fi
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5709$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5710        as_fn_error $? "Cannot continue" "$LINENO" 5
5711    fi
5712
5713
5714
5715    for ac_prog in xargs
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if test "${ac_cv_path_XARGS+set}" = set; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $XARGS in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5736    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747XARGS=$ac_cv_path_XARGS
5748if test -n "$XARGS"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5750$as_echo "$XARGS" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$XARGS" && break
5758done
5759
5760
5761    if test "x$XARGS" = x; then
5762        if test "xxargs" = x; then
5763          PROG_NAME=xargs
5764        else
5765          PROG_NAME=xargs
5766        fi
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5768$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5769        as_fn_error $? "Cannot continue" "$LINENO" 5
5770    fi
5771
5772
5773
5774# Then required tools that require some special treatment.
5775for ac_prog in gawk mawk nawk awk
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if test "${ac_cv_prog_AWK+set}" = set; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  if test -n "$AWK"; then
5785  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5786else
5787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5794    ac_cv_prog_AWK="$ac_prog"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802fi
5803fi
5804AWK=$ac_cv_prog_AWK
5805if test -n "$AWK"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5807$as_echo "$AWK" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$AWK" && break
5815done
5816
5817
5818    if test "x$AWK" = x; then
5819        if test "x" = x; then
5820          PROG_NAME=awk
5821        else
5822          PROG_NAME=
5823        fi
5824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5825$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5826        as_fn_error $? "Cannot continue" "$LINENO" 5
5827    fi
5828
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5830$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5831if test "${ac_cv_path_GREP+set}" = set; then :
5832  $as_echo_n "(cached) " >&6
5833else
5834  if test -z "$GREP"; then
5835  ac_path_GREP_found=false
5836  # Loop through the user's path and test for each of PROGNAME-LIST
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_prog in grep ggrep; do
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5845      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5846# Check for GNU ac_path_GREP and select it if it is found.
5847  # Check for GNU $ac_path_GREP
5848case `"$ac_path_GREP" --version 2>&1` in
5849*GNU*)
5850  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5851*)
5852  ac_count=0
5853  $as_echo_n 0123456789 >"conftest.in"
5854  while :
5855  do
5856    cat "conftest.in" "conftest.in" >"conftest.tmp"
5857    mv "conftest.tmp" "conftest.in"
5858    cp "conftest.in" "conftest.nl"
5859    $as_echo 'GREP' >> "conftest.nl"
5860    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5861    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5862    as_fn_arith $ac_count + 1 && ac_count=$as_val
5863    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5864      # Best one so far, save it but keep looking for a better one
5865      ac_cv_path_GREP="$ac_path_GREP"
5866      ac_path_GREP_max=$ac_count
5867    fi
5868    # 10*(2^10) chars as input seems more than enough
5869    test $ac_count -gt 10 && break
5870  done
5871  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5872esac
5873
5874      $ac_path_GREP_found && break 3
5875    done
5876  done
5877  done
5878IFS=$as_save_IFS
5879  if test -z "$ac_cv_path_GREP"; then
5880    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5881  fi
5882else
5883  ac_cv_path_GREP=$GREP
5884fi
5885
5886fi
5887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5888$as_echo "$ac_cv_path_GREP" >&6; }
5889 GREP="$ac_cv_path_GREP"
5890
5891
5892
5893    if test "x$GREP" = x; then
5894        if test "x" = x; then
5895          PROG_NAME=grep
5896        else
5897          PROG_NAME=
5898        fi
5899        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5901        as_fn_error $? "Cannot continue" "$LINENO" 5
5902    fi
5903
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5905$as_echo_n "checking for egrep... " >&6; }
5906if test "${ac_cv_path_EGREP+set}" = set; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5910   then ac_cv_path_EGREP="$GREP -E"
5911   else
5912     if test -z "$EGREP"; then
5913  ac_path_EGREP_found=false
5914  # Loop through the user's path and test for each of PROGNAME-LIST
5915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5917do
5918  IFS=$as_save_IFS
5919  test -z "$as_dir" && as_dir=.
5920    for ac_prog in egrep; do
5921    for ac_exec_ext in '' $ac_executable_extensions; do
5922      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5923      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5924# Check for GNU ac_path_EGREP and select it if it is found.
5925  # Check for GNU $ac_path_EGREP
5926case `"$ac_path_EGREP" --version 2>&1` in
5927*GNU*)
5928  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5929*)
5930  ac_count=0
5931  $as_echo_n 0123456789 >"conftest.in"
5932  while :
5933  do
5934    cat "conftest.in" "conftest.in" >"conftest.tmp"
5935    mv "conftest.tmp" "conftest.in"
5936    cp "conftest.in" "conftest.nl"
5937    $as_echo 'EGREP' >> "conftest.nl"
5938    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5939    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5940    as_fn_arith $ac_count + 1 && ac_count=$as_val
5941    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5942      # Best one so far, save it but keep looking for a better one
5943      ac_cv_path_EGREP="$ac_path_EGREP"
5944      ac_path_EGREP_max=$ac_count
5945    fi
5946    # 10*(2^10) chars as input seems more than enough
5947    test $ac_count -gt 10 && break
5948  done
5949  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5950esac
5951
5952      $ac_path_EGREP_found && break 3
5953    done
5954  done
5955  done
5956IFS=$as_save_IFS
5957  if test -z "$ac_cv_path_EGREP"; then
5958    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5959  fi
5960else
5961  ac_cv_path_EGREP=$EGREP
5962fi
5963
5964   fi
5965fi
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5967$as_echo "$ac_cv_path_EGREP" >&6; }
5968 EGREP="$ac_cv_path_EGREP"
5969
5970
5971
5972    if test "x$EGREP" = x; then
5973        if test "x" = x; then
5974          PROG_NAME=egrep
5975        else
5976          PROG_NAME=
5977        fi
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5979$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5980        as_fn_error $? "Cannot continue" "$LINENO" 5
5981    fi
5982
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5984$as_echo_n "checking for fgrep... " >&6; }
5985if test "${ac_cv_path_FGREP+set}" = set; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5989   then ac_cv_path_FGREP="$GREP -F"
5990   else
5991     if test -z "$FGREP"; then
5992  ac_path_FGREP_found=false
5993  # Loop through the user's path and test for each of PROGNAME-LIST
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_prog in fgrep; do
6000    for ac_exec_ext in '' $ac_executable_extensions; do
6001      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6002      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6003# Check for GNU ac_path_FGREP and select it if it is found.
6004  # Check for GNU $ac_path_FGREP
6005case `"$ac_path_FGREP" --version 2>&1` in
6006*GNU*)
6007  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6008*)
6009  ac_count=0
6010  $as_echo_n 0123456789 >"conftest.in"
6011  while :
6012  do
6013    cat "conftest.in" "conftest.in" >"conftest.tmp"
6014    mv "conftest.tmp" "conftest.in"
6015    cp "conftest.in" "conftest.nl"
6016    $as_echo 'FGREP' >> "conftest.nl"
6017    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6018    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6019    as_fn_arith $ac_count + 1 && ac_count=$as_val
6020    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6021      # Best one so far, save it but keep looking for a better one
6022      ac_cv_path_FGREP="$ac_path_FGREP"
6023      ac_path_FGREP_max=$ac_count
6024    fi
6025    # 10*(2^10) chars as input seems more than enough
6026    test $ac_count -gt 10 && break
6027  done
6028  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6029esac
6030
6031      $ac_path_FGREP_found && break 3
6032    done
6033  done
6034  done
6035IFS=$as_save_IFS
6036  if test -z "$ac_cv_path_FGREP"; then
6037    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6038  fi
6039else
6040  ac_cv_path_FGREP=$FGREP
6041fi
6042
6043   fi
6044fi
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6046$as_echo "$ac_cv_path_FGREP" >&6; }
6047 FGREP="$ac_cv_path_FGREP"
6048
6049
6050
6051    if test "x$FGREP" = x; then
6052        if test "x" = x; then
6053          PROG_NAME=fgrep
6054        else
6055          PROG_NAME=
6056        fi
6057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6059        as_fn_error $? "Cannot continue" "$LINENO" 5
6060    fi
6061
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6063$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6064if test "${ac_cv_path_SED+set}" = set; then :
6065  $as_echo_n "(cached) " >&6
6066else
6067            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6068     for ac_i in 1 2 3 4 5 6 7; do
6069       ac_script="$ac_script$as_nl$ac_script"
6070     done
6071     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6072     { ac_script=; unset ac_script;}
6073     if test -z "$SED"; then
6074  ac_path_SED_found=false
6075  # Loop through the user's path and test for each of PROGNAME-LIST
6076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077for as_dir in $PATH
6078do
6079  IFS=$as_save_IFS
6080  test -z "$as_dir" && as_dir=.
6081    for ac_prog in sed gsed; do
6082    for ac_exec_ext in '' $ac_executable_extensions; do
6083      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6084      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6085# Check for GNU ac_path_SED and select it if it is found.
6086  # Check for GNU $ac_path_SED
6087case `"$ac_path_SED" --version 2>&1` in
6088*GNU*)
6089  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6090*)
6091  ac_count=0
6092  $as_echo_n 0123456789 >"conftest.in"
6093  while :
6094  do
6095    cat "conftest.in" "conftest.in" >"conftest.tmp"
6096    mv "conftest.tmp" "conftest.in"
6097    cp "conftest.in" "conftest.nl"
6098    $as_echo '' >> "conftest.nl"
6099    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6100    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6101    as_fn_arith $ac_count + 1 && ac_count=$as_val
6102    if test $ac_count -gt ${ac_path_SED_max-0}; then
6103      # Best one so far, save it but keep looking for a better one
6104      ac_cv_path_SED="$ac_path_SED"
6105      ac_path_SED_max=$ac_count
6106    fi
6107    # 10*(2^10) chars as input seems more than enough
6108    test $ac_count -gt 10 && break
6109  done
6110  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6111esac
6112
6113      $ac_path_SED_found && break 3
6114    done
6115  done
6116  done
6117IFS=$as_save_IFS
6118  if test -z "$ac_cv_path_SED"; then
6119    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6120  fi
6121else
6122  ac_cv_path_SED=$SED
6123fi
6124
6125fi
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6127$as_echo "$ac_cv_path_SED" >&6; }
6128 SED="$ac_cv_path_SED"
6129  rm -f conftest.sed
6130
6131
6132    if test "x$SED" = x; then
6133        if test "x" = x; then
6134          PROG_NAME=sed
6135        else
6136          PROG_NAME=
6137        fi
6138        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6139$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6140        as_fn_error $? "Cannot continue" "$LINENO" 5
6141    fi
6142
6143
6144for ac_prog in nawk gawk awk
6145do
6146  # Extract the first word of "$ac_prog", so it can be a program name with args.
6147set dummy $ac_prog; ac_word=$2
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6149$as_echo_n "checking for $ac_word... " >&6; }
6150if test "${ac_cv_path_NAWK+set}" = set; then :
6151  $as_echo_n "(cached) " >&6
6152else
6153  case $NAWK in
6154  [\\/]* | ?:[\\/]*)
6155  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6156  ;;
6157  *)
6158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161  IFS=$as_save_IFS
6162  test -z "$as_dir" && as_dir=.
6163    for ac_exec_ext in '' $ac_executable_extensions; do
6164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6165    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6167    break 2
6168  fi
6169done
6170  done
6171IFS=$as_save_IFS
6172
6173  ;;
6174esac
6175fi
6176NAWK=$ac_cv_path_NAWK
6177if test -n "$NAWK"; then
6178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6179$as_echo "$NAWK" >&6; }
6180else
6181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6182$as_echo "no" >&6; }
6183fi
6184
6185
6186  test -n "$NAWK" && break
6187done
6188
6189
6190    if test "x$NAWK" = x; then
6191        if test "x" = x; then
6192          PROG_NAME=nawk
6193        else
6194          PROG_NAME=
6195        fi
6196        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6197$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6198        as_fn_error $? "Cannot continue" "$LINENO" 5
6199    fi
6200
6201
6202# Always force rm.
6203RM="$RM -f"
6204
6205# These are not required on all platforms
6206# Extract the first word of "cygpath", so it can be a program name with args.
6207set dummy cygpath; ac_word=$2
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6209$as_echo_n "checking for $ac_word... " >&6; }
6210if test "${ac_cv_path_CYGPATH+set}" = set; then :
6211  $as_echo_n "(cached) " >&6
6212else
6213  case $CYGPATH in
6214  [\\/]* | ?:[\\/]*)
6215  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6216  ;;
6217  *)
6218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221  IFS=$as_save_IFS
6222  test -z "$as_dir" && as_dir=.
6223    for ac_exec_ext in '' $ac_executable_extensions; do
6224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6225    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6227    break 2
6228  fi
6229done
6230  done
6231IFS=$as_save_IFS
6232
6233  ;;
6234esac
6235fi
6236CYGPATH=$ac_cv_path_CYGPATH
6237if test -n "$CYGPATH"; then
6238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6239$as_echo "$CYGPATH" >&6; }
6240else
6241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243fi
6244
6245
6246# Extract the first word of "readlink", so it can be a program name with args.
6247set dummy readlink; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
6250if test "${ac_cv_path_READLINK+set}" = set; then :
6251  $as_echo_n "(cached) " >&6
6252else
6253  case $READLINK in
6254  [\\/]* | ?:[\\/]*)
6255  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6256  ;;
6257  *)
6258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259for as_dir in $PATH
6260do
6261  IFS=$as_save_IFS
6262  test -z "$as_dir" && as_dir=.
6263    for ac_exec_ext in '' $ac_executable_extensions; do
6264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6265    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6267    break 2
6268  fi
6269done
6270  done
6271IFS=$as_save_IFS
6272
6273  ;;
6274esac
6275fi
6276READLINK=$ac_cv_path_READLINK
6277if test -n "$READLINK"; then
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6279$as_echo "$READLINK" >&6; }
6280else
6281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6282$as_echo "no" >&6; }
6283fi
6284
6285
6286# Extract the first word of "df", so it can be a program name with args.
6287set dummy df; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if test "${ac_cv_path_DF+set}" = set; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  case $DF in
6294  [\\/]* | ?:[\\/]*)
6295  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6296  ;;
6297  *)
6298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301  IFS=$as_save_IFS
6302  test -z "$as_dir" && as_dir=.
6303    for ac_exec_ext in '' $ac_executable_extensions; do
6304  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6305    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307    break 2
6308  fi
6309done
6310  done
6311IFS=$as_save_IFS
6312
6313  ;;
6314esac
6315fi
6316DF=$ac_cv_path_DF
6317if test -n "$DF"; then
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6319$as_echo "$DF" >&6; }
6320else
6321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322$as_echo "no" >&6; }
6323fi
6324
6325
6326# Extract the first word of "SetFile", so it can be a program name with args.
6327set dummy SetFile; ac_word=$2
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6329$as_echo_n "checking for $ac_word... " >&6; }
6330if test "${ac_cv_path_SETFILE+set}" = set; then :
6331  $as_echo_n "(cached) " >&6
6332else
6333  case $SETFILE in
6334  [\\/]* | ?:[\\/]*)
6335  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6336  ;;
6337  *)
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_exec_ext in '' $ac_executable_extensions; do
6344  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6345    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347    break 2
6348  fi
6349done
6350  done
6351IFS=$as_save_IFS
6352
6353  ;;
6354esac
6355fi
6356SETFILE=$ac_cv_path_SETFILE
6357if test -n "$SETFILE"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6359$as_echo "$SETFILE" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366
6367
6368# Now we can determine OpenJDK build and target platforms. This is required to
6369# have early on.
6370# Make sure we can run config.sub.
6371$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6372  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6373
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6375$as_echo_n "checking build system type... " >&6; }
6376if test "${ac_cv_build+set}" = set; then :
6377  $as_echo_n "(cached) " >&6
6378else
6379  ac_build_alias=$build_alias
6380test "x$ac_build_alias" = x &&
6381  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6382test "x$ac_build_alias" = x &&
6383  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6384ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6385  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6386
6387fi
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6389$as_echo "$ac_cv_build" >&6; }
6390case $ac_cv_build in
6391*-*-*) ;;
6392*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6393esac
6394build=$ac_cv_build
6395ac_save_IFS=$IFS; IFS='-'
6396set x $ac_cv_build
6397shift
6398build_cpu=$1
6399build_vendor=$2
6400shift; shift
6401# Remember, the first character of IFS is used to create $*,
6402# except with old shells:
6403build_os=$*
6404IFS=$ac_save_IFS
6405case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6406
6407
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6409$as_echo_n "checking host system type... " >&6; }
6410if test "${ac_cv_host+set}" = set; then :
6411  $as_echo_n "(cached) " >&6
6412else
6413  if test "x$host_alias" = x; then
6414  ac_cv_host=$ac_cv_build
6415else
6416  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6417    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6418fi
6419
6420fi
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6422$as_echo "$ac_cv_host" >&6; }
6423case $ac_cv_host in
6424*-*-*) ;;
6425*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6426esac
6427host=$ac_cv_host
6428ac_save_IFS=$IFS; IFS='-'
6429set x $ac_cv_host
6430shift
6431host_cpu=$1
6432host_vendor=$2
6433shift; shift
6434# Remember, the first character of IFS is used to create $*,
6435# except with old shells:
6436host_os=$*
6437IFS=$ac_save_IFS
6438case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6439
6440
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6442$as_echo_n "checking target system type... " >&6; }
6443if test "${ac_cv_target+set}" = set; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  if test "x$target_alias" = x; then
6447  ac_cv_target=$ac_cv_host
6448else
6449  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6450    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6451fi
6452
6453fi
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6455$as_echo "$ac_cv_target" >&6; }
6456case $ac_cv_target in
6457*-*-*) ;;
6458*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6459esac
6460target=$ac_cv_target
6461ac_save_IFS=$IFS; IFS='-'
6462set x $ac_cv_target
6463shift
6464target_cpu=$1
6465target_vendor=$2
6466shift; shift
6467# Remember, the first character of IFS is used to create $*,
6468# except with old shells:
6469target_os=$*
6470IFS=$ac_save_IFS
6471case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6472
6473
6474# The aliases save the names the user supplied, while $host etc.
6475# will get canonicalized.
6476test -n "$target_alias" &&
6477  test "$program_prefix$program_suffix$program_transform_name" = \
6478    NONENONEs,x,x, &&
6479  program_prefix=${target_alias}-
6480
6481# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6482# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6483# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6484# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6485# to use the configure naming style.
6486
6487
6488
6489
6490
6491    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6492    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6493    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6494    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6495    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6496    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6497
6498
6499
6500    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6501
6502  case "$build_os" in
6503    *linux*)
6504      VAR_OS=linux
6505      VAR_OS_API=posix
6506      VAR_OS_ENV=linux
6507      ;;
6508    *solaris*)
6509      VAR_OS=solaris
6510      VAR_OS_API=posix
6511      VAR_OS_ENV=solaris
6512      ;;
6513    *darwin*)
6514      VAR_OS=macosx
6515      VAR_OS_API=posix
6516      VAR_OS_ENV=macosx
6517      ;;
6518    *bsd*)
6519      VAR_OS=bsd
6520      VAR_OS_API=posix
6521      VAR_OS_ENV=bsd
6522      ;;
6523    *cygwin*)
6524      VAR_OS=windows
6525      VAR_OS_API=winapi
6526      VAR_OS_ENV=windows.cygwin
6527      ;;
6528    *mingw*)
6529      VAR_OS=windows
6530      VAR_OS_API=winapi
6531      VAR_OS_ENV=windows.msys
6532      ;;
6533    *)
6534      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6535      ;;
6536  esac
6537
6538
6539  # First argument is the cpu name from the trip/quad
6540  case "$build_cpu" in
6541    x86_64)
6542      VAR_CPU=x86_64
6543      VAR_CPU_ARCH=x86
6544      VAR_CPU_BITS=64
6545      VAR_CPU_ENDIAN=little
6546      ;;
6547    i?86)
6548      VAR_CPU=x86
6549      VAR_CPU_ARCH=x86
6550      VAR_CPU_BITS=32
6551      VAR_CPU_ENDIAN=little
6552      ;;
6553    arm*)
6554      VAR_CPU=arm
6555      VAR_CPU_ARCH=arm
6556      VAR_CPU_BITS=32
6557      VAR_CPU_ENDIAN=little
6558      ;;
6559    powerpc)
6560      VAR_CPU=ppc
6561      VAR_CPU_ARCH=ppc
6562      VAR_CPU_BITS=32
6563      VAR_CPU_ENDIAN=big
6564       ;;
6565    powerpc64)
6566      VAR_CPU=ppc64
6567      VAR_CPU_ARCH=ppc
6568      VAR_CPU_BITS=64
6569      VAR_CPU_ENDIAN=big
6570       ;;
6571    sparc)
6572      VAR_CPU=sparc
6573      VAR_CPU_ARCH=sparc
6574      VAR_CPU_BITS=32
6575      VAR_CPU_ENDIAN=big
6576       ;;
6577    sparcv9)
6578      VAR_CPU=sparcv9
6579      VAR_CPU_ARCH=sparc
6580      VAR_CPU_BITS=64
6581      VAR_CPU_ENDIAN=big
6582       ;;
6583    *)
6584      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6585      ;;
6586  esac
6587
6588    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6589    OPENJDK_BUILD_OS="$VAR_OS"
6590    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6591    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6592    OPENJDK_BUILD_CPU="$VAR_CPU"
6593    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6594    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6595    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6596
6597
6598
6599
6600
6601
6602
6603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6604$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6606$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6607
6608    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6609
6610  case "$host_os" in
6611    *linux*)
6612      VAR_OS=linux
6613      VAR_OS_API=posix
6614      VAR_OS_ENV=linux
6615      ;;
6616    *solaris*)
6617      VAR_OS=solaris
6618      VAR_OS_API=posix
6619      VAR_OS_ENV=solaris
6620      ;;
6621    *darwin*)
6622      VAR_OS=macosx
6623      VAR_OS_API=posix
6624      VAR_OS_ENV=macosx
6625      ;;
6626    *bsd*)
6627      VAR_OS=bsd
6628      VAR_OS_API=posix
6629      VAR_OS_ENV=bsd
6630      ;;
6631    *cygwin*)
6632      VAR_OS=windows
6633      VAR_OS_API=winapi
6634      VAR_OS_ENV=windows.cygwin
6635      ;;
6636    *mingw*)
6637      VAR_OS=windows
6638      VAR_OS_API=winapi
6639      VAR_OS_ENV=windows.msys
6640      ;;
6641    *)
6642      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6643      ;;
6644  esac
6645
6646
6647  # First argument is the cpu name from the trip/quad
6648  case "$host_cpu" in
6649    x86_64)
6650      VAR_CPU=x86_64
6651      VAR_CPU_ARCH=x86
6652      VAR_CPU_BITS=64
6653      VAR_CPU_ENDIAN=little
6654      ;;
6655    i?86)
6656      VAR_CPU=x86
6657      VAR_CPU_ARCH=x86
6658      VAR_CPU_BITS=32
6659      VAR_CPU_ENDIAN=little
6660      ;;
6661    arm*)
6662      VAR_CPU=arm
6663      VAR_CPU_ARCH=arm
6664      VAR_CPU_BITS=32
6665      VAR_CPU_ENDIAN=little
6666      ;;
6667    powerpc)
6668      VAR_CPU=ppc
6669      VAR_CPU_ARCH=ppc
6670      VAR_CPU_BITS=32
6671      VAR_CPU_ENDIAN=big
6672       ;;
6673    powerpc64)
6674      VAR_CPU=ppc64
6675      VAR_CPU_ARCH=ppc
6676      VAR_CPU_BITS=64
6677      VAR_CPU_ENDIAN=big
6678       ;;
6679    sparc)
6680      VAR_CPU=sparc
6681      VAR_CPU_ARCH=sparc
6682      VAR_CPU_BITS=32
6683      VAR_CPU_ENDIAN=big
6684       ;;
6685    sparcv9)
6686      VAR_CPU=sparcv9
6687      VAR_CPU_ARCH=sparc
6688      VAR_CPU_BITS=64
6689      VAR_CPU_ENDIAN=big
6690       ;;
6691    *)
6692      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6693      ;;
6694  esac
6695
6696    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6697    OPENJDK_TARGET_OS="$VAR_OS"
6698    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6699    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6700    OPENJDK_TARGET_CPU="$VAR_CPU"
6701    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6702    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6703    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6704
6705
6706
6707
6708
6709
6710
6711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6712$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6714$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6715
6716
6717
6718# Check whether --with-target-bits was given.
6719if test "${with_target_bits+set}" = set; then :
6720  withval=$with_target_bits;
6721fi
6722
6723
6724  # We have three types of compiles:
6725  # native  == normal compilation, target system == build system
6726  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6727  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6728  #
6729  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6730    # We're doing a proper cross-compilation
6731    COMPILE_TYPE="cross"
6732  else
6733    COMPILE_TYPE="native"
6734  fi
6735
6736  if test "x$with_target_bits" != x; then
6737    if test "x$COMPILE_TYPE" = "xcross"; then
6738      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6739    fi
6740
6741    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6742      # A reduced build is requested
6743      COMPILE_TYPE="reduced"
6744      OPENJDK_TARGET_CPU_BITS=32
6745      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6746        OPENJDK_TARGET_CPU=x86
6747      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6748        OPENJDK_TARGET_CPU=sparc
6749      else
6750        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6751      fi
6752    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6753      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
6754    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6755      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6756$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6757    else
6758      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6759    fi
6760  fi
6761
6762
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6764$as_echo_n "checking compilation type... " >&6; }
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6766$as_echo "$COMPILE_TYPE" >&6; }
6767
6768
6769    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6770       REQUIRED_OS_NAME=SunOS
6771       REQUIRED_OS_VERSION=5.10
6772    fi
6773    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6774       REQUIRED_OS_NAME=Linux
6775       REQUIRED_OS_VERSION=2.6
6776    fi
6777    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6778        REQUIRED_OS_NAME=Windows
6779        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6780            REQUIRED_OS_VERSION=5.2
6781        else
6782            REQUIRED_OS_VERSION=5.1
6783        fi
6784    fi
6785    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6786        REQUIRED_OS_NAME=Darwin
6787        REQUIRED_OS_VERSION=11.2
6788    fi
6789
6790
6791
6792
6793
6794    # Also store the legacy naming of the cpu.
6795    # Ie i586 and amd64 instead of x86 and x86_64
6796    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6797    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6798      OPENJDK_TARGET_CPU_LEGACY="i586"
6799    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6800      # On all platforms except MacOSX replace x86_64 with amd64.
6801      OPENJDK_TARGET_CPU_LEGACY="amd64"
6802    fi
6803
6804
6805    # And the second legacy naming of the cpu.
6806    # Ie i386 and amd64 instead of x86 and x86_64.
6807    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6808    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6809      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6810    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6811      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6812    fi
6813
6814
6815    # This is the name of the cpu (but using i386 and amd64 instead of
6816    # x86 and x86_64, respectively), preceeded by a /, to be used when
6817    # locating libraries. On macosx, it's empty, though.
6818    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6819    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6820        OPENJDK_TARGET_CPU_LIBDIR=""
6821    fi
6822
6823
6824    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6825    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6826    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6827    OPENJDK_TARGET_CPU_ISADIR=""
6828    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6829      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6830          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6831      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6832          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6833      fi
6834    fi
6835
6836
6837    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6838    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6839    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6840      # On linux only, we replace x86 with i386.
6841      OPENJDK_TARGET_CPU_OSARCH="i386"
6842    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6843      # On all platforms except macosx, we replace x86_64 with amd64.
6844      OPENJDK_TARGET_CPU_OSARCH="amd64"
6845    fi
6846
6847
6848    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6849    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6850      OPENJDK_TARGET_CPU_JLI="i386"
6851    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6852      # On all platforms except macosx, we replace x86_64 with amd64.
6853      OPENJDK_TARGET_CPU_JLI="amd64"
6854    fi
6855    # Now setup the -D flags for building libjli.
6856    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6857    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6858      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6859        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6860      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6861        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6862      fi
6863    fi
6864
6865
6866    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6867    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6868        OPENJDK_TARGET_OS_API_DIR="solaris"
6869    fi
6870    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6871        OPENJDK_TARGET_OS_API_DIR="windows"
6872    fi
6873
6874
6875    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6876        A_LP64="LP64:="
6877        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6878        # unpack200.exe
6879        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6880            ADD_LP64="-D_LP64=1"
6881        fi
6882    fi
6883    LP64=$A_LP64
6884
6885
6886    if test "x$COMPILE_TYPE" = "xcross"; then
6887      # FIXME: ... or should this include reduced builds..?
6888      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6889    else
6890      DEFINE_CROSS_COMPILE_ARCH=""
6891    fi
6892
6893
6894
6895
6896# Continue setting up basic stuff. Most remaining code require fundamental tools.
6897
6898# Locate the directory of this script.
6899SCRIPT="$0"
6900
6901    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6902        # Follow a chain of symbolic links. Use readlink
6903        # where it exists, else fall back to horribly
6904        # complicated shell code.
6905        if test "x$READLINK_TESTED" != yes; then
6906            # On MacOSX there is a readlink tool with a different
6907            # purpose than the GNU readlink tool. Check the found readlink.
6908            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6909            if test "x$ISGNU" = x; then
6910                 # A readlink that we do not know how to use.
6911                 # Are there other non-GNU readlinks out there?
6912                 READLINK_TESTED=yes
6913                 READLINK=
6914            fi
6915        fi
6916
6917        if test "x$READLINK" != x; then
6918            SCRIPT=`$READLINK -f $SCRIPT`
6919        else
6920            # Save the current directory for restoring afterwards
6921            STARTDIR=$PWD
6922            COUNTER=0
6923            sym_link_dir=`$DIRNAME $SCRIPT`
6924            sym_link_file=`$BASENAME $SCRIPT`
6925            # Use the system pwd and not the shell builtin to resolve directory symlinks
6926            cd $sym_link_dir
6927            cd `$THEPWDCMD`
6928            sym_link_dir=`$THEPWDCMD`
6929            # Resolve file symlinks
6930            while test $COUNTER -lt 20; do
6931                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6932                if test "x$ISLINK" == x; then
6933                    # This is not a symbolic link! We are done!
6934                    break
6935                fi
6936                # Again resolve directory symlinks since the target of the just found
6937                # link could be in a different directory
6938                cd `$DIRNAME $ISLINK`
6939                sym_link_dir=`$THEPWDCMD`
6940                sym_link_file=`$BASENAME $ISLINK`
6941                let COUNTER=COUNTER+1
6942            done
6943            cd $STARTDIR
6944            SCRIPT=$sym_link_dir/$sym_link_file
6945        fi
6946    fi
6947
6948AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6949
6950# Where is the source? It is located two levels above the configure script.
6951CURDIR="$PWD"
6952cd "$AUTOCONF_DIR/../.."
6953SRC_ROOT="`$THEPWDCMD`"
6954
6955if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6956  PATH_SEP=";"
6957
6958  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6959  if test $SRC_ROOT_LENGTH -gt 100; then
6960      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6961  fi
6962
6963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6965$as_echo_n "checking cygwin release... " >&6; }
6966    CYGWIN_VERSION=`$UNAME -r`
6967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6968$as_echo "$CYGWIN_VERSION" >&6; }
6969    WINDOWS_ENV_VENDOR='cygwin'
6970    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6971
6972    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6973    if test "x$CYGWIN_VERSION_OK" = x; then
6974      { $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
6975$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;}
6976      as_fn_error $? "Cannot continue" "$LINENO" 5
6977    fi
6978    if test "x$CYGPATH" = x; then
6979        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6980    fi
6981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6982$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6983    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6984    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6985    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6986    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6988$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6989    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6990    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6991    if test "x$test_cygdrive_prefix" = x; then
6992        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6993    fi
6994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6996$as_echo_n "checking msys release... " >&6; }
6997    MSYS_VERSION=`$UNAME -r`
6998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6999$as_echo "$MSYS_VERSION" >&6; }
7000
7001    WINDOWS_ENV_VENDOR='msys'
7002    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7003
7004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7005$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7006    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7007    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7008
7009  windows_path="$MSYS_ROOT_PATH"
7010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7011    unix_path=`$CYGPATH -u "$windows_path"`
7012    MSYS_ROOT_PATH="$unix_path"
7013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7015    MSYS_ROOT_PATH="$unix_path"
7016  fi
7017
7018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7019$as_echo "$MSYS_ROOT_PATH" >&6; }
7020    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7021  else
7022    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7023  fi
7024
7025  # Test if windows or unix (cygwin/msys) find is first in path.
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7027$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7028  FIND_BINARY_OUTPUT=`find --version 2>&1`
7029  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7031$as_echo "unix style" >&6; }
7032  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7034$as_echo "Windows" >&6; }
7035    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7036$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7037    { $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
7038$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7039    as_fn_error $? "Cannot continue" "$LINENO" 5
7040  else
7041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7042$as_echo "unknown" >&6; }
7043    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7044$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7045  fi
7046
7047else
7048  PATH_SEP=":"
7049fi
7050
7051
7052
7053cd "$CURDIR"
7054
7055
7056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7057
7058  # Input might be given as Windows format, start by converting to
7059  # unix format.
7060  path="$SRC_ROOT"
7061  new_path=`$CYGPATH -u "$path"`
7062
7063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7066  # "foo.exe" is OK but "foo" is an error.
7067  #
7068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7069  # It is also a way to make sure we got the proper file name for the real test later on.
7070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7071  if test "x$test_shortpath" = x; then
7072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7073$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7074    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7075  fi
7076
7077  # Call helper function which possibly converts this using DOS-style short mode.
7078  # If so, the updated path is stored in $new_path.
7079
7080  input_path="$new_path"
7081  # Check if we need to convert this using DOS-style short mode. If the path
7082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7083  # take no chances and rewrite it.
7084  # Note: m4 eats our [], so we need to use [ and ] instead.
7085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7086  if test "x$has_forbidden_chars" != x; then
7087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7091      # Going to short mode and back again did indeed matter. Since short mode is
7092      # case insensitive, let's make it lowercase to improve readability.
7093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7094      # Now convert it back to Unix-stile (cygpath)
7095      input_path=`$CYGPATH -u "$shortmode_path"`
7096      new_path="$input_path"
7097    fi
7098  fi
7099
7100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7101  if test "x$test_cygdrive_prefix" = x; then
7102    # As a simple fix, exclude /usr/bin since it's not a real path.
7103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7105      # a path prefixed by /cygdrive for fixpath to work.
7106      new_path="$CYGWIN_ROOT_PATH$input_path"
7107    fi
7108  fi
7109
7110
7111  if test "x$path" != "x$new_path"; then
7112    SRC_ROOT="$new_path"
7113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7114$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7115  fi
7116
7117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7118
7119  path="$SRC_ROOT"
7120  has_colon=`$ECHO $path | $GREP ^.:`
7121  new_path="$path"
7122  if test "x$has_colon" = x; then
7123    # Not in mixed or Windows style, start by that.
7124    new_path=`cmd //c echo $path`
7125  fi
7126
7127
7128  input_path="$new_path"
7129  # Check if we need to convert this using DOS-style short mode. If the path
7130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7131  # take no chances and rewrite it.
7132  # Note: m4 eats our [], so we need to use [ and ] instead.
7133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7134  if test "x$has_forbidden_chars" != x; then
7135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7137  fi
7138
7139
7140  windows_path="$new_path"
7141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7142    unix_path=`$CYGPATH -u "$windows_path"`
7143    new_path="$unix_path"
7144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7146    new_path="$unix_path"
7147  fi
7148
7149  if test "x$path" != "x$new_path"; then
7150    SRC_ROOT="$new_path"
7151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7152$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7153  fi
7154
7155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7157
7158  else
7159    # We're on a posix platform. Hooray! :)
7160    path="$SRC_ROOT"
7161
7162    if test ! -f "$path" && test ! -d "$path"; then
7163      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7164    fi
7165
7166    has_space=`$ECHO "$path" | $GREP " "`
7167    if test "x$has_space" != x; then
7168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7169$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7170      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7171    fi
7172  fi
7173
7174
7175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7176
7177  # Input might be given as Windows format, start by converting to
7178  # unix format.
7179  path="$CURDIR"
7180  new_path=`$CYGPATH -u "$path"`
7181
7182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7185  # "foo.exe" is OK but "foo" is an error.
7186  #
7187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7188  # It is also a way to make sure we got the proper file name for the real test later on.
7189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7190  if test "x$test_shortpath" = x; then
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7192$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7193    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7194  fi
7195
7196  # Call helper function which possibly converts this using DOS-style short mode.
7197  # If so, the updated path is stored in $new_path.
7198
7199  input_path="$new_path"
7200  # Check if we need to convert this using DOS-style short mode. If the path
7201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7202  # take no chances and rewrite it.
7203  # Note: m4 eats our [], so we need to use [ and ] instead.
7204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7205  if test "x$has_forbidden_chars" != x; then
7206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7210      # Going to short mode and back again did indeed matter. Since short mode is
7211      # case insensitive, let's make it lowercase to improve readability.
7212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7213      # Now convert it back to Unix-stile (cygpath)
7214      input_path=`$CYGPATH -u "$shortmode_path"`
7215      new_path="$input_path"
7216    fi
7217  fi
7218
7219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7220  if test "x$test_cygdrive_prefix" = x; then
7221    # As a simple fix, exclude /usr/bin since it's not a real path.
7222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7224      # a path prefixed by /cygdrive for fixpath to work.
7225      new_path="$CYGWIN_ROOT_PATH$input_path"
7226    fi
7227  fi
7228
7229
7230  if test "x$path" != "x$new_path"; then
7231    CURDIR="$new_path"
7232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7233$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7234  fi
7235
7236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7237
7238  path="$CURDIR"
7239  has_colon=`$ECHO $path | $GREP ^.:`
7240  new_path="$path"
7241  if test "x$has_colon" = x; then
7242    # Not in mixed or Windows style, start by that.
7243    new_path=`cmd //c echo $path`
7244  fi
7245
7246
7247  input_path="$new_path"
7248  # Check if we need to convert this using DOS-style short mode. If the path
7249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7250  # take no chances and rewrite it.
7251  # Note: m4 eats our [], so we need to use [ and ] instead.
7252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7253  if test "x$has_forbidden_chars" != x; then
7254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7256  fi
7257
7258
7259  windows_path="$new_path"
7260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7261    unix_path=`$CYGPATH -u "$windows_path"`
7262    new_path="$unix_path"
7263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7265    new_path="$unix_path"
7266  fi
7267
7268  if test "x$path" != "x$new_path"; then
7269    CURDIR="$new_path"
7270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7271$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7272  fi
7273
7274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7276
7277  else
7278    # We're on a posix platform. Hooray! :)
7279    path="$CURDIR"
7280
7281    if test ! -f "$path" && test ! -d "$path"; then
7282      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7283    fi
7284
7285    has_space=`$ECHO "$path" | $GREP " "`
7286    if test "x$has_space" != x; then
7287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7288$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7289      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7290    fi
7291  fi
7292
7293
7294if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7295    # Add extra search paths on solaris for utilities like ar and as etc...
7296    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7297fi
7298
7299# You can force the sys-root if the sys-root encoded into the cross compiler tools
7300# is not correct.
7301
7302# Check whether --with-sys-root was given.
7303if test "${with_sys_root+set}" = set; then :
7304  withval=$with_sys_root;
7305fi
7306
7307
7308if test "x$with_sys_root" != x; then
7309  SYS_ROOT=$with_sys_root
7310else
7311  SYS_ROOT=/
7312fi
7313
7314
7315
7316# Check whether --with-tools-dir was given.
7317if test "${with_tools_dir+set}" = set; then :
7318  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7319fi
7320
7321
7322
7323# Check whether --with-devkit was given.
7324if test "${with_devkit+set}" = set; then :
7325  withval=$with_devkit;
7326    if test "x$with_sys_root" != x; then
7327      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7328    fi
7329    if test "x$with_tools_dir" != x; then
7330      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7331    fi
7332    TOOLS_DIR=$with_devkit/bin
7333    SYS_ROOT=$with_devkit/$host_alias/libc
7334
7335fi
7336
7337
7338
7339
7340# Setup default logging of stdout and stderr to build.log in the output root.
7341BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7342BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7343BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7344
7345
7346
7347
7348
7349# These are needed to be able to create a configuration name (and thus the output directory)
7350
7351###############################################################################
7352#
7353# Check which variant of the JDK that we want to build.
7354# Currently we have:
7355#    normal:   standard edition
7356# but the custom make system may add other variants
7357#
7358# Effectively the JDK variant gives a name to a specific set of
7359# modules to compile into the JDK. In the future, these modules
7360# might even be Jigsaw modules.
7361#
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7363$as_echo_n "checking which variant of the JDK to build... " >&6; }
7364
7365# Check whether --with-jdk-variant was given.
7366if test "${with_jdk_variant+set}" = set; then :
7367  withval=$with_jdk_variant;
7368fi
7369
7370
7371if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7372    JDK_VARIANT="normal"
7373else
7374    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7375fi
7376
7377
7378
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7380$as_echo "$JDK_VARIANT" >&6; }
7381
7382
7383
7384###############################################################################
7385#
7386# Check which variants of the JVM that we want to build.
7387# Currently we have:
7388#    server: normal interpreter and a tiered C1/C2 compiler
7389#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7390#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7391#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7392#    zero: no machine code interpreter, no compiler
7393#    zeroshark: zero interpreter and shark/llvm compiler backend
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7395$as_echo_n "checking which variants of the JVM to build... " >&6; }
7396
7397# Check whether --with-jvm-variants was given.
7398if test "${with_jvm_variants+set}" = set; then :
7399  withval=$with_jvm_variants;
7400fi
7401
7402
7403if test "x$with_jvm_variants" = x; then
7404     with_jvm_variants="server"
7405fi
7406
7407JVM_VARIANTS=",$with_jvm_variants,"
7408TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7409
7410if test "x$TEST_VARIANTS" != "x,"; then
7411   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7412fi
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7414$as_echo "$with_jvm_variants" >&6; }
7415
7416JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7417JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7418JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7419JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7420JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7421
7422if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7423    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7424        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7425    fi
7426fi
7427if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7428    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7429        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7430    fi
7431fi
7432
7433# Replace the commas with AND for use in the build directory name.
7434ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7435COUNT_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/'`
7436if test "x$COUNT_VARIANTS" != "x,1"; then
7437    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7438else
7439    BUILDING_MULTIPLE_JVM_VARIANTS=no
7440fi
7441
7442
7443
7444
7445
7446
7447
7448
7449if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7450   MACOSX_UNIVERSAL="true"
7451fi
7452
7453
7454
7455
7456
7457###############################################################################
7458#
7459# Set the debug level
7460#    release: no debug information, all optimizations, no asserts.
7461#    fastdebug: debug information (-g), all optimizations, all asserts
7462#    slowdebug: debug information (-g), no optimizations, all asserts
7463#
7464DEBUG_LEVEL="release"
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7466$as_echo_n "checking which debug level to use... " >&6; }
7467# Check whether --enable-debug was given.
7468if test "${enable_debug+set}" = set; then :
7469  enableval=$enable_debug;
7470        ENABLE_DEBUG="${enableval}"
7471        DEBUG_LEVEL="fastdebug"
7472
7473else
7474  ENABLE_DEBUG="no"
7475fi
7476
7477
7478
7479# Check whether --with-debug-level was given.
7480if test "${with_debug_level+set}" = set; then :
7481  withval=$with_debug_level;
7482        DEBUG_LEVEL="${withval}"
7483        if test "x$ENABLE_DEBUG" = xyes; then
7484			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7485        fi
7486
7487fi
7488
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7490$as_echo "$DEBUG_LEVEL" >&6; }
7491
7492if test "x$DEBUG_LEVEL" != xrelease && \
7493   test "x$DEBUG_LEVEL" != xfastdebug && \
7494   test "x$DEBUG_LEVEL" != xslowdebug; then
7495   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7496fi
7497
7498
7499###############################################################################
7500#
7501# Setup legacy vars/targets and new vars to deal with different debug levels.
7502#
7503
7504case $DEBUG_LEVEL in
7505      release )
7506          VARIANT="OPT"
7507          FASTDEBUG="false"
7508          DEBUG_CLASSFILES="false"
7509          BUILD_VARIANT_RELEASE=""
7510          HOTSPOT_DEBUG_LEVEL="product"
7511          HOTSPOT_EXPORT="product"
7512           ;;
7513      fastdebug )
7514          VARIANT="DBG"
7515          FASTDEBUG="true"
7516          DEBUG_CLASSFILES="true"
7517          BUILD_VARIANT_RELEASE="-fastdebug"
7518          HOTSPOT_DEBUG_LEVEL="fastdebug"
7519          HOTSPOT_EXPORT="fastdebug"
7520           ;;
7521      slowdebug )
7522          VARIANT="DBG"
7523          FASTDEBUG="false"
7524          DEBUG_CLASSFILES="true"
7525          BUILD_VARIANT_RELEASE="-debug"
7526          HOTSPOT_DEBUG_LEVEL="jvmg"
7527          HOTSPOT_EXPORT="debug"
7528           ;;
7529esac
7530
7531#####
7532# Generate the legacy makefile targets for hotspot.
7533# The hotspot api for selecting the build artifacts, really, needs to be improved.
7534#
7535HOTSPOT_TARGET=""
7536
7537if test "x$JVM_VARIANT_SERVER" = xtrue; then
7538    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7539fi
7540
7541if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7542    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7543fi
7544
7545if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7546    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7547fi
7548
7549if test "x$JVM_VARIANT_ZERO" = xtrue; then
7550    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7551fi
7552
7553if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7554    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7555fi
7556
7557HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7558
7559# On Macosx universal binaries are produced, but they only contain
7560# 64 bit intel. This invalidates control of which jvms are built
7561# from configure, but only server is valid anyway. Fix this
7562# when hotspot makefiles are rewritten.
7563if test "x$MACOSX_UNIVERSAL" = xtrue; then
7564    HOTSPOT_TARGET=universal_product
7565fi
7566
7567#####
7568
7569
7570
7571
7572
7573
7574
7575
7576# With basic setup done, call the custom early hook.
7577
7578
7579# To properly create a configuration name, we need to have the OpenJDK target
7580# and options (variants and debug level) parsed.
7581
7582
7583
7584# Check whether --with-conf-name was given.
7585if test "${with_conf_name+set}" = set; then :
7586  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7587fi
7588
7589
7590# Test from where we are running configure, in or outside of src root.
7591# To enable comparison of directories, CURDIR needs to be symlink free
7592# just like SRC_ROOT already is
7593NOSYM_CURDIR="$CURDIR"
7594
7595    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7596        # Follow a chain of symbolic links. Use readlink
7597        # where it exists, else fall back to horribly
7598        # complicated shell code.
7599        if test "x$READLINK_TESTED" != yes; then
7600            # On MacOSX there is a readlink tool with a different
7601            # purpose than the GNU readlink tool. Check the found readlink.
7602            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7603            if test "x$ISGNU" = x; then
7604                 # A readlink that we do not know how to use.
7605                 # Are there other non-GNU readlinks out there?
7606                 READLINK_TESTED=yes
7607                 READLINK=
7608            fi
7609        fi
7610
7611        if test "x$READLINK" != x; then
7612            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7613        else
7614            # Save the current directory for restoring afterwards
7615            STARTDIR=$PWD
7616            COUNTER=0
7617            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7618            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7619            # Use the system pwd and not the shell builtin to resolve directory symlinks
7620            cd $sym_link_dir
7621            cd `$THEPWDCMD`
7622            sym_link_dir=`$THEPWDCMD`
7623            # Resolve file symlinks
7624            while test $COUNTER -lt 20; do
7625                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7626                if test "x$ISLINK" == x; then
7627                    # This is not a symbolic link! We are done!
7628                    break
7629                fi
7630                # Again resolve directory symlinks since the target of the just found
7631                # link could be in a different directory
7632                cd `$DIRNAME $ISLINK`
7633                sym_link_dir=`$THEPWDCMD`
7634                sym_link_file=`$BASENAME $ISLINK`
7635                let COUNTER=COUNTER+1
7636            done
7637            cd $STARTDIR
7638            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7639        fi
7640    fi
7641
7642if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7643        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7644        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7645    # We are running configure from the src root.
7646    # Create a default ./build/target-variant-debuglevel output root.
7647    if test "x${CONF_NAME}" = x; then
7648        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7649    fi
7650    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7651    $MKDIR -p "$OUTPUT_ROOT"
7652    if test ! -d "$OUTPUT_ROOT"; then
7653        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7654    fi
7655else
7656    # We are running configure from outside of the src dir.
7657    # Then use the current directory as output dir!
7658    # If configuration is situated in normal build directory, just use the build
7659    # directory name as configuration name, otherwise use the complete path.
7660    if test "x${CONF_NAME}" = x; then
7661        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7662    fi
7663    OUTPUT_ROOT="$CURDIR"
7664
7665    # WARNING: This might be a bad thing to do. You need to be sure you want to
7666    # have a configuration in this directory. Do some sanity checks!
7667
7668    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7669      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7670      # other files
7671      files_present=`$LS $OUTPUT_ROOT`
7672      # Configure has already touched config.log and confdefs.h in the current dir when this check
7673      # is performed.
7674      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7675                                             | $TR -d '\n'`
7676      if test "x$filtered_files" != x; then
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7678$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7680$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7682$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7683        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7684$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7685        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7686$as_echo "$as_me: seriously mess up just about everything." >&6;}
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7688$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7690$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7691        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7692      fi
7693    fi
7694fi
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7696$as_echo_n "checking what configuration name to use... " >&6; }
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7698$as_echo "$CONF_NAME" >&6; }
7699
7700
7701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7702
7703  # Input might be given as Windows format, start by converting to
7704  # unix format.
7705  path="$OUTPUT_ROOT"
7706  new_path=`$CYGPATH -u "$path"`
7707
7708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7711  # "foo.exe" is OK but "foo" is an error.
7712  #
7713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7714  # It is also a way to make sure we got the proper file name for the real test later on.
7715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7716  if test "x$test_shortpath" = x; then
7717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7718$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7719    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7720  fi
7721
7722  # Call helper function which possibly converts this using DOS-style short mode.
7723  # If so, the updated path is stored in $new_path.
7724
7725  input_path="$new_path"
7726  # Check if we need to convert this using DOS-style short mode. If the path
7727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7728  # take no chances and rewrite it.
7729  # Note: m4 eats our [], so we need to use [ and ] instead.
7730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7731  if test "x$has_forbidden_chars" != x; then
7732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7736      # Going to short mode and back again did indeed matter. Since short mode is
7737      # case insensitive, let's make it lowercase to improve readability.
7738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7739      # Now convert it back to Unix-stile (cygpath)
7740      input_path=`$CYGPATH -u "$shortmode_path"`
7741      new_path="$input_path"
7742    fi
7743  fi
7744
7745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7746  if test "x$test_cygdrive_prefix" = x; then
7747    # As a simple fix, exclude /usr/bin since it's not a real path.
7748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7750      # a path prefixed by /cygdrive for fixpath to work.
7751      new_path="$CYGWIN_ROOT_PATH$input_path"
7752    fi
7753  fi
7754
7755
7756  if test "x$path" != "x$new_path"; then
7757    OUTPUT_ROOT="$new_path"
7758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7759$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7760  fi
7761
7762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7763
7764  path="$OUTPUT_ROOT"
7765  has_colon=`$ECHO $path | $GREP ^.:`
7766  new_path="$path"
7767  if test "x$has_colon" = x; then
7768    # Not in mixed or Windows style, start by that.
7769    new_path=`cmd //c echo $path`
7770  fi
7771
7772
7773  input_path="$new_path"
7774  # Check if we need to convert this using DOS-style short mode. If the path
7775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7776  # take no chances and rewrite it.
7777  # Note: m4 eats our [], so we need to use [ and ] instead.
7778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7779  if test "x$has_forbidden_chars" != x; then
7780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7782  fi
7783
7784
7785  windows_path="$new_path"
7786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7787    unix_path=`$CYGPATH -u "$windows_path"`
7788    new_path="$unix_path"
7789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7791    new_path="$unix_path"
7792  fi
7793
7794  if test "x$path" != "x$new_path"; then
7795    OUTPUT_ROOT="$new_path"
7796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7797$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7798  fi
7799
7800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7802
7803  else
7804    # We're on a posix platform. Hooray! :)
7805    path="$OUTPUT_ROOT"
7806
7807    if test ! -f "$path" && test ! -d "$path"; then
7808      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7809    fi
7810
7811    has_space=`$ECHO "$path" | $GREP " "`
7812    if test "x$has_space" != x; then
7813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7814$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7815      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7816    fi
7817  fi
7818
7819
7820SPEC=$OUTPUT_ROOT/spec.gmk
7821
7822CONF_NAME=$CONF_NAME
7823
7824OUTPUT_ROOT=$OUTPUT_ROOT
7825
7826
7827# Most of the probed defines are put into config.h
7828ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7829
7830# The spec.gmk file contains all variables for the make system.
7831ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7832
7833# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7834ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7835
7836# The bootcycle-spec.gmk file contains support for boot cycle builds.
7837ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7838
7839# The compare.sh is used to compare the build output to other builds.
7840ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7841
7842# Spec.sh is currently used by compare-objects.sh
7843ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7844
7845# The generated Makefile knows where the spec.gmk is and where the source is.
7846# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7847# which will look for generated configurations
7848ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7849
7850
7851# Save the arguments given to us
7852echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7853
7854
7855# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7856
7857    for ac_prog in apt-get yum port pkgutil pkgadd
7858do
7859  # Extract the first word of "$ac_prog", so it can be a program name with args.
7860set dummy $ac_prog; ac_word=$2
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862$as_echo_n "checking for $ac_word... " >&6; }
7863if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7864  $as_echo_n "(cached) " >&6
7865else
7866  if test -n "$PKGHANDLER"; then
7867  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7868else
7869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7870for as_dir in $PATH
7871do
7872  IFS=$as_save_IFS
7873  test -z "$as_dir" && as_dir=.
7874    for ac_exec_ext in '' $ac_executable_extensions; do
7875  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7876    ac_cv_prog_PKGHANDLER="$ac_prog"
7877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7878    break 2
7879  fi
7880done
7881  done
7882IFS=$as_save_IFS
7883
7884fi
7885fi
7886PKGHANDLER=$ac_cv_prog_PKGHANDLER
7887if test -n "$PKGHANDLER"; then
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7889$as_echo "$PKGHANDLER" >&6; }
7890else
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7892$as_echo "no" >&6; }
7893fi
7894
7895
7896  test -n "$PKGHANDLER" && break
7897done
7898
7899
7900
7901# Setup tools that requires more complex handling, or that is not needed by the configure script.
7902
7903
7904  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7905  if test "x$MAKE" != x; then
7906    # User has supplied a make, test it.
7907    if test ! -f "$MAKE"; then
7908      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7909    fi
7910
7911  MAKE_CANDIDATE=""$MAKE""
7912  DESCRIPTION="user supplied MAKE=$MAKE"
7913  if test "x$MAKE_CANDIDATE" != x; then
7914    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7915$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7916    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7917    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7918    if test "x$IS_GNU_MAKE" = x; then
7919      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7920$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7921    else
7922      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7923      if test "x$IS_MODERN_MAKE" = x; then
7924        { $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
7925$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;}
7926      else
7927        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7928          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7929            MAKE_EXPECTED_ENV='cygwin'
7930          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7931            MAKE_EXPECTED_ENV='msys'
7932          else
7933            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7934          fi
7935          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7936          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7937        else
7938          # Not relevant for non-Windows
7939          IS_MAKE_CORRECT_ENV=true
7940        fi
7941        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7942          { $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
7943$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;}
7944        else
7945          FOUND_MAKE=$MAKE_CANDIDATE
7946
7947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; 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=`$CYGPATH -u "$path"`
7959
7960  # Now try to locate executable using which
7961  new_path=`$WHICH "$new_path" 2> /dev/null`
7962  # bat and cmd files are not always considered executable in cygwin causing which
7963  # to not find them
7964  if test "x$new_path" = x \
7965           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7966           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7967    new_path=`$CYGPATH -u "$path"`
7968  fi
7969  if test "x$new_path" = x; then
7970    # Oops. Which didn't find the executable.
7971    # The splitting of arguments from the executable at a space might have been incorrect,
7972    # since paths with space are more likely in Windows. Give it another try with the whole
7973    # argument.
7974    path="$complete"
7975    arguments="EOL"
7976    new_path=`$CYGPATH -u "$path"`
7977    new_path=`$WHICH "$new_path" 2> /dev/null`
7978    # bat and cmd files are not always considered executable in cygwin causing which
7979    # to not find them
7980    if test "x$new_path" = x \
7981             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7982             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7983      new_path=`$CYGPATH -u "$path"`
7984    fi
7985    if test "x$new_path" = x; then
7986      # It's still not found. Now this is an unrecoverable error.
7987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7988$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7989      has_space=`$ECHO "$complete" | $GREP " "`
7990      if test "x$has_space" != x; then
7991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7993      fi
7994      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7995    fi
7996  fi
7997
7998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8001  # "foo.exe" is OK but "foo" is an error.
8002  #
8003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8004  # It is also a way to make sure we got the proper file name for the real test later on.
8005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8006  if test "x$test_shortpath" = x; then
8007    # Short path failed, file does not exist as specified.
8008    # Try adding .exe or .cmd
8009    if test -f "${new_path}.exe"; then
8010       input_to_shortpath="${new_path}.exe"
8011    elif test -f "${new_path}.cmd"; then
8012       input_to_shortpath="${new_path}.cmd"
8013    else
8014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8015$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8019    fi
8020  else
8021    input_to_shortpath="$new_path"
8022  fi
8023
8024  # Call helper function which possibly converts this using DOS-style short mode.
8025  # If so, the updated path is stored in $new_path.
8026  new_path="$input_to_shortpath"
8027
8028  input_path="$input_to_shortpath"
8029  # Check if we need to convert this using DOS-style short mode. If the path
8030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8031  # take no chances and rewrite it.
8032  # Note: m4 eats our [], so we need to use [ and ] instead.
8033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8034  if test "x$has_forbidden_chars" != x; then
8035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8039      # Going to short mode and back again did indeed matter. Since short mode is
8040      # case insensitive, let's make it lowercase to improve readability.
8041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8042      # Now convert it back to Unix-stile (cygpath)
8043      input_path=`$CYGPATH -u "$shortmode_path"`
8044      new_path="$input_path"
8045    fi
8046  fi
8047
8048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8049  if test "x$test_cygdrive_prefix" = x; then
8050    # As a simple fix, exclude /usr/bin since it's not a real path.
8051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8053      # a path prefixed by /cygdrive for fixpath to work.
8054      new_path="$CYGWIN_ROOT_PATH$input_path"
8055    fi
8056  fi
8057
8058  # remove trailing .exe if any
8059  new_path="${new_path/%.exe/}"
8060
8061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8062
8063  # First separate the path from the arguments. This will split at the first
8064  # space.
8065  complete="$FOUND_MAKE"
8066  path="${complete%% *}"
8067  tmp="$complete EOL"
8068  arguments="${tmp#* }"
8069
8070  # Input might be given as Windows format, start by converting to
8071  # unix format.
8072  new_path="$path"
8073
8074  windows_path="$new_path"
8075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8076    unix_path=`$CYGPATH -u "$windows_path"`
8077    new_path="$unix_path"
8078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8080    new_path="$unix_path"
8081  fi
8082
8083
8084  # Now try to locate executable using which
8085  new_path=`$WHICH "$new_path" 2> /dev/null`
8086
8087  if test "x$new_path" = x; then
8088    # Oops. Which didn't find the executable.
8089    # The splitting of arguments from the executable at a space might have been incorrect,
8090    # since paths with space are more likely in Windows. Give it another try with the whole
8091    # argument.
8092    path="$complete"
8093    arguments="EOL"
8094    new_path="$path"
8095
8096  windows_path="$new_path"
8097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8098    unix_path=`$CYGPATH -u "$windows_path"`
8099    new_path="$unix_path"
8100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8102    new_path="$unix_path"
8103  fi
8104
8105
8106    new_path=`$WHICH "$new_path" 2> /dev/null`
8107
8108    if test "x$new_path" = x; then
8109      # It's still not found. Now this is an unrecoverable error.
8110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8111$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8112      has_space=`$ECHO "$complete" | $GREP " "`
8113      if test "x$has_space" != x; then
8114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8116      fi
8117      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8118    fi
8119  fi
8120
8121  # Now new_path has a complete unix path to the binary
8122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8123    # Keep paths in /bin as-is, but remove trailing .exe if any
8124    new_path="${new_path/%.exe/}"
8125    # Do not save /bin paths to all_fixpath_prefixes!
8126  else
8127    # Not in mixed or Windows style, start by that.
8128    new_path=`cmd //c echo $new_path`
8129
8130  input_path="$new_path"
8131  # Check if we need to convert this using DOS-style short mode. If the path
8132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8133  # take no chances and rewrite it.
8134  # Note: m4 eats our [], so we need to use [ and ] instead.
8135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8136  if test "x$has_forbidden_chars" != x; then
8137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8139  fi
8140
8141    # Output is in $new_path
8142
8143  windows_path="$new_path"
8144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8145    unix_path=`$CYGPATH -u "$windows_path"`
8146    new_path="$unix_path"
8147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8149    new_path="$unix_path"
8150  fi
8151
8152    # remove trailing .exe if any
8153    new_path="${new_path/%.exe/}"
8154
8155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8157  fi
8158
8159  else
8160    # We're on a posix platform. Hooray! :)
8161    # First separate the path from the arguments. This will split at the first
8162    # space.
8163    complete="$FOUND_MAKE"
8164    path="${complete%% *}"
8165    tmp="$complete EOL"
8166    arguments="${tmp#* }"
8167
8168    # Cannot rely on the command "which" here since it doesn't always work.
8169    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8170    if test -z "$is_absolute_path"; then
8171      # Path to executable is not absolute. Find it.
8172      IFS_save="$IFS"
8173      IFS=:
8174      for p in $PATH; do
8175        if test -f "$p/$path" && test -x "$p/$path"; then
8176          new_path="$p/$path"
8177          break
8178        fi
8179      done
8180      IFS="$IFS_save"
8181    else
8182      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8183$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8184      new_path="$path"
8185    fi
8186
8187    if test "x$new_path" = x; then
8188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8189$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8190        has_space=`$ECHO "$complete" | $GREP " "`
8191        if test "x$has_space" != x; then
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8194        fi
8195        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8196      fi
8197  fi
8198
8199      # Now join together the path and the arguments once again
8200      if test "x$arguments" != xEOL; then
8201        new_complete="$new_path ${arguments% *}"
8202      else
8203        new_complete="$new_path"
8204      fi
8205
8206  if test "x$complete" != "x$new_complete"; then
8207      FOUND_MAKE="$new_complete"
8208      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8209$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8210    fi
8211
8212        fi
8213      fi
8214    fi
8215  fi
8216
8217    if test "x$FOUND_MAKE" = x; then
8218      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8219    fi
8220  else
8221    # Try our hardest to locate a correct version of GNU make
8222    for ac_prog in gmake
8223do
8224  # Extract the first word of "$ac_prog", so it can be a program name with args.
8225set dummy $ac_prog; ac_word=$2
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227$as_echo_n "checking for $ac_word... " >&6; }
8228if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8229  $as_echo_n "(cached) " >&6
8230else
8231  case $CHECK_GMAKE in
8232  [\\/]* | ?:[\\/]*)
8233  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8234  ;;
8235  *)
8236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237for as_dir in $PATH
8238do
8239  IFS=$as_save_IFS
8240  test -z "$as_dir" && as_dir=.
8241    for ac_exec_ext in '' $ac_executable_extensions; do
8242  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8243    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245    break 2
8246  fi
8247done
8248  done
8249IFS=$as_save_IFS
8250
8251  ;;
8252esac
8253fi
8254CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8255if test -n "$CHECK_GMAKE"; then
8256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8257$as_echo "$CHECK_GMAKE" >&6; }
8258else
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
8261fi
8262
8263
8264  test -n "$CHECK_GMAKE" && break
8265done
8266
8267
8268  MAKE_CANDIDATE=""$CHECK_GMAKE""
8269  DESCRIPTION="gmake in PATH"
8270  if test "x$MAKE_CANDIDATE" != x; then
8271    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8272$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8273    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8274    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8275    if test "x$IS_GNU_MAKE" = x; then
8276      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8277$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8278    else
8279      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8280      if test "x$IS_MODERN_MAKE" = x; then
8281        { $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
8282$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;}
8283      else
8284        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8285          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8286            MAKE_EXPECTED_ENV='cygwin'
8287          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8288            MAKE_EXPECTED_ENV='msys'
8289          else
8290            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8291          fi
8292          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8293          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8294        else
8295          # Not relevant for non-Windows
8296          IS_MAKE_CORRECT_ENV=true
8297        fi
8298        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8299          { $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
8300$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;}
8301        else
8302          FOUND_MAKE=$MAKE_CANDIDATE
8303
8304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8305
8306  # First separate the path from the arguments. This will split at the first
8307  # space.
8308  complete="$FOUND_MAKE"
8309  path="${complete%% *}"
8310  tmp="$complete EOL"
8311  arguments="${tmp#* }"
8312
8313  # Input might be given as Windows format, start by converting to
8314  # unix format.
8315  new_path=`$CYGPATH -u "$path"`
8316
8317  # Now try to locate executable using which
8318  new_path=`$WHICH "$new_path" 2> /dev/null`
8319  # bat and cmd files are not always considered executable in cygwin causing which
8320  # to not find them
8321  if test "x$new_path" = x \
8322           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8323           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8324    new_path=`$CYGPATH -u "$path"`
8325  fi
8326  if test "x$new_path" = x; then
8327    # Oops. Which didn't find the executable.
8328    # The splitting of arguments from the executable at a space might have been incorrect,
8329    # since paths with space are more likely in Windows. Give it another try with the whole
8330    # argument.
8331    path="$complete"
8332    arguments="EOL"
8333    new_path=`$CYGPATH -u "$path"`
8334    new_path=`$WHICH "$new_path" 2> /dev/null`
8335    # bat and cmd files are not always considered executable in cygwin causing which
8336    # to not find them
8337    if test "x$new_path" = x \
8338             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8339             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8340      new_path=`$CYGPATH -u "$path"`
8341    fi
8342    if test "x$new_path" = x; then
8343      # It's still not found. Now this is an unrecoverable error.
8344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8345$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8346      has_space=`$ECHO "$complete" | $GREP " "`
8347      if test "x$has_space" != x; then
8348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8350      fi
8351      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8352    fi
8353  fi
8354
8355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8358  # "foo.exe" is OK but "foo" is an error.
8359  #
8360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8361  # It is also a way to make sure we got the proper file name for the real test later on.
8362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8363  if test "x$test_shortpath" = x; then
8364    # Short path failed, file does not exist as specified.
8365    # Try adding .exe or .cmd
8366    if test -f "${new_path}.exe"; then
8367       input_to_shortpath="${new_path}.exe"
8368    elif test -f "${new_path}.cmd"; then
8369       input_to_shortpath="${new_path}.cmd"
8370    else
8371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8372$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8373      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8374$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8376    fi
8377  else
8378    input_to_shortpath="$new_path"
8379  fi
8380
8381  # Call helper function which possibly converts this using DOS-style short mode.
8382  # If so, the updated path is stored in $new_path.
8383  new_path="$input_to_shortpath"
8384
8385  input_path="$input_to_shortpath"
8386  # Check if we need to convert this using DOS-style short mode. If the path
8387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8388  # take no chances and rewrite it.
8389  # Note: m4 eats our [], so we need to use [ and ] instead.
8390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8391  if test "x$has_forbidden_chars" != x; then
8392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8396      # Going to short mode and back again did indeed matter. Since short mode is
8397      # case insensitive, let's make it lowercase to improve readability.
8398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8399      # Now convert it back to Unix-stile (cygpath)
8400      input_path=`$CYGPATH -u "$shortmode_path"`
8401      new_path="$input_path"
8402    fi
8403  fi
8404
8405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8406  if test "x$test_cygdrive_prefix" = x; then
8407    # As a simple fix, exclude /usr/bin since it's not a real path.
8408    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8410      # a path prefixed by /cygdrive for fixpath to work.
8411      new_path="$CYGWIN_ROOT_PATH$input_path"
8412    fi
8413  fi
8414
8415  # remove trailing .exe if any
8416  new_path="${new_path/%.exe/}"
8417
8418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8419
8420  # First separate the path from the arguments. This will split at the first
8421  # space.
8422  complete="$FOUND_MAKE"
8423  path="${complete%% *}"
8424  tmp="$complete EOL"
8425  arguments="${tmp#* }"
8426
8427  # Input might be given as Windows format, start by converting to
8428  # unix format.
8429  new_path="$path"
8430
8431  windows_path="$new_path"
8432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8433    unix_path=`$CYGPATH -u "$windows_path"`
8434    new_path="$unix_path"
8435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8437    new_path="$unix_path"
8438  fi
8439
8440
8441  # Now try to locate executable using which
8442  new_path=`$WHICH "$new_path" 2> /dev/null`
8443
8444  if test "x$new_path" = x; then
8445    # Oops. Which didn't find the executable.
8446    # The splitting of arguments from the executable at a space might have been incorrect,
8447    # since paths with space are more likely in Windows. Give it another try with the whole
8448    # argument.
8449    path="$complete"
8450    arguments="EOL"
8451    new_path="$path"
8452
8453  windows_path="$new_path"
8454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8455    unix_path=`$CYGPATH -u "$windows_path"`
8456    new_path="$unix_path"
8457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8459    new_path="$unix_path"
8460  fi
8461
8462
8463    new_path=`$WHICH "$new_path" 2> /dev/null`
8464
8465    if test "x$new_path" = x; then
8466      # It's still not found. Now this is an unrecoverable error.
8467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8468$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8469      has_space=`$ECHO "$complete" | $GREP " "`
8470      if test "x$has_space" != x; then
8471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8473      fi
8474      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8475    fi
8476  fi
8477
8478  # Now new_path has a complete unix path to the binary
8479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8480    # Keep paths in /bin as-is, but remove trailing .exe if any
8481    new_path="${new_path/%.exe/}"
8482    # Do not save /bin paths to all_fixpath_prefixes!
8483  else
8484    # Not in mixed or Windows style, start by that.
8485    new_path=`cmd //c echo $new_path`
8486
8487  input_path="$new_path"
8488  # Check if we need to convert this using DOS-style short mode. If the path
8489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8490  # take no chances and rewrite it.
8491  # Note: m4 eats our [], so we need to use [ and ] instead.
8492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8493  if test "x$has_forbidden_chars" != x; then
8494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8496  fi
8497
8498    # Output is in $new_path
8499
8500  windows_path="$new_path"
8501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8502    unix_path=`$CYGPATH -u "$windows_path"`
8503    new_path="$unix_path"
8504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8506    new_path="$unix_path"
8507  fi
8508
8509    # remove trailing .exe if any
8510    new_path="${new_path/%.exe/}"
8511
8512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8514  fi
8515
8516  else
8517    # We're on a posix platform. Hooray! :)
8518    # First separate the path from the arguments. This will split at the first
8519    # space.
8520    complete="$FOUND_MAKE"
8521    path="${complete%% *}"
8522    tmp="$complete EOL"
8523    arguments="${tmp#* }"
8524
8525    # Cannot rely on the command "which" here since it doesn't always work.
8526    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8527    if test -z "$is_absolute_path"; then
8528      # Path to executable is not absolute. Find it.
8529      IFS_save="$IFS"
8530      IFS=:
8531      for p in $PATH; do
8532        if test -f "$p/$path" && test -x "$p/$path"; then
8533          new_path="$p/$path"
8534          break
8535        fi
8536      done
8537      IFS="$IFS_save"
8538    else
8539      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8540$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8541      new_path="$path"
8542    fi
8543
8544    if test "x$new_path" = x; then
8545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8547        has_space=`$ECHO "$complete" | $GREP " "`
8548        if test "x$has_space" != x; then
8549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8551        fi
8552        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8553      fi
8554  fi
8555
8556      # Now join together the path and the arguments once again
8557      if test "x$arguments" != xEOL; then
8558        new_complete="$new_path ${arguments% *}"
8559      else
8560        new_complete="$new_path"
8561      fi
8562
8563  if test "x$complete" != "x$new_complete"; then
8564      FOUND_MAKE="$new_complete"
8565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8566$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8567    fi
8568
8569        fi
8570      fi
8571    fi
8572  fi
8573
8574
8575    if test "x$FOUND_MAKE" = x; then
8576      for ac_prog in make
8577do
8578  # Extract the first word of "$ac_prog", so it can be a program name with args.
8579set dummy $ac_prog; ac_word=$2
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581$as_echo_n "checking for $ac_word... " >&6; }
8582if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8583  $as_echo_n "(cached) " >&6
8584else
8585  case $CHECK_MAKE in
8586  [\\/]* | ?:[\\/]*)
8587  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8588  ;;
8589  *)
8590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593  IFS=$as_save_IFS
8594  test -z "$as_dir" && as_dir=.
8595    for ac_exec_ext in '' $ac_executable_extensions; do
8596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8597    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8599    break 2
8600  fi
8601done
8602  done
8603IFS=$as_save_IFS
8604
8605  ;;
8606esac
8607fi
8608CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8609if test -n "$CHECK_MAKE"; then
8610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8611$as_echo "$CHECK_MAKE" >&6; }
8612else
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614$as_echo "no" >&6; }
8615fi
8616
8617
8618  test -n "$CHECK_MAKE" && break
8619done
8620
8621
8622  MAKE_CANDIDATE=""$CHECK_MAKE""
8623  DESCRIPTION="make in PATH"
8624  if test "x$MAKE_CANDIDATE" != x; then
8625    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8626$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8627    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8628    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8629    if test "x$IS_GNU_MAKE" = x; then
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8631$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8632    else
8633      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8634      if test "x$IS_MODERN_MAKE" = x; then
8635        { $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
8636$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;}
8637      else
8638        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8639          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8640            MAKE_EXPECTED_ENV='cygwin'
8641          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8642            MAKE_EXPECTED_ENV='msys'
8643          else
8644            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8645          fi
8646          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8647          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8648        else
8649          # Not relevant for non-Windows
8650          IS_MAKE_CORRECT_ENV=true
8651        fi
8652        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8653          { $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
8654$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;}
8655        else
8656          FOUND_MAKE=$MAKE_CANDIDATE
8657
8658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8659
8660  # First separate the path from the arguments. This will split at the first
8661  # space.
8662  complete="$FOUND_MAKE"
8663  path="${complete%% *}"
8664  tmp="$complete EOL"
8665  arguments="${tmp#* }"
8666
8667  # Input might be given as Windows format, start by converting to
8668  # unix format.
8669  new_path=`$CYGPATH -u "$path"`
8670
8671  # Now try to locate executable using which
8672  new_path=`$WHICH "$new_path" 2> /dev/null`
8673  # bat and cmd files are not always considered executable in cygwin causing which
8674  # to not find them
8675  if test "x$new_path" = x \
8676           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8677           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8678    new_path=`$CYGPATH -u "$path"`
8679  fi
8680  if test "x$new_path" = x; then
8681    # Oops. Which didn't find the executable.
8682    # The splitting of arguments from the executable at a space might have been incorrect,
8683    # since paths with space are more likely in Windows. Give it another try with the whole
8684    # argument.
8685    path="$complete"
8686    arguments="EOL"
8687    new_path=`$CYGPATH -u "$path"`
8688    new_path=`$WHICH "$new_path" 2> /dev/null`
8689    # bat and cmd files are not always considered executable in cygwin causing which
8690    # to not find them
8691    if test "x$new_path" = x \
8692             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8693             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8694      new_path=`$CYGPATH -u "$path"`
8695    fi
8696    if test "x$new_path" = x; then
8697      # It's still not found. Now this is an unrecoverable error.
8698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8700      has_space=`$ECHO "$complete" | $GREP " "`
8701      if test "x$has_space" != x; then
8702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8704      fi
8705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8706    fi
8707  fi
8708
8709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8712  # "foo.exe" is OK but "foo" is an error.
8713  #
8714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8715  # It is also a way to make sure we got the proper file name for the real test later on.
8716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8717  if test "x$test_shortpath" = x; then
8718    # Short path failed, file does not exist as specified.
8719    # Try adding .exe or .cmd
8720    if test -f "${new_path}.exe"; then
8721       input_to_shortpath="${new_path}.exe"
8722    elif test -f "${new_path}.cmd"; then
8723       input_to_shortpath="${new_path}.cmd"
8724    else
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8727      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8728$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8729      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8730    fi
8731  else
8732    input_to_shortpath="$new_path"
8733  fi
8734
8735  # Call helper function which possibly converts this using DOS-style short mode.
8736  # If so, the updated path is stored in $new_path.
8737  new_path="$input_to_shortpath"
8738
8739  input_path="$input_to_shortpath"
8740  # Check if we need to convert this using DOS-style short mode. If the path
8741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8742  # take no chances and rewrite it.
8743  # Note: m4 eats our [], so we need to use [ and ] instead.
8744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8745  if test "x$has_forbidden_chars" != x; then
8746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8750      # Going to short mode and back again did indeed matter. Since short mode is
8751      # case insensitive, let's make it lowercase to improve readability.
8752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8753      # Now convert it back to Unix-stile (cygpath)
8754      input_path=`$CYGPATH -u "$shortmode_path"`
8755      new_path="$input_path"
8756    fi
8757  fi
8758
8759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8760  if test "x$test_cygdrive_prefix" = x; then
8761    # As a simple fix, exclude /usr/bin since it's not a real path.
8762    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8764      # a path prefixed by /cygdrive for fixpath to work.
8765      new_path="$CYGWIN_ROOT_PATH$input_path"
8766    fi
8767  fi
8768
8769  # remove trailing .exe if any
8770  new_path="${new_path/%.exe/}"
8771
8772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8773
8774  # First separate the path from the arguments. This will split at the first
8775  # space.
8776  complete="$FOUND_MAKE"
8777  path="${complete%% *}"
8778  tmp="$complete EOL"
8779  arguments="${tmp#* }"
8780
8781  # Input might be given as Windows format, start by converting to
8782  # unix format.
8783  new_path="$path"
8784
8785  windows_path="$new_path"
8786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8787    unix_path=`$CYGPATH -u "$windows_path"`
8788    new_path="$unix_path"
8789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8791    new_path="$unix_path"
8792  fi
8793
8794
8795  # Now try to locate executable using which
8796  new_path=`$WHICH "$new_path" 2> /dev/null`
8797
8798  if test "x$new_path" = x; then
8799    # Oops. Which didn't find the executable.
8800    # The splitting of arguments from the executable at a space might have been incorrect,
8801    # since paths with space are more likely in Windows. Give it another try with the whole
8802    # argument.
8803    path="$complete"
8804    arguments="EOL"
8805    new_path="$path"
8806
8807  windows_path="$new_path"
8808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8809    unix_path=`$CYGPATH -u "$windows_path"`
8810    new_path="$unix_path"
8811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8813    new_path="$unix_path"
8814  fi
8815
8816
8817    new_path=`$WHICH "$new_path" 2> /dev/null`
8818
8819    if test "x$new_path" = x; then
8820      # It's still not found. Now this is an unrecoverable error.
8821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8823      has_space=`$ECHO "$complete" | $GREP " "`
8824      if test "x$has_space" != x; then
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8827      fi
8828      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8829    fi
8830  fi
8831
8832  # Now new_path has a complete unix path to the binary
8833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8834    # Keep paths in /bin as-is, but remove trailing .exe if any
8835    new_path="${new_path/%.exe/}"
8836    # Do not save /bin paths to all_fixpath_prefixes!
8837  else
8838    # Not in mixed or Windows style, start by that.
8839    new_path=`cmd //c echo $new_path`
8840
8841  input_path="$new_path"
8842  # Check if we need to convert this using DOS-style short mode. If the path
8843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8844  # take no chances and rewrite it.
8845  # Note: m4 eats our [], so we need to use [ and ] instead.
8846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8847  if test "x$has_forbidden_chars" != x; then
8848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8850  fi
8851
8852    # Output is in $new_path
8853
8854  windows_path="$new_path"
8855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8856    unix_path=`$CYGPATH -u "$windows_path"`
8857    new_path="$unix_path"
8858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8860    new_path="$unix_path"
8861  fi
8862
8863    # remove trailing .exe if any
8864    new_path="${new_path/%.exe/}"
8865
8866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8868  fi
8869
8870  else
8871    # We're on a posix platform. Hooray! :)
8872    # First separate the path from the arguments. This will split at the first
8873    # space.
8874    complete="$FOUND_MAKE"
8875    path="${complete%% *}"
8876    tmp="$complete EOL"
8877    arguments="${tmp#* }"
8878
8879    # Cannot rely on the command "which" here since it doesn't always work.
8880    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8881    if test -z "$is_absolute_path"; then
8882      # Path to executable is not absolute. Find it.
8883      IFS_save="$IFS"
8884      IFS=:
8885      for p in $PATH; do
8886        if test -f "$p/$path" && test -x "$p/$path"; then
8887          new_path="$p/$path"
8888          break
8889        fi
8890      done
8891      IFS="$IFS_save"
8892    else
8893      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8894$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8895      new_path="$path"
8896    fi
8897
8898    if test "x$new_path" = x; then
8899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8900$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8901        has_space=`$ECHO "$complete" | $GREP " "`
8902        if test "x$has_space" != x; then
8903          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8905        fi
8906        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8907      fi
8908  fi
8909
8910      # Now join together the path and the arguments once again
8911      if test "x$arguments" != xEOL; then
8912        new_complete="$new_path ${arguments% *}"
8913      else
8914        new_complete="$new_path"
8915      fi
8916
8917  if test "x$complete" != "x$new_complete"; then
8918      FOUND_MAKE="$new_complete"
8919      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8920$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8921    fi
8922
8923        fi
8924      fi
8925    fi
8926  fi
8927
8928    fi
8929
8930    if test "x$FOUND_MAKE" = x; then
8931      if test "x$TOOLS_DIR" != x; then
8932        # We have a tools-dir, check that as well before giving up.
8933        OLD_PATH=$PATH
8934        PATH=$TOOLS_DIR:$PATH
8935        for ac_prog in gmake
8936do
8937  # Extract the first word of "$ac_prog", so it can be a program name with args.
8938set dummy $ac_prog; ac_word=$2
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8940$as_echo_n "checking for $ac_word... " >&6; }
8941if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8942  $as_echo_n "(cached) " >&6
8943else
8944  case $CHECK_TOOLSDIR_GMAKE in
8945  [\\/]* | ?:[\\/]*)
8946  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8947  ;;
8948  *)
8949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8950for as_dir in $PATH
8951do
8952  IFS=$as_save_IFS
8953  test -z "$as_dir" && as_dir=.
8954    for ac_exec_ext in '' $ac_executable_extensions; do
8955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8956    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8958    break 2
8959  fi
8960done
8961  done
8962IFS=$as_save_IFS
8963
8964  ;;
8965esac
8966fi
8967CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8968if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8970$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8971else
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
8974fi
8975
8976
8977  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8978done
8979
8980
8981  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8982  DESCRIPTION="gmake in tools-dir"
8983  if test "x$MAKE_CANDIDATE" != x; then
8984    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8985$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8986    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8987    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8988    if test "x$IS_GNU_MAKE" = x; then
8989      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8990$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8991    else
8992      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8993      if test "x$IS_MODERN_MAKE" = x; then
8994        { $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
8995$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;}
8996      else
8997        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8998          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8999            MAKE_EXPECTED_ENV='cygwin'
9000          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9001            MAKE_EXPECTED_ENV='msys'
9002          else
9003            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9004          fi
9005          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9006          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9007        else
9008          # Not relevant for non-Windows
9009          IS_MAKE_CORRECT_ENV=true
9010        fi
9011        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9012          { $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
9013$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;}
9014        else
9015          FOUND_MAKE=$MAKE_CANDIDATE
9016
9017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9018
9019  # First separate the path from the arguments. This will split at the first
9020  # space.
9021  complete="$FOUND_MAKE"
9022  path="${complete%% *}"
9023  tmp="$complete EOL"
9024  arguments="${tmp#* }"
9025
9026  # Input might be given as Windows format, start by converting to
9027  # unix format.
9028  new_path=`$CYGPATH -u "$path"`
9029
9030  # Now try to locate executable using which
9031  new_path=`$WHICH "$new_path" 2> /dev/null`
9032  # bat and cmd files are not always considered executable in cygwin causing which
9033  # to not find them
9034  if test "x$new_path" = x \
9035           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9036           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9037    new_path=`$CYGPATH -u "$path"`
9038  fi
9039  if test "x$new_path" = x; then
9040    # Oops. Which didn't find the executable.
9041    # The splitting of arguments from the executable at a space might have been incorrect,
9042    # since paths with space are more likely in Windows. Give it another try with the whole
9043    # argument.
9044    path="$complete"
9045    arguments="EOL"
9046    new_path=`$CYGPATH -u "$path"`
9047    new_path=`$WHICH "$new_path" 2> /dev/null`
9048    # bat and cmd files are not always considered executable in cygwin causing which
9049    # to not find them
9050    if test "x$new_path" = x \
9051             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9052             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9053      new_path=`$CYGPATH -u "$path"`
9054    fi
9055    if test "x$new_path" = x; then
9056      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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
9068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9071  # "foo.exe" is OK but "foo" is an error.
9072  #
9073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9074  # It is also a way to make sure we got the proper file name for the real test later on.
9075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9076  if test "x$test_shortpath" = x; then
9077    # Short path failed, file does not exist as specified.
9078    # Try adding .exe or .cmd
9079    if test -f "${new_path}.exe"; then
9080       input_to_shortpath="${new_path}.exe"
9081    elif test -f "${new_path}.cmd"; then
9082       input_to_shortpath="${new_path}.cmd"
9083    else
9084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9089    fi
9090  else
9091    input_to_shortpath="$new_path"
9092  fi
9093
9094  # Call helper function which possibly converts this using DOS-style short mode.
9095  # If so, the updated path is stored in $new_path.
9096  new_path="$input_to_shortpath"
9097
9098  input_path="$input_to_shortpath"
9099  # Check if we need to convert this using DOS-style short mode. If the path
9100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9101  # take no chances and rewrite it.
9102  # Note: m4 eats our [], so we need to use [ and ] instead.
9103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9104  if test "x$has_forbidden_chars" != x; then
9105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9109      # Going to short mode and back again did indeed matter. Since short mode is
9110      # case insensitive, let's make it lowercase to improve readability.
9111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9112      # Now convert it back to Unix-stile (cygpath)
9113      input_path=`$CYGPATH -u "$shortmode_path"`
9114      new_path="$input_path"
9115    fi
9116  fi
9117
9118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9119  if test "x$test_cygdrive_prefix" = x; then
9120    # As a simple fix, exclude /usr/bin since it's not a real path.
9121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9123      # a path prefixed by /cygdrive for fixpath to work.
9124      new_path="$CYGWIN_ROOT_PATH$input_path"
9125    fi
9126  fi
9127
9128  # remove trailing .exe if any
9129  new_path="${new_path/%.exe/}"
9130
9131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9132
9133  # First separate the path from the arguments. This will split at the first
9134  # space.
9135  complete="$FOUND_MAKE"
9136  path="${complete%% *}"
9137  tmp="$complete EOL"
9138  arguments="${tmp#* }"
9139
9140  # Input might be given as Windows format, start by converting to
9141  # unix format.
9142  new_path="$path"
9143
9144  windows_path="$new_path"
9145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9146    unix_path=`$CYGPATH -u "$windows_path"`
9147    new_path="$unix_path"
9148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9150    new_path="$unix_path"
9151  fi
9152
9153
9154  # Now try to locate executable using which
9155  new_path=`$WHICH "$new_path" 2> /dev/null`
9156
9157  if test "x$new_path" = x; then
9158    # Oops. Which didn't find the executable.
9159    # The splitting of arguments from the executable at a space might have been incorrect,
9160    # since paths with space are more likely in Windows. Give it another try with the whole
9161    # argument.
9162    path="$complete"
9163    arguments="EOL"
9164    new_path="$path"
9165
9166  windows_path="$new_path"
9167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9168    unix_path=`$CYGPATH -u "$windows_path"`
9169    new_path="$unix_path"
9170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9172    new_path="$unix_path"
9173  fi
9174
9175
9176    new_path=`$WHICH "$new_path" 2> /dev/null`
9177
9178    if test "x$new_path" = x; then
9179      # It's still not found. Now this is an unrecoverable error.
9180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9181$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9182      has_space=`$ECHO "$complete" | $GREP " "`
9183      if test "x$has_space" != x; then
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9186      fi
9187      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9188    fi
9189  fi
9190
9191  # Now new_path has a complete unix path to the binary
9192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9193    # Keep paths in /bin as-is, but remove trailing .exe if any
9194    new_path="${new_path/%.exe/}"
9195    # Do not save /bin paths to all_fixpath_prefixes!
9196  else
9197    # Not in mixed or Windows style, start by that.
9198    new_path=`cmd //c echo $new_path`
9199
9200  input_path="$new_path"
9201  # Check if we need to convert this using DOS-style short mode. If the path
9202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9203  # take no chances and rewrite it.
9204  # Note: m4 eats our [], so we need to use [ and ] instead.
9205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9206  if test "x$has_forbidden_chars" != x; then
9207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9209  fi
9210
9211    # Output is in $new_path
9212
9213  windows_path="$new_path"
9214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9215    unix_path=`$CYGPATH -u "$windows_path"`
9216    new_path="$unix_path"
9217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9219    new_path="$unix_path"
9220  fi
9221
9222    # remove trailing .exe if any
9223    new_path="${new_path/%.exe/}"
9224
9225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9227  fi
9228
9229  else
9230    # We're on a posix platform. Hooray! :)
9231    # First separate the path from the arguments. This will split at the first
9232    # space.
9233    complete="$FOUND_MAKE"
9234    path="${complete%% *}"
9235    tmp="$complete EOL"
9236    arguments="${tmp#* }"
9237
9238    # Cannot rely on the command "which" here since it doesn't always work.
9239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9240    if test -z "$is_absolute_path"; then
9241      # Path to executable is not absolute. Find it.
9242      IFS_save="$IFS"
9243      IFS=:
9244      for p in $PATH; do
9245        if test -f "$p/$path" && test -x "$p/$path"; then
9246          new_path="$p/$path"
9247          break
9248        fi
9249      done
9250      IFS="$IFS_save"
9251    else
9252      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9253$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9254      new_path="$path"
9255    fi
9256
9257    if test "x$new_path" = x; then
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9259$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9260        has_space=`$ECHO "$complete" | $GREP " "`
9261        if test "x$has_space" != x; then
9262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9264        fi
9265        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9266      fi
9267  fi
9268
9269      # Now join together the path and the arguments once again
9270      if test "x$arguments" != xEOL; then
9271        new_complete="$new_path ${arguments% *}"
9272      else
9273        new_complete="$new_path"
9274      fi
9275
9276  if test "x$complete" != "x$new_complete"; then
9277      FOUND_MAKE="$new_complete"
9278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9279$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9280    fi
9281
9282        fi
9283      fi
9284    fi
9285  fi
9286
9287        if test "x$FOUND_MAKE" = x; then
9288          for ac_prog in make
9289do
9290  # Extract the first word of "$ac_prog", so it can be a program name with args.
9291set dummy $ac_prog; ac_word=$2
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9293$as_echo_n "checking for $ac_word... " >&6; }
9294if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9295  $as_echo_n "(cached) " >&6
9296else
9297  case $CHECK_TOOLSDIR_MAKE in
9298  [\\/]* | ?:[\\/]*)
9299  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9300  ;;
9301  *)
9302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9303for as_dir in $PATH
9304do
9305  IFS=$as_save_IFS
9306  test -z "$as_dir" && as_dir=.
9307    for ac_exec_ext in '' $ac_executable_extensions; do
9308  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9309    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9311    break 2
9312  fi
9313done
9314  done
9315IFS=$as_save_IFS
9316
9317  ;;
9318esac
9319fi
9320CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9321if test -n "$CHECK_TOOLSDIR_MAKE"; then
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9323$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9324else
9325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
9327fi
9328
9329
9330  test -n "$CHECK_TOOLSDIR_MAKE" && break
9331done
9332
9333
9334  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9335  DESCRIPTION="make in tools-dir"
9336  if test "x$MAKE_CANDIDATE" != x; then
9337    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9338$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9339    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9340    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9341    if test "x$IS_GNU_MAKE" = x; then
9342      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9343$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9344    else
9345      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9346      if test "x$IS_MODERN_MAKE" = x; then
9347        { $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
9348$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;}
9349      else
9350        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9351          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9352            MAKE_EXPECTED_ENV='cygwin'
9353          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9354            MAKE_EXPECTED_ENV='msys'
9355          else
9356            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9357          fi
9358          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9359          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9360        else
9361          # Not relevant for non-Windows
9362          IS_MAKE_CORRECT_ENV=true
9363        fi
9364        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9365          { $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
9366$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;}
9367        else
9368          FOUND_MAKE=$MAKE_CANDIDATE
9369
9370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9371
9372  # First separate the path from the arguments. This will split at the first
9373  # space.
9374  complete="$FOUND_MAKE"
9375  path="${complete%% *}"
9376  tmp="$complete EOL"
9377  arguments="${tmp#* }"
9378
9379  # Input might be given as Windows format, start by converting to
9380  # unix format.
9381  new_path=`$CYGPATH -u "$path"`
9382
9383  # Now try to locate executable using which
9384  new_path=`$WHICH "$new_path" 2> /dev/null`
9385  # bat and cmd files are not always considered executable in cygwin causing which
9386  # to not find them
9387  if test "x$new_path" = x \
9388           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9389           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9390    new_path=`$CYGPATH -u "$path"`
9391  fi
9392  if test "x$new_path" = x; then
9393    # Oops. Which didn't find the executable.
9394    # The splitting of arguments from the executable at a space might have been incorrect,
9395    # since paths with space are more likely in Windows. Give it another try with the whole
9396    # argument.
9397    path="$complete"
9398    arguments="EOL"
9399    new_path=`$CYGPATH -u "$path"`
9400    new_path=`$WHICH "$new_path" 2> /dev/null`
9401    # bat and cmd files are not always considered executable in cygwin causing which
9402    # to not find them
9403    if test "x$new_path" = x \
9404             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9405             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9406      new_path=`$CYGPATH -u "$path"`
9407    fi
9408    if test "x$new_path" = x; then
9409      # It's still not found. Now this is an unrecoverable error.
9410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9412      has_space=`$ECHO "$complete" | $GREP " "`
9413      if test "x$has_space" != x; then
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9416      fi
9417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9418    fi
9419  fi
9420
9421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9424  # "foo.exe" is OK but "foo" is an error.
9425  #
9426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9427  # It is also a way to make sure we got the proper file name for the real test later on.
9428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9429  if test "x$test_shortpath" = x; then
9430    # Short path failed, file does not exist as specified.
9431    # Try adding .exe or .cmd
9432    if test -f "${new_path}.exe"; then
9433       input_to_shortpath="${new_path}.exe"
9434    elif test -f "${new_path}.cmd"; then
9435       input_to_shortpath="${new_path}.cmd"
9436    else
9437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9442    fi
9443  else
9444    input_to_shortpath="$new_path"
9445  fi
9446
9447  # Call helper function which possibly converts this using DOS-style short mode.
9448  # If so, the updated path is stored in $new_path.
9449  new_path="$input_to_shortpath"
9450
9451  input_path="$input_to_shortpath"
9452  # Check if we need to convert this using DOS-style short mode. If the path
9453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9454  # take no chances and rewrite it.
9455  # Note: m4 eats our [], so we need to use [ and ] instead.
9456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9457  if test "x$has_forbidden_chars" != x; then
9458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9462      # Going to short mode and back again did indeed matter. Since short mode is
9463      # case insensitive, let's make it lowercase to improve readability.
9464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9465      # Now convert it back to Unix-stile (cygpath)
9466      input_path=`$CYGPATH -u "$shortmode_path"`
9467      new_path="$input_path"
9468    fi
9469  fi
9470
9471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9472  if test "x$test_cygdrive_prefix" = x; then
9473    # As a simple fix, exclude /usr/bin since it's not a real path.
9474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9476      # a path prefixed by /cygdrive for fixpath to work.
9477      new_path="$CYGWIN_ROOT_PATH$input_path"
9478    fi
9479  fi
9480
9481  # remove trailing .exe if any
9482  new_path="${new_path/%.exe/}"
9483
9484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9485
9486  # First separate the path from the arguments. This will split at the first
9487  # space.
9488  complete="$FOUND_MAKE"
9489  path="${complete%% *}"
9490  tmp="$complete EOL"
9491  arguments="${tmp#* }"
9492
9493  # Input might be given as Windows format, start by converting to
9494  # unix format.
9495  new_path="$path"
9496
9497  windows_path="$new_path"
9498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9499    unix_path=`$CYGPATH -u "$windows_path"`
9500    new_path="$unix_path"
9501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9503    new_path="$unix_path"
9504  fi
9505
9506
9507  # Now try to locate executable using which
9508  new_path=`$WHICH "$new_path" 2> /dev/null`
9509
9510  if test "x$new_path" = x; then
9511    # Oops. Which didn't find the executable.
9512    # The splitting of arguments from the executable at a space might have been incorrect,
9513    # since paths with space are more likely in Windows. Give it another try with the whole
9514    # argument.
9515    path="$complete"
9516    arguments="EOL"
9517    new_path="$path"
9518
9519  windows_path="$new_path"
9520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9521    unix_path=`$CYGPATH -u "$windows_path"`
9522    new_path="$unix_path"
9523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9525    new_path="$unix_path"
9526  fi
9527
9528
9529    new_path=`$WHICH "$new_path" 2> /dev/null`
9530
9531    if test "x$new_path" = x; then
9532      # It's still not found. Now this is an unrecoverable error.
9533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9534$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9535      has_space=`$ECHO "$complete" | $GREP " "`
9536      if test "x$has_space" != x; then
9537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9539      fi
9540      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9541    fi
9542  fi
9543
9544  # Now new_path has a complete unix path to the binary
9545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9546    # Keep paths in /bin as-is, but remove trailing .exe if any
9547    new_path="${new_path/%.exe/}"
9548    # Do not save /bin paths to all_fixpath_prefixes!
9549  else
9550    # Not in mixed or Windows style, start by that.
9551    new_path=`cmd //c echo $new_path`
9552
9553  input_path="$new_path"
9554  # Check if we need to convert this using DOS-style short mode. If the path
9555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9556  # take no chances and rewrite it.
9557  # Note: m4 eats our [], so we need to use [ and ] instead.
9558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9559  if test "x$has_forbidden_chars" != x; then
9560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9562  fi
9563
9564    # Output is in $new_path
9565
9566  windows_path="$new_path"
9567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9568    unix_path=`$CYGPATH -u "$windows_path"`
9569    new_path="$unix_path"
9570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9572    new_path="$unix_path"
9573  fi
9574
9575    # remove trailing .exe if any
9576    new_path="${new_path/%.exe/}"
9577
9578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9580  fi
9581
9582  else
9583    # We're on a posix platform. Hooray! :)
9584    # First separate the path from the arguments. This will split at the first
9585    # space.
9586    complete="$FOUND_MAKE"
9587    path="${complete%% *}"
9588    tmp="$complete EOL"
9589    arguments="${tmp#* }"
9590
9591    # Cannot rely on the command "which" here since it doesn't always work.
9592    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9593    if test -z "$is_absolute_path"; then
9594      # Path to executable is not absolute. Find it.
9595      IFS_save="$IFS"
9596      IFS=:
9597      for p in $PATH; do
9598        if test -f "$p/$path" && test -x "$p/$path"; then
9599          new_path="$p/$path"
9600          break
9601        fi
9602      done
9603      IFS="$IFS_save"
9604    else
9605      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9606$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9607      new_path="$path"
9608    fi
9609
9610    if test "x$new_path" = x; then
9611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9613        has_space=`$ECHO "$complete" | $GREP " "`
9614        if test "x$has_space" != x; then
9615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9617        fi
9618        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9619      fi
9620  fi
9621
9622      # Now join together the path and the arguments once again
9623      if test "x$arguments" != xEOL; then
9624        new_complete="$new_path ${arguments% *}"
9625      else
9626        new_complete="$new_path"
9627      fi
9628
9629  if test "x$complete" != "x$new_complete"; then
9630      FOUND_MAKE="$new_complete"
9631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9632$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9633    fi
9634
9635        fi
9636      fi
9637    fi
9638  fi
9639
9640        fi
9641        PATH=$OLD_PATH
9642      fi
9643    fi
9644
9645    if test "x$FOUND_MAKE" = x; then
9646      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
9647    fi
9648  fi
9649
9650  MAKE=$FOUND_MAKE
9651
9652  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9653$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9654
9655
9656
9657    # Test if find supports -delete
9658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9659$as_echo_n "checking if find supports -delete... " >&6; }
9660    FIND_DELETE="-delete"
9661
9662    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9663
9664    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9665
9666    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9667    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9668        # No, it does not.
9669        rm $DELETEDIR/TestIfFindSupportsDelete
9670        FIND_DELETE="-exec rm \{\} \+"
9671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672$as_echo "no" >&6; }
9673    else
9674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9675$as_echo "yes" >&6; }
9676    fi
9677    rmdir $DELETEDIR
9678
9679
9680
9681# These tools might not be installed by default,
9682# need hint on how to install them.
9683
9684    for ac_prog in unzip
9685do
9686  # Extract the first word of "$ac_prog", so it can be a program name with args.
9687set dummy $ac_prog; ac_word=$2
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9689$as_echo_n "checking for $ac_word... " >&6; }
9690if test "${ac_cv_path_UNZIP+set}" = set; then :
9691  $as_echo_n "(cached) " >&6
9692else
9693  case $UNZIP in
9694  [\\/]* | ?:[\\/]*)
9695  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9696  ;;
9697  *)
9698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9699for as_dir in $PATH
9700do
9701  IFS=$as_save_IFS
9702  test -z "$as_dir" && as_dir=.
9703    for ac_exec_ext in '' $ac_executable_extensions; do
9704  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9705    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9707    break 2
9708  fi
9709done
9710  done
9711IFS=$as_save_IFS
9712
9713  ;;
9714esac
9715fi
9716UNZIP=$ac_cv_path_UNZIP
9717if test -n "$UNZIP"; then
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9719$as_echo "$UNZIP" >&6; }
9720else
9721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722$as_echo "no" >&6; }
9723fi
9724
9725
9726  test -n "$UNZIP" && break
9727done
9728
9729
9730    if test "x$UNZIP" = x; then
9731        if test "xunzip" = x; then
9732          PROG_NAME=unzip
9733        else
9734          PROG_NAME=unzip
9735        fi
9736        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9737$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9738        as_fn_error $? "Cannot continue" "$LINENO" 5
9739    fi
9740
9741
9742
9743    for ac_prog in zip
9744do
9745  # Extract the first word of "$ac_prog", so it can be a program name with args.
9746set dummy $ac_prog; ac_word=$2
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9748$as_echo_n "checking for $ac_word... " >&6; }
9749if test "${ac_cv_path_ZIP+set}" = set; then :
9750  $as_echo_n "(cached) " >&6
9751else
9752  case $ZIP in
9753  [\\/]* | ?:[\\/]*)
9754  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9755  ;;
9756  *)
9757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9758for as_dir in $PATH
9759do
9760  IFS=$as_save_IFS
9761  test -z "$as_dir" && as_dir=.
9762    for ac_exec_ext in '' $ac_executable_extensions; do
9763  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9764    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9766    break 2
9767  fi
9768done
9769  done
9770IFS=$as_save_IFS
9771
9772  ;;
9773esac
9774fi
9775ZIP=$ac_cv_path_ZIP
9776if test -n "$ZIP"; then
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9778$as_echo "$ZIP" >&6; }
9779else
9780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
9782fi
9783
9784
9785  test -n "$ZIP" && break
9786done
9787
9788
9789    if test "x$ZIP" = x; then
9790        if test "xzip" = x; then
9791          PROG_NAME=zip
9792        else
9793          PROG_NAME=zip
9794        fi
9795        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9796$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9797        as_fn_error $? "Cannot continue" "$LINENO" 5
9798    fi
9799
9800
9801
9802# Non-required basic tools
9803
9804# Extract the first word of "ldd", so it can be a program name with args.
9805set dummy ldd; ac_word=$2
9806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9807$as_echo_n "checking for $ac_word... " >&6; }
9808if test "${ac_cv_path_LDD+set}" = set; then :
9809  $as_echo_n "(cached) " >&6
9810else
9811  case $LDD in
9812  [\\/]* | ?:[\\/]*)
9813  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9814  ;;
9815  *)
9816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9817for as_dir in $PATH
9818do
9819  IFS=$as_save_IFS
9820  test -z "$as_dir" && as_dir=.
9821    for ac_exec_ext in '' $ac_executable_extensions; do
9822  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9823    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9825    break 2
9826  fi
9827done
9828  done
9829IFS=$as_save_IFS
9830
9831  ;;
9832esac
9833fi
9834LDD=$ac_cv_path_LDD
9835if test -n "$LDD"; then
9836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9837$as_echo "$LDD" >&6; }
9838else
9839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9840$as_echo "no" >&6; }
9841fi
9842
9843
9844if test "x$LDD" = "x"; then
9845    # List shared lib dependencies is used for
9846    # debug output and checking for forbidden dependencies.
9847    # We can build without it.
9848    LDD="true"
9849fi
9850# Extract the first word of "otool", so it can be a program name with args.
9851set dummy otool; ac_word=$2
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9853$as_echo_n "checking for $ac_word... " >&6; }
9854if test "${ac_cv_path_OTOOL+set}" = set; then :
9855  $as_echo_n "(cached) " >&6
9856else
9857  case $OTOOL in
9858  [\\/]* | ?:[\\/]*)
9859  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9860  ;;
9861  *)
9862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9863for as_dir in $PATH
9864do
9865  IFS=$as_save_IFS
9866  test -z "$as_dir" && as_dir=.
9867    for ac_exec_ext in '' $ac_executable_extensions; do
9868  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9869    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9871    break 2
9872  fi
9873done
9874  done
9875IFS=$as_save_IFS
9876
9877  ;;
9878esac
9879fi
9880OTOOL=$ac_cv_path_OTOOL
9881if test -n "$OTOOL"; then
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9883$as_echo "$OTOOL" >&6; }
9884else
9885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
9887fi
9888
9889
9890if test "x$OTOOL" = "x"; then
9891   OTOOL="true"
9892fi
9893for ac_prog in readelf greadelf
9894do
9895  # Extract the first word of "$ac_prog", so it can be a program name with args.
9896set dummy $ac_prog; ac_word=$2
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9898$as_echo_n "checking for $ac_word... " >&6; }
9899if test "${ac_cv_path_READELF+set}" = set; then :
9900  $as_echo_n "(cached) " >&6
9901else
9902  case $READELF in
9903  [\\/]* | ?:[\\/]*)
9904  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9905  ;;
9906  *)
9907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9908for as_dir in $PATH
9909do
9910  IFS=$as_save_IFS
9911  test -z "$as_dir" && as_dir=.
9912    for ac_exec_ext in '' $ac_executable_extensions; do
9913  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9914    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9916    break 2
9917  fi
9918done
9919  done
9920IFS=$as_save_IFS
9921
9922  ;;
9923esac
9924fi
9925READELF=$ac_cv_path_READELF
9926if test -n "$READELF"; then
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9928$as_echo "$READELF" >&6; }
9929else
9930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; }
9932fi
9933
9934
9935  test -n "$READELF" && break
9936done
9937
9938# Extract the first word of "hg", so it can be a program name with args.
9939set dummy hg; ac_word=$2
9940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9941$as_echo_n "checking for $ac_word... " >&6; }
9942if test "${ac_cv_path_HG+set}" = set; then :
9943  $as_echo_n "(cached) " >&6
9944else
9945  case $HG in
9946  [\\/]* | ?:[\\/]*)
9947  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9948  ;;
9949  *)
9950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9951for as_dir in $PATH
9952do
9953  IFS=$as_save_IFS
9954  test -z "$as_dir" && as_dir=.
9955    for ac_exec_ext in '' $ac_executable_extensions; do
9956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9957    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9959    break 2
9960  fi
9961done
9962  done
9963IFS=$as_save_IFS
9964
9965  ;;
9966esac
9967fi
9968HG=$ac_cv_path_HG
9969if test -n "$HG"; then
9970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9971$as_echo "$HG" >&6; }
9972else
9973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974$as_echo "no" >&6; }
9975fi
9976
9977
9978# Extract the first word of "stat", so it can be a program name with args.
9979set dummy stat; ac_word=$2
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981$as_echo_n "checking for $ac_word... " >&6; }
9982if test "${ac_cv_path_STAT+set}" = set; then :
9983  $as_echo_n "(cached) " >&6
9984else
9985  case $STAT in
9986  [\\/]* | ?:[\\/]*)
9987  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9988  ;;
9989  *)
9990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993  IFS=$as_save_IFS
9994  test -z "$as_dir" && as_dir=.
9995    for ac_exec_ext in '' $ac_executable_extensions; do
9996  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9997    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999    break 2
10000  fi
10001done
10002  done
10003IFS=$as_save_IFS
10004
10005  ;;
10006esac
10007fi
10008STAT=$ac_cv_path_STAT
10009if test -n "$STAT"; then
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10011$as_echo "$STAT" >&6; }
10012else
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015fi
10016
10017
10018# Extract the first word of "time", so it can be a program name with args.
10019set dummy time; ac_word=$2
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10021$as_echo_n "checking for $ac_word... " >&6; }
10022if test "${ac_cv_path_TIME+set}" = set; then :
10023  $as_echo_n "(cached) " >&6
10024else
10025  case $TIME in
10026  [\\/]* | ?:[\\/]*)
10027  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10028  ;;
10029  *)
10030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10031for as_dir in $PATH
10032do
10033  IFS=$as_save_IFS
10034  test -z "$as_dir" && as_dir=.
10035    for ac_exec_ext in '' $ac_executable_extensions; do
10036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10037    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10039    break 2
10040  fi
10041done
10042  done
10043IFS=$as_save_IFS
10044
10045  ;;
10046esac
10047fi
10048TIME=$ac_cv_path_TIME
10049if test -n "$TIME"; then
10050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10051$as_echo "$TIME" >&6; }
10052else
10053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054$as_echo "no" >&6; }
10055fi
10056
10057
10058
10059if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10060
10061    for ac_prog in comm
10062do
10063  # Extract the first word of "$ac_prog", so it can be a program name with args.
10064set dummy $ac_prog; ac_word=$2
10065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10066$as_echo_n "checking for $ac_word... " >&6; }
10067if test "${ac_cv_path_COMM+set}" = set; then :
10068  $as_echo_n "(cached) " >&6
10069else
10070  case $COMM in
10071  [\\/]* | ?:[\\/]*)
10072  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10073  ;;
10074  *)
10075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10076for as_dir in $PATH
10077do
10078  IFS=$as_save_IFS
10079  test -z "$as_dir" && as_dir=.
10080    for ac_exec_ext in '' $ac_executable_extensions; do
10081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10082    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10084    break 2
10085  fi
10086done
10087  done
10088IFS=$as_save_IFS
10089
10090  ;;
10091esac
10092fi
10093COMM=$ac_cv_path_COMM
10094if test -n "$COMM"; then
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10096$as_echo "$COMM" >&6; }
10097else
10098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
10100fi
10101
10102
10103  test -n "$COMM" && break
10104done
10105
10106
10107    if test "x$COMM" = x; then
10108        if test "xcomm" = x; then
10109          PROG_NAME=comm
10110        else
10111          PROG_NAME=comm
10112        fi
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10115        as_fn_error $? "Cannot continue" "$LINENO" 5
10116    fi
10117
10118
10119fi
10120
10121
10122# Check if pkg-config is available.
10123
10124
10125if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10126	if test -n "$ac_tool_prefix"; then
10127  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10128set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10130$as_echo_n "checking for $ac_word... " >&6; }
10131if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10132  $as_echo_n "(cached) " >&6
10133else
10134  case $PKG_CONFIG in
10135  [\\/]* | ?:[\\/]*)
10136  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10137  ;;
10138  *)
10139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10140for as_dir in $PATH
10141do
10142  IFS=$as_save_IFS
10143  test -z "$as_dir" && as_dir=.
10144    for ac_exec_ext in '' $ac_executable_extensions; do
10145  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10146    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10148    break 2
10149  fi
10150done
10151  done
10152IFS=$as_save_IFS
10153
10154  ;;
10155esac
10156fi
10157PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10158if test -n "$PKG_CONFIG"; then
10159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10160$as_echo "$PKG_CONFIG" >&6; }
10161else
10162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10163$as_echo "no" >&6; }
10164fi
10165
10166
10167fi
10168if test -z "$ac_cv_path_PKG_CONFIG"; then
10169  ac_pt_PKG_CONFIG=$PKG_CONFIG
10170  # Extract the first word of "pkg-config", so it can be a program name with args.
10171set dummy pkg-config; ac_word=$2
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173$as_echo_n "checking for $ac_word... " >&6; }
10174if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10175  $as_echo_n "(cached) " >&6
10176else
10177  case $ac_pt_PKG_CONFIG in
10178  [\\/]* | ?:[\\/]*)
10179  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10180  ;;
10181  *)
10182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183for as_dir in $PATH
10184do
10185  IFS=$as_save_IFS
10186  test -z "$as_dir" && as_dir=.
10187    for ac_exec_ext in '' $ac_executable_extensions; do
10188  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10189    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191    break 2
10192  fi
10193done
10194  done
10195IFS=$as_save_IFS
10196
10197  ;;
10198esac
10199fi
10200ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10201if test -n "$ac_pt_PKG_CONFIG"; then
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10203$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10204else
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206$as_echo "no" >&6; }
10207fi
10208
10209  if test "x$ac_pt_PKG_CONFIG" = x; then
10210    PKG_CONFIG=""
10211  else
10212    case $cross_compiling:$ac_tool_warned in
10213yes:)
10214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10216ac_tool_warned=yes ;;
10217esac
10218    PKG_CONFIG=$ac_pt_PKG_CONFIG
10219  fi
10220else
10221  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10222fi
10223
10224fi
10225if test -n "$PKG_CONFIG"; then
10226	_pkg_min_version=0.9.0
10227	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10228$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10229	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10230		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10231$as_echo "yes" >&6; }
10232	else
10233		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
10235		PKG_CONFIG=""
10236	fi
10237
10238fi
10239
10240# After basic tools have been setup, we can check build os specific details.
10241
10242###############################################################################
10243
10244# Note that this is the build platform OS version!
10245
10246OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10247OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10248OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10249OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10250
10251
10252
10253
10254
10255# Setup builddeps, for automatic downloading of tools we need.
10256# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10257# boot-jdk setup, but we need to have basic tools setup first.
10258
10259
10260# Check whether --with-builddeps-conf was given.
10261if test "${with_builddeps_conf+set}" = set; then :
10262  withval=$with_builddeps_conf;
10263fi
10264
10265
10266
10267# Check whether --with-builddeps-server was given.
10268if test "${with_builddeps_server+set}" = set; then :
10269  withval=$with_builddeps_server;
10270fi
10271
10272
10273
10274# Check whether --with-builddeps-dir was given.
10275if test "${with_builddeps_dir+set}" = set; then :
10276  withval=$with_builddeps_dir;
10277else
10278  with_builddeps_dir=/localhome/builddeps
10279fi
10280
10281
10282
10283# Check whether --with-builddeps-group was given.
10284if test "${with_builddeps_group+set}" = set; then :
10285  withval=$with_builddeps_group;
10286fi
10287
10288
10289
10290
10291    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10292        if test "x$with_builddeps_conf" != x; then
10293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10294$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10295            builddepsfile=$with_builddeps_conf
10296            if test -s $builddepsfile; then
10297                . $builddepsfile
10298                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10299$as_echo "loaded!" >&6; }
10300            else
10301               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10302           fi
10303        else
10304            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10305$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10306            builddepsfile=`mktemp`
10307            touch $builddepsfile
10308            # Put all found confs into a single file.
10309            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10310            # Source the file to acquire the variables
10311            if test -s $builddepsfile; then
10312                . $builddepsfile
10313                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10314$as_echo "found at least one!" >&6; }
10315            else
10316               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10317           fi
10318        fi
10319        # Create build and target names that use _ instead of "-" and ".".
10320        # This is necessary to use them in variable names.
10321        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10322        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10323        # Extract rewrite information for build and target
10324        eval rewritten_build=\${REWRITE_${build_var}}
10325        if test "x$rewritten_build" = x; then
10326            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10327            echo Build stays the same $rewritten_build
10328        else
10329            echo Rewriting build for builddeps into $rewritten_build
10330        fi
10331        eval rewritten_target=\${REWRITE_${target_var}}
10332        if test "x$rewritten_target" = x; then
10333            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10334            echo Target stays the same $rewritten_target
10335        else
10336            echo Rewriting target for builddeps into $rewritten_target
10337        fi
10338        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10339        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10340    fi
10341    for ac_prog in 7z unzip
10342do
10343  # Extract the first word of "$ac_prog", so it can be a program name with args.
10344set dummy $ac_prog; ac_word=$2
10345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346$as_echo_n "checking for $ac_word... " >&6; }
10347if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10348  $as_echo_n "(cached) " >&6
10349else
10350  if test -n "$BDEPS_UNZIP"; then
10351  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10352else
10353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354for as_dir in $PATH
10355do
10356  IFS=$as_save_IFS
10357  test -z "$as_dir" && as_dir=.
10358    for ac_exec_ext in '' $ac_executable_extensions; do
10359  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10360    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362    break 2
10363  fi
10364done
10365  done
10366IFS=$as_save_IFS
10367
10368fi
10369fi
10370BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10371if test -n "$BDEPS_UNZIP"; then
10372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10373$as_echo "$BDEPS_UNZIP" >&6; }
10374else
10375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
10377fi
10378
10379
10380  test -n "$BDEPS_UNZIP" && break
10381done
10382
10383    if test "x$BDEPS_UNZIP" = x7z; then
10384        BDEPS_UNZIP="7z x"
10385    fi
10386
10387    for ac_prog in wget lftp ftp
10388do
10389  # Extract the first word of "$ac_prog", so it can be a program name with args.
10390set dummy $ac_prog; ac_word=$2
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392$as_echo_n "checking for $ac_word... " >&6; }
10393if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10394  $as_echo_n "(cached) " >&6
10395else
10396  if test -n "$BDEPS_FTP"; then
10397  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10398else
10399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10400for as_dir in $PATH
10401do
10402  IFS=$as_save_IFS
10403  test -z "$as_dir" && as_dir=.
10404    for ac_exec_ext in '' $ac_executable_extensions; do
10405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10406    ac_cv_prog_BDEPS_FTP="$ac_prog"
10407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10408    break 2
10409  fi
10410done
10411  done
10412IFS=$as_save_IFS
10413
10414fi
10415fi
10416BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10417if test -n "$BDEPS_FTP"; then
10418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10419$as_echo "$BDEPS_FTP" >&6; }
10420else
10421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
10423fi
10424
10425
10426  test -n "$BDEPS_FTP" && break
10427done
10428
10429
10430
10431###############################################################################
10432#
10433# Determine OpenJDK variants, options and version numbers.
10434#
10435###############################################################################
10436
10437# We need build & target for this.
10438
10439
10440###############################################################################
10441#
10442# Should we build only OpenJDK even if closed sources are present?
10443#
10444# Check whether --enable-openjdk-only was given.
10445if test "${enable_openjdk_only+set}" = set; then :
10446  enableval=$enable_openjdk_only;
10447else
10448  enable_openjdk_only="no"
10449fi
10450
10451
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10453$as_echo_n "checking for presence of closed sources... " >&6; }
10454if test -d "$SRC_ROOT/jdk/src/closed"; then
10455    CLOSED_SOURCE_PRESENT=yes
10456else
10457    CLOSED_SOURCE_PRESENT=no
10458fi
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10460$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10461
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10463$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10464SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10466$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10467
10468if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10469  OPENJDK=true
10470  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10472$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10473  fi
10474else
10475  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10476    OPENJDK=true
10477  else
10478    OPENJDK=false
10479  fi
10480fi
10481
10482if test "x$OPENJDK" = "xtrue"; then
10483    SET_OPENJDK="OPENJDK=true"
10484fi
10485
10486
10487
10488###############################################################################
10489#
10490# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10491# We always build headless support.
10492#
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10494$as_echo_n "checking headful support... " >&6; }
10495# Check whether --enable-headful was given.
10496if test "${enable_headful+set}" = set; then :
10497  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10498else
10499  SUPPORT_HEADFUL=yes
10500fi
10501
10502
10503SUPPORT_HEADLESS=yes
10504BUILD_HEADLESS="BUILD_HEADLESS:=true"
10505
10506if test "x$SUPPORT_HEADFUL" = xyes; then
10507    # We are building both headful and headless.
10508    headful_msg="inlude support for both headful and headless"
10509fi
10510
10511if test "x$SUPPORT_HEADFUL" = xno; then
10512    # Thus we are building headless only.
10513    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10514    headful_msg="headless only"
10515fi
10516
10517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10518$as_echo "$headful_msg" >&6; }
10519
10520
10521
10522
10523
10524# Control wether Hotspot runs Queens test after build.
10525# Check whether --enable-hotspot-test-in-build was given.
10526if test "${enable_hotspot_test_in_build+set}" = set; then :
10527  enableval=$enable_hotspot_test_in_build;
10528else
10529  enable_hotspot_test_in_build=no
10530fi
10531
10532if test "x$enable_hotspot_test_in_build" = "xyes"; then
10533    TEST_IN_BUILD=true
10534else
10535    TEST_IN_BUILD=false
10536fi
10537
10538
10539###############################################################################
10540#
10541# Choose cacerts source file
10542#
10543
10544# Check whether --with-cacerts-file was given.
10545if test "${with_cacerts_file+set}" = set; then :
10546  withval=$with_cacerts_file;
10547fi
10548
10549if test "x$with_cacerts_file" != x; then
10550    CACERTS_FILE=$with_cacerts_file
10551else
10552    if test "x$OPENJDK" = "xtrue"; then
10553        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10554    else
10555        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10556    fi
10557fi
10558
10559
10560###############################################################################
10561#
10562# Enable or disable unlimited crypto
10563#
10564# Check whether --enable-unlimited-crypto was given.
10565if test "${enable_unlimited_crypto+set}" = set; then :
10566  enableval=$enable_unlimited_crypto;
10567else
10568  enable_unlimited_crypto=no
10569fi
10570
10571if test "x$enable_unlimited_crypto" = "xyes"; then
10572    UNLIMITED_CRYPTO=true
10573else
10574    UNLIMITED_CRYPTO=false
10575fi
10576
10577
10578###############################################################################
10579#
10580# Compress jars
10581#
10582COMPRESS_JARS=false
10583
10584
10585
10586
10587# Source the version numbers
10588. $AUTOCONF_DIR/version.numbers
10589if test "x$OPENJDK" = "xfalse"; then
10590    . $AUTOCONF_DIR/closed.version.numbers
10591fi
10592# Now set the JDK version, milestone, build number etc.
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607COPYRIGHT_YEAR=`date +'%Y'`
10608
10609
10610RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10611
10612
10613if test "x$JDK_UPDATE_VERSION" != x; then
10614    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10615else
10616    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10617fi
10618
10619
10620if test "x$MILESTONE" != x; then
10621    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10622else
10623    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10624fi
10625
10626
10627if test "x$JDK_BUILD_NUMBER" != x; then
10628    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10629else
10630    JDK_BUILD_NUMBER=b00
10631    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10632    # Avoid [:alnum:] since it depends on the locale.
10633    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10634    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10635    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10636fi
10637
10638COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10639
10640
10641
10642###############################################################################
10643#
10644# Setup BootJDK, used to bootstrap the build.
10645#
10646###############################################################################
10647
10648
10649BOOT_JDK_FOUND=no
10650
10651# Check whether --with-boot-jdk was given.
10652if test "${with_boot_jdk+set}" = set; then :
10653  withval=$with_boot_jdk;
10654fi
10655
10656
10657# We look for the Boot JDK through various means, going from more certain to
10658# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10659# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10660# must check if this is indeed valid; otherwise we'll continue looking.
10661
10662# Test: Is bootjdk explicitely set by command line arguments?
10663
10664  if test "x$BOOT_JDK_FOUND" = xno; then
10665    # Now execute the test
10666
10667if test "x$with_boot_jdk" != x; then
10668    BOOT_JDK=$with_boot_jdk
10669    BOOT_JDK_FOUND=maybe
10670    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10671$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10672fi
10673
10674
10675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10677      # Do we have a bin/java?
10678      if test ! -x "$BOOT_JDK/bin/java"; then
10679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10681        BOOT_JDK_FOUND=no
10682      else
10683        # Do we have a bin/javac?
10684        if test ! -x "$BOOT_JDK/bin/javac"; then
10685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10689          BOOT_JDK_FOUND=no
10690        else
10691          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10692          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10693            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10695            BOOT_JDK_FOUND=no
10696          else
10697            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10698            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10699
10700            # Extra M4 quote needed to protect [] in grep expression.
10701            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10702            if test "x$FOUND_VERSION_78" = x; then
10703              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10705              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10706$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10707              BOOT_JDK_FOUND=no
10708            else
10709              # We're done! :-)
10710              BOOT_JDK_FOUND=yes
10711
10712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10713
10714  # Input might be given as Windows format, start by converting to
10715  # unix format.
10716  path="$BOOT_JDK"
10717  new_path=`$CYGPATH -u "$path"`
10718
10719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10722  # "foo.exe" is OK but "foo" is an error.
10723  #
10724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10725  # It is also a way to make sure we got the proper file name for the real test later on.
10726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10727  if test "x$test_shortpath" = x; then
10728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10731  fi
10732
10733  # Call helper function which possibly converts this using DOS-style short mode.
10734  # If so, the updated path is stored in $new_path.
10735
10736  input_path="$new_path"
10737  # Check if we need to convert this using DOS-style short mode. If the path
10738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10739  # take no chances and rewrite it.
10740  # Note: m4 eats our [], so we need to use [ and ] instead.
10741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10742  if test "x$has_forbidden_chars" != x; then
10743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10747      # Going to short mode and back again did indeed matter. Since short mode is
10748      # case insensitive, let's make it lowercase to improve readability.
10749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10750      # Now convert it back to Unix-stile (cygpath)
10751      input_path=`$CYGPATH -u "$shortmode_path"`
10752      new_path="$input_path"
10753    fi
10754  fi
10755
10756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10757  if test "x$test_cygdrive_prefix" = x; then
10758    # As a simple fix, exclude /usr/bin since it's not a real path.
10759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10761      # a path prefixed by /cygdrive for fixpath to work.
10762      new_path="$CYGWIN_ROOT_PATH$input_path"
10763    fi
10764  fi
10765
10766
10767  if test "x$path" != "x$new_path"; then
10768    BOOT_JDK="$new_path"
10769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10771  fi
10772
10773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10774
10775  path="$BOOT_JDK"
10776  has_colon=`$ECHO $path | $GREP ^.:`
10777  new_path="$path"
10778  if test "x$has_colon" = x; then
10779    # Not in mixed or Windows style, start by that.
10780    new_path=`cmd //c echo $path`
10781  fi
10782
10783
10784  input_path="$new_path"
10785  # Check if we need to convert this using DOS-style short mode. If the path
10786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10787  # take no chances and rewrite it.
10788  # Note: m4 eats our [], so we need to use [ and ] instead.
10789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10790  if test "x$has_forbidden_chars" != x; then
10791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10793  fi
10794
10795
10796  windows_path="$new_path"
10797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10798    unix_path=`$CYGPATH -u "$windows_path"`
10799    new_path="$unix_path"
10800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10802    new_path="$unix_path"
10803  fi
10804
10805  if test "x$path" != "x$new_path"; then
10806    BOOT_JDK="$new_path"
10807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10809  fi
10810
10811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10813
10814  else
10815    # We're on a posix platform. Hooray! :)
10816    path="$BOOT_JDK"
10817
10818    if test ! -f "$path" && test ! -d "$path"; then
10819      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10820    fi
10821
10822    has_space=`$ECHO "$path" | $GREP " "`
10823    if test "x$has_space" != x; then
10824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10827    fi
10828  fi
10829
10830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10831$as_echo_n "checking for Boot JDK... " >&6; }
10832              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10833$as_echo "$BOOT_JDK" >&6; }
10834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10835$as_echo_n "checking Boot JDK version... " >&6; }
10836              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10838$as_echo "$BOOT_JDK_VERSION" >&6; }
10839            fi # end check jdk version
10840          fi # end check rt.jar
10841        fi # end check javac
10842      fi # end check java
10843    fi # end check boot jdk found
10844  fi
10845
10846if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10847  # Having specified an argument which is incorrect will produce an instant failure;
10848  # we should not go on looking
10849  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10850fi
10851
10852# Test: Is bootjdk available from builddeps?
10853
10854  if test "x$BOOT_JDK_FOUND" = xno; then
10855    # Now execute the test
10856
10857
10858
10859    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10860        # Source the builddeps file again, to make sure it uses the latest variables!
10861        . $builddepsfile
10862        # Look for a target and build machine specific resource!
10863        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10864        if test "x$resource" = x; then
10865            # Ok, lets instead look for a target specific resource
10866            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10867        fi
10868        if test "x$resource" = x; then
10869            # Ok, lets instead look for a build specific resource
10870            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10871        fi
10872        if test "x$resource" = x; then
10873            # Ok, lets instead look for a generic resource
10874            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10875            resource=${builddep_bootjdk}
10876        fi
10877        if test "x$resource" != x; then
10878            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10879$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10880	    # If the resource in the builddeps.conf file is an existing directory,
10881	    # for example /java/linux/cups
10882	    if test -d ${resource}; then
10883	       depdir=${resource}
10884	    else
10885
10886# bootjdk is for example mymodule
10887# $resource is for example libs/general/libmymod_1_2_3.zip
10888# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10889# $with_builddeps_dir is for example /localhome/builddeps
10890# depdir is the name of the variable into which we store the depdir, eg MYMOD
10891# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10892# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10893    filename=`basename $resource`
10894    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10895    filebase=${filename%%.*}
10896    extension=${filename#*.}
10897    installdir=$with_builddeps_dir/$filebase
10898    if test ! -f $installdir/$filename.unpacked; then
10899        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10900$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10901        if test ! -d $installdir; then
10902            mkdir -p $installdir
10903        fi
10904        if test ! -d $installdir; then
10905            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10906        fi
10907        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10908        touch $tmpfile
10909        if test ! -f $tmpfile; then
10910            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10911        fi
10912
10913    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10914    # $tmpfile is the local file name for the downloaded file.
10915    VALID_TOOL=no
10916    if test "x$BDEPS_FTP" = xwget; then
10917       VALID_TOOL=yes
10918       wget -O $tmpfile $with_builddeps_server/$resource
10919    fi
10920    if test "x$BDEPS_FTP" = xlftp; then
10921       VALID_TOOL=yes
10922       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10923    fi
10924    if test "x$BDEPS_FTP" = xftp; then
10925        VALID_TOOL=yes
10926        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10927        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10928        FTPUSERPWD=${FTPSERVER%%@*}
10929        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10930            FTPUSER=${userpwd%%:*}
10931            FTPPWD=${userpwd#*@}
10932            FTPSERVER=${FTPSERVER#*@}
10933        else
10934            FTPUSER=ftp
10935            FTPPWD=ftp
10936        fi
10937        # the "pass" command does not work on some
10938        # ftp clients (read ftp.exe) but if it works,
10939        # passive mode is better!
10940        (\
10941            echo "user $FTPUSER $FTPPWD"        ;\
10942            echo "pass"                         ;\
10943            echo "bin"                          ;\
10944            echo "get $FTPPATH $tmpfile"              ;\
10945        ) | ftp -in $FTPSERVER
10946    fi
10947    if test "x$VALID_TOOL" != xyes; then
10948       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10949    fi
10950
10951        mv $tmpfile $installdir/$filename
10952        if test ! -s $installdir/$filename; then
10953            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10954        fi
10955        case "$extension" in
10956            zip)  echo "Unzipping $installdir/$filename..."
10957               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10958            ;;
10959            tar.gz) echo "Untaring $installdir/$filename..."
10960               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10961            ;;
10962            tgz) echo "Untaring $installdir/$filename..."
10963               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10964            ;;
10965            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10966            ;;
10967        esac
10968    fi
10969    if test -f $installdir/$filename.unpacked; then
10970        depdir=$installdir
10971    fi
10972
10973	    fi
10974            # Source the builddeps file again, because in the previous command, the depdir
10975            # was updated to point at the current build dependency install directory.
10976            . $builddepsfile
10977            # Now extract variables from the builddeps.conf files.
10978            theroot=${builddep_bootjdk_ROOT}
10979            thecflags=${builddep_bootjdk_CFLAGS}
10980            thelibs=${builddep_bootjdk_LIBS}
10981            if test "x$depdir" = x; then
10982                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10983            fi
10984            BOOT_JDK=$depdir
10985            if test "x$theroot" != x; then
10986               BOOT_JDK="$theroot"
10987            fi
10988            if test "x$thecflags" != x; then
10989               BOOT_JDK_CFLAGS="$thecflags"
10990            fi
10991            if test "x$thelibs" != x; then
10992               BOOT_JDK_LIBS="$thelibs"
10993            fi
10994            BOOT_JDK_FOUND=maybe
10995            else BOOT_JDK_FOUND=no
10996
10997        fi
10998        else BOOT_JDK_FOUND=no
10999
11000    fi
11001
11002
11003
11004    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11005    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11006      # Do we have a bin/java?
11007      if test ! -x "$BOOT_JDK/bin/java"; then
11008        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11010        BOOT_JDK_FOUND=no
11011      else
11012        # Do we have a bin/javac?
11013        if test ! -x "$BOOT_JDK/bin/javac"; then
11014          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11016          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11017$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11018          BOOT_JDK_FOUND=no
11019        else
11020          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11021          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11022            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11024            BOOT_JDK_FOUND=no
11025          else
11026            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11027            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11028
11029            # Extra M4 quote needed to protect [] in grep expression.
11030            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11031            if test "x$FOUND_VERSION_78" = x; then
11032              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11034              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11035$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11036              BOOT_JDK_FOUND=no
11037            else
11038              # We're done! :-)
11039              BOOT_JDK_FOUND=yes
11040
11041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11042
11043  # Input might be given as Windows format, start by converting to
11044  # unix format.
11045  path="$BOOT_JDK"
11046  new_path=`$CYGPATH -u "$path"`
11047
11048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11051  # "foo.exe" is OK but "foo" is an error.
11052  #
11053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11054  # It is also a way to make sure we got the proper file name for the real test later on.
11055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11056  if test "x$test_shortpath" = x; then
11057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11060  fi
11061
11062  # Call helper function which possibly converts this using DOS-style short mode.
11063  # If so, the updated path is stored in $new_path.
11064
11065  input_path="$new_path"
11066  # Check if we need to convert this using DOS-style short mode. If the path
11067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11068  # take no chances and rewrite it.
11069  # Note: m4 eats our [], so we need to use [ and ] instead.
11070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11071  if test "x$has_forbidden_chars" != x; then
11072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11076      # Going to short mode and back again did indeed matter. Since short mode is
11077      # case insensitive, let's make it lowercase to improve readability.
11078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11079      # Now convert it back to Unix-stile (cygpath)
11080      input_path=`$CYGPATH -u "$shortmode_path"`
11081      new_path="$input_path"
11082    fi
11083  fi
11084
11085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11086  if test "x$test_cygdrive_prefix" = x; then
11087    # As a simple fix, exclude /usr/bin since it's not a real path.
11088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11090      # a path prefixed by /cygdrive for fixpath to work.
11091      new_path="$CYGWIN_ROOT_PATH$input_path"
11092    fi
11093  fi
11094
11095
11096  if test "x$path" != "x$new_path"; then
11097    BOOT_JDK="$new_path"
11098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11100  fi
11101
11102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11103
11104  path="$BOOT_JDK"
11105  has_colon=`$ECHO $path | $GREP ^.:`
11106  new_path="$path"
11107  if test "x$has_colon" = x; then
11108    # Not in mixed or Windows style, start by that.
11109    new_path=`cmd //c echo $path`
11110  fi
11111
11112
11113  input_path="$new_path"
11114  # Check if we need to convert this using DOS-style short mode. If the path
11115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11116  # take no chances and rewrite it.
11117  # Note: m4 eats our [], so we need to use [ and ] instead.
11118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11119  if test "x$has_forbidden_chars" != x; then
11120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11122  fi
11123
11124
11125  windows_path="$new_path"
11126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11127    unix_path=`$CYGPATH -u "$windows_path"`
11128    new_path="$unix_path"
11129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11131    new_path="$unix_path"
11132  fi
11133
11134  if test "x$path" != "x$new_path"; then
11135    BOOT_JDK="$new_path"
11136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11138  fi
11139
11140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11142
11143  else
11144    # We're on a posix platform. Hooray! :)
11145    path="$BOOT_JDK"
11146
11147    if test ! -f "$path" && test ! -d "$path"; then
11148      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11149    fi
11150
11151    has_space=`$ECHO "$path" | $GREP " "`
11152    if test "x$has_space" != x; then
11153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11155      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11156    fi
11157  fi
11158
11159              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11160$as_echo_n "checking for Boot JDK... " >&6; }
11161              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11162$as_echo "$BOOT_JDK" >&6; }
11163              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11164$as_echo_n "checking Boot JDK version... " >&6; }
11165              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11167$as_echo "$BOOT_JDK_VERSION" >&6; }
11168            fi # end check jdk version
11169          fi # end check rt.jar
11170        fi # end check javac
11171      fi # end check java
11172    fi # end check boot jdk found
11173  fi
11174
11175
11176# Test: Is $JAVA_HOME set?
11177
11178  if test "x$BOOT_JDK_FOUND" = xno; then
11179    # Now execute the test
11180
11181    if test "x$JAVA_HOME" != x; then
11182        JAVA_HOME_PROCESSED="$JAVA_HOME"
11183
11184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11185
11186  # Input might be given as Windows format, start by converting to
11187  # unix format.
11188  path="$JAVA_HOME_PROCESSED"
11189  new_path=`$CYGPATH -u "$path"`
11190
11191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11194  # "foo.exe" is OK but "foo" is an error.
11195  #
11196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11197  # It is also a way to make sure we got the proper file name for the real test later on.
11198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11199  if test "x$test_shortpath" = x; then
11200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11201$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11202    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11203  fi
11204
11205  # Call helper function which possibly converts this using DOS-style short mode.
11206  # If so, the updated path is stored in $new_path.
11207
11208  input_path="$new_path"
11209  # Check if we need to convert this using DOS-style short mode. If the path
11210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11211  # take no chances and rewrite it.
11212  # Note: m4 eats our [], so we need to use [ and ] instead.
11213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11214  if test "x$has_forbidden_chars" != x; then
11215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11219      # Going to short mode and back again did indeed matter. Since short mode is
11220      # case insensitive, let's make it lowercase to improve readability.
11221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11222      # Now convert it back to Unix-stile (cygpath)
11223      input_path=`$CYGPATH -u "$shortmode_path"`
11224      new_path="$input_path"
11225    fi
11226  fi
11227
11228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11229  if test "x$test_cygdrive_prefix" = x; then
11230    # As a simple fix, exclude /usr/bin since it's not a real path.
11231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11233      # a path prefixed by /cygdrive for fixpath to work.
11234      new_path="$CYGWIN_ROOT_PATH$input_path"
11235    fi
11236  fi
11237
11238
11239  if test "x$path" != "x$new_path"; then
11240    JAVA_HOME_PROCESSED="$new_path"
11241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11242$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11243  fi
11244
11245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11246
11247  path="$JAVA_HOME_PROCESSED"
11248  has_colon=`$ECHO $path | $GREP ^.:`
11249  new_path="$path"
11250  if test "x$has_colon" = x; then
11251    # Not in mixed or Windows style, start by that.
11252    new_path=`cmd //c echo $path`
11253  fi
11254
11255
11256  input_path="$new_path"
11257  # Check if we need to convert this using DOS-style short mode. If the path
11258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11259  # take no chances and rewrite it.
11260  # Note: m4 eats our [], so we need to use [ and ] instead.
11261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11262  if test "x$has_forbidden_chars" != x; then
11263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11265  fi
11266
11267
11268  windows_path="$new_path"
11269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11270    unix_path=`$CYGPATH -u "$windows_path"`
11271    new_path="$unix_path"
11272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11274    new_path="$unix_path"
11275  fi
11276
11277  if test "x$path" != "x$new_path"; then
11278    JAVA_HOME_PROCESSED="$new_path"
11279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11280$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11281  fi
11282
11283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11285
11286  else
11287    # We're on a posix platform. Hooray! :)
11288    path="$JAVA_HOME_PROCESSED"
11289
11290    if test ! -f "$path" && test ! -d "$path"; then
11291      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11292    fi
11293
11294    has_space=`$ECHO "$path" | $GREP " "`
11295    if test "x$has_space" != x; then
11296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11297$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11299    fi
11300  fi
11301
11302        if test ! -d "$JAVA_HOME_PROCESSED"; then
11303            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11304$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11305        else
11306          # Aha, the user has set a JAVA_HOME
11307          # let us use that as the Boot JDK.
11308          BOOT_JDK="$JAVA_HOME_PROCESSED"
11309          BOOT_JDK_FOUND=maybe
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11311$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11312        fi
11313    fi
11314
11315
11316    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11317    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11318      # Do we have a bin/java?
11319      if test ! -x "$BOOT_JDK/bin/java"; then
11320        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11322        BOOT_JDK_FOUND=no
11323      else
11324        # Do we have a bin/javac?
11325        if test ! -x "$BOOT_JDK/bin/javac"; then
11326          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11328          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11329$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11330          BOOT_JDK_FOUND=no
11331        else
11332          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11333          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11336            BOOT_JDK_FOUND=no
11337          else
11338            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11340
11341            # Extra M4 quote needed to protect [] in grep expression.
11342            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11343            if test "x$FOUND_VERSION_78" = x; then
11344              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11346              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11347$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11348              BOOT_JDK_FOUND=no
11349            else
11350              # We're done! :-)
11351              BOOT_JDK_FOUND=yes
11352
11353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11354
11355  # Input might be given as Windows format, start by converting to
11356  # unix format.
11357  path="$BOOT_JDK"
11358  new_path=`$CYGPATH -u "$path"`
11359
11360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11363  # "foo.exe" is OK but "foo" is an error.
11364  #
11365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11366  # It is also a way to make sure we got the proper file name for the real test later on.
11367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11368  if test "x$test_shortpath" = x; then
11369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11372  fi
11373
11374  # Call helper function which possibly converts this using DOS-style short mode.
11375  # If so, the updated path is stored in $new_path.
11376
11377  input_path="$new_path"
11378  # Check if we need to convert this using DOS-style short mode. If the path
11379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11380  # take no chances and rewrite it.
11381  # Note: m4 eats our [], so we need to use [ and ] instead.
11382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11383  if test "x$has_forbidden_chars" != x; then
11384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11388      # Going to short mode and back again did indeed matter. Since short mode is
11389      # case insensitive, let's make it lowercase to improve readability.
11390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11391      # Now convert it back to Unix-stile (cygpath)
11392      input_path=`$CYGPATH -u "$shortmode_path"`
11393      new_path="$input_path"
11394    fi
11395  fi
11396
11397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11398  if test "x$test_cygdrive_prefix" = x; then
11399    # As a simple fix, exclude /usr/bin since it's not a real path.
11400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11402      # a path prefixed by /cygdrive for fixpath to work.
11403      new_path="$CYGWIN_ROOT_PATH$input_path"
11404    fi
11405  fi
11406
11407
11408  if test "x$path" != "x$new_path"; then
11409    BOOT_JDK="$new_path"
11410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11412  fi
11413
11414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11415
11416  path="$BOOT_JDK"
11417  has_colon=`$ECHO $path | $GREP ^.:`
11418  new_path="$path"
11419  if test "x$has_colon" = x; then
11420    # Not in mixed or Windows style, start by that.
11421    new_path=`cmd //c echo $path`
11422  fi
11423
11424
11425  input_path="$new_path"
11426  # Check if we need to convert this using DOS-style short mode. If the path
11427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11428  # take no chances and rewrite it.
11429  # Note: m4 eats our [], so we need to use [ and ] instead.
11430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11431  if test "x$has_forbidden_chars" != x; then
11432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11434  fi
11435
11436
11437  windows_path="$new_path"
11438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11439    unix_path=`$CYGPATH -u "$windows_path"`
11440    new_path="$unix_path"
11441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11443    new_path="$unix_path"
11444  fi
11445
11446  if test "x$path" != "x$new_path"; then
11447    BOOT_JDK="$new_path"
11448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11450  fi
11451
11452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11454
11455  else
11456    # We're on a posix platform. Hooray! :)
11457    path="$BOOT_JDK"
11458
11459    if test ! -f "$path" && test ! -d "$path"; then
11460      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11461    fi
11462
11463    has_space=`$ECHO "$path" | $GREP " "`
11464    if test "x$has_space" != x; then
11465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11467      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11468    fi
11469  fi
11470
11471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11472$as_echo_n "checking for Boot JDK... " >&6; }
11473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11474$as_echo "$BOOT_JDK" >&6; }
11475              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11476$as_echo_n "checking Boot JDK version... " >&6; }
11477              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11479$as_echo "$BOOT_JDK_VERSION" >&6; }
11480            fi # end check jdk version
11481          fi # end check rt.jar
11482        fi # end check javac
11483      fi # end check java
11484    fi # end check boot jdk found
11485  fi
11486
11487
11488# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11489
11490  if test "x$BOOT_JDK_FOUND" = xno; then
11491    # Now execute the test
11492
11493    if test -x /usr/libexec/java_home; then
11494        BOOT_JDK=`/usr/libexec/java_home`
11495        BOOT_JDK_FOUND=maybe
11496        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11497$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11498    fi
11499
11500
11501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11503      # Do we have a bin/java?
11504      if test ! -x "$BOOT_JDK/bin/java"; then
11505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11507        BOOT_JDK_FOUND=no
11508      else
11509        # Do we have a bin/javac?
11510        if test ! -x "$BOOT_JDK/bin/javac"; then
11511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11515          BOOT_JDK_FOUND=no
11516        else
11517          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11518          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11519            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11521            BOOT_JDK_FOUND=no
11522          else
11523            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11524            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11525
11526            # Extra M4 quote needed to protect [] in grep expression.
11527            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11528            if test "x$FOUND_VERSION_78" = x; then
11529              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11531              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11532$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11533              BOOT_JDK_FOUND=no
11534            else
11535              # We're done! :-)
11536              BOOT_JDK_FOUND=yes
11537
11538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11539
11540  # Input might be given as Windows format, start by converting to
11541  # unix format.
11542  path="$BOOT_JDK"
11543  new_path=`$CYGPATH -u "$path"`
11544
11545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11548  # "foo.exe" is OK but "foo" is an error.
11549  #
11550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11551  # It is also a way to make sure we got the proper file name for the real test later on.
11552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11553  if test "x$test_shortpath" = x; then
11554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11556    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11557  fi
11558
11559  # Call helper function which possibly converts this using DOS-style short mode.
11560  # If so, the updated path is stored in $new_path.
11561
11562  input_path="$new_path"
11563  # Check if we need to convert this using DOS-style short mode. If the path
11564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11565  # take no chances and rewrite it.
11566  # Note: m4 eats our [], so we need to use [ and ] instead.
11567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11568  if test "x$has_forbidden_chars" != x; then
11569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11573      # Going to short mode and back again did indeed matter. Since short mode is
11574      # case insensitive, let's make it lowercase to improve readability.
11575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11576      # Now convert it back to Unix-stile (cygpath)
11577      input_path=`$CYGPATH -u "$shortmode_path"`
11578      new_path="$input_path"
11579    fi
11580  fi
11581
11582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11583  if test "x$test_cygdrive_prefix" = x; then
11584    # As a simple fix, exclude /usr/bin since it's not a real path.
11585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11587      # a path prefixed by /cygdrive for fixpath to work.
11588      new_path="$CYGWIN_ROOT_PATH$input_path"
11589    fi
11590  fi
11591
11592
11593  if test "x$path" != "x$new_path"; then
11594    BOOT_JDK="$new_path"
11595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11597  fi
11598
11599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11600
11601  path="$BOOT_JDK"
11602  has_colon=`$ECHO $path | $GREP ^.:`
11603  new_path="$path"
11604  if test "x$has_colon" = x; then
11605    # Not in mixed or Windows style, start by that.
11606    new_path=`cmd //c echo $path`
11607  fi
11608
11609
11610  input_path="$new_path"
11611  # Check if we need to convert this using DOS-style short mode. If the path
11612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11613  # take no chances and rewrite it.
11614  # Note: m4 eats our [], so we need to use [ and ] instead.
11615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11616  if test "x$has_forbidden_chars" != x; then
11617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11619  fi
11620
11621
11622  windows_path="$new_path"
11623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11624    unix_path=`$CYGPATH -u "$windows_path"`
11625    new_path="$unix_path"
11626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11628    new_path="$unix_path"
11629  fi
11630
11631  if test "x$path" != "x$new_path"; then
11632    BOOT_JDK="$new_path"
11633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11635  fi
11636
11637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11639
11640  else
11641    # We're on a posix platform. Hooray! :)
11642    path="$BOOT_JDK"
11643
11644    if test ! -f "$path" && test ! -d "$path"; then
11645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11646    fi
11647
11648    has_space=`$ECHO "$path" | $GREP " "`
11649    if test "x$has_space" != x; then
11650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11652      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11653    fi
11654  fi
11655
11656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11657$as_echo_n "checking for Boot JDK... " >&6; }
11658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11659$as_echo "$BOOT_JDK" >&6; }
11660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11661$as_echo_n "checking Boot JDK version... " >&6; }
11662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11664$as_echo "$BOOT_JDK_VERSION" >&6; }
11665            fi # end check jdk version
11666          fi # end check rt.jar
11667        fi # end check javac
11668      fi # end check java
11669    fi # end check boot jdk found
11670  fi
11671
11672
11673# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11674
11675  if test "x$BOOT_JDK_FOUND" = xno; then
11676    # Now execute the test
11677
11678    # Extract the first word of "javac", so it can be a program name with args.
11679set dummy javac; ac_word=$2
11680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11681$as_echo_n "checking for $ac_word... " >&6; }
11682if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11683  $as_echo_n "(cached) " >&6
11684else
11685  case $JAVAC_CHECK in
11686  [\\/]* | ?:[\\/]*)
11687  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11688  ;;
11689  *)
11690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11691for as_dir in $PATH
11692do
11693  IFS=$as_save_IFS
11694  test -z "$as_dir" && as_dir=.
11695    for ac_exec_ext in '' $ac_executable_extensions; do
11696  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11697    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11699    break 2
11700  fi
11701done
11702  done
11703IFS=$as_save_IFS
11704
11705  ;;
11706esac
11707fi
11708JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11709if test -n "$JAVAC_CHECK"; then
11710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11711$as_echo "$JAVAC_CHECK" >&6; }
11712else
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
11715fi
11716
11717
11718    # Extract the first word of "java", so it can be a program name with args.
11719set dummy java; ac_word=$2
11720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11721$as_echo_n "checking for $ac_word... " >&6; }
11722if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11723  $as_echo_n "(cached) " >&6
11724else
11725  case $JAVA_CHECK in
11726  [\\/]* | ?:[\\/]*)
11727  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11728  ;;
11729  *)
11730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11731for as_dir in $PATH
11732do
11733  IFS=$as_save_IFS
11734  test -z "$as_dir" && as_dir=.
11735    for ac_exec_ext in '' $ac_executable_extensions; do
11736  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11737    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11739    break 2
11740  fi
11741done
11742  done
11743IFS=$as_save_IFS
11744
11745  ;;
11746esac
11747fi
11748JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11749if test -n "$JAVA_CHECK"; then
11750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11751$as_echo "$JAVA_CHECK" >&6; }
11752else
11753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754$as_echo "no" >&6; }
11755fi
11756
11757
11758    BINARY="$JAVAC_CHECK"
11759    if test "x$JAVAC_CHECK" = x; then
11760        BINARY="$JAVA_CHECK"
11761    fi
11762    if test "x$BINARY" != x; then
11763        # So there is a java(c) binary, it might be part of a JDK.
11764        # Lets find the JDK/JRE directory by following symbolic links.
11765        # Linux/GNU systems often have links from /usr/bin/java to
11766        # /etc/alternatives/java to the real JDK binary.
11767
11768    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11769        # Follow a chain of symbolic links. Use readlink
11770        # where it exists, else fall back to horribly
11771        # complicated shell code.
11772        if test "x$READLINK_TESTED" != yes; then
11773            # On MacOSX there is a readlink tool with a different
11774            # purpose than the GNU readlink tool. Check the found readlink.
11775            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11776            if test "x$ISGNU" = x; then
11777                 # A readlink that we do not know how to use.
11778                 # Are there other non-GNU readlinks out there?
11779                 READLINK_TESTED=yes
11780                 READLINK=
11781            fi
11782        fi
11783
11784        if test "x$READLINK" != x; then
11785            BINARY=`$READLINK -f $BINARY`
11786        else
11787            # Save the current directory for restoring afterwards
11788            STARTDIR=$PWD
11789            COUNTER=0
11790            sym_link_dir=`$DIRNAME $BINARY`
11791            sym_link_file=`$BASENAME $BINARY`
11792            # Use the system pwd and not the shell builtin to resolve directory symlinks
11793            cd $sym_link_dir
11794            cd `$THEPWDCMD`
11795            sym_link_dir=`$THEPWDCMD`
11796            # Resolve file symlinks
11797            while test $COUNTER -lt 20; do
11798                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11799                if test "x$ISLINK" == x; then
11800                    # This is not a symbolic link! We are done!
11801                    break
11802                fi
11803                # Again resolve directory symlinks since the target of the just found
11804                # link could be in a different directory
11805                cd `$DIRNAME $ISLINK`
11806                sym_link_dir=`$THEPWDCMD`
11807                sym_link_file=`$BASENAME $ISLINK`
11808                let COUNTER=COUNTER+1
11809            done
11810            cd $STARTDIR
11811            BINARY=$sym_link_dir/$sym_link_file
11812        fi
11813    fi
11814
11815        BOOT_JDK=`dirname "$BINARY"`
11816        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11817        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11818            # Looks like we found ourselves an JDK
11819            BOOT_JDK_FOUND=maybe
11820            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11821$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11822        fi
11823    fi
11824
11825
11826    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11827    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11828      # Do we have a bin/java?
11829      if test ! -x "$BOOT_JDK/bin/java"; then
11830        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11832        BOOT_JDK_FOUND=no
11833      else
11834        # Do we have a bin/javac?
11835        if test ! -x "$BOOT_JDK/bin/javac"; then
11836          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11838          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11839$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11840          BOOT_JDK_FOUND=no
11841        else
11842          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11843          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11844            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11846            BOOT_JDK_FOUND=no
11847          else
11848            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11850
11851            # Extra M4 quote needed to protect [] in grep expression.
11852            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11853            if test "x$FOUND_VERSION_78" = x; then
11854              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11856              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11857$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11858              BOOT_JDK_FOUND=no
11859            else
11860              # We're done! :-)
11861              BOOT_JDK_FOUND=yes
11862
11863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11864
11865  # Input might be given as Windows format, start by converting to
11866  # unix format.
11867  path="$BOOT_JDK"
11868  new_path=`$CYGPATH -u "$path"`
11869
11870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11873  # "foo.exe" is OK but "foo" is an error.
11874  #
11875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11876  # It is also a way to make sure we got the proper file name for the real test later on.
11877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11878  if test "x$test_shortpath" = x; then
11879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11880$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11881    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11882  fi
11883
11884  # Call helper function which possibly converts this using DOS-style short mode.
11885  # If so, the updated path is stored in $new_path.
11886
11887  input_path="$new_path"
11888  # Check if we need to convert this using DOS-style short mode. If the path
11889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11890  # take no chances and rewrite it.
11891  # Note: m4 eats our [], so we need to use [ and ] instead.
11892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11893  if test "x$has_forbidden_chars" != x; then
11894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11898      # Going to short mode and back again did indeed matter. Since short mode is
11899      # case insensitive, let's make it lowercase to improve readability.
11900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11901      # Now convert it back to Unix-stile (cygpath)
11902      input_path=`$CYGPATH -u "$shortmode_path"`
11903      new_path="$input_path"
11904    fi
11905  fi
11906
11907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11908  if test "x$test_cygdrive_prefix" = x; then
11909    # As a simple fix, exclude /usr/bin since it's not a real path.
11910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11912      # a path prefixed by /cygdrive for fixpath to work.
11913      new_path="$CYGWIN_ROOT_PATH$input_path"
11914    fi
11915  fi
11916
11917
11918  if test "x$path" != "x$new_path"; then
11919    BOOT_JDK="$new_path"
11920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11922  fi
11923
11924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11925
11926  path="$BOOT_JDK"
11927  has_colon=`$ECHO $path | $GREP ^.:`
11928  new_path="$path"
11929  if test "x$has_colon" = x; then
11930    # Not in mixed or Windows style, start by that.
11931    new_path=`cmd //c echo $path`
11932  fi
11933
11934
11935  input_path="$new_path"
11936  # Check if we need to convert this using DOS-style short mode. If the path
11937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11938  # take no chances and rewrite it.
11939  # Note: m4 eats our [], so we need to use [ and ] instead.
11940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11941  if test "x$has_forbidden_chars" != x; then
11942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11944  fi
11945
11946
11947  windows_path="$new_path"
11948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11949    unix_path=`$CYGPATH -u "$windows_path"`
11950    new_path="$unix_path"
11951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11953    new_path="$unix_path"
11954  fi
11955
11956  if test "x$path" != "x$new_path"; then
11957    BOOT_JDK="$new_path"
11958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11960  fi
11961
11962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11964
11965  else
11966    # We're on a posix platform. Hooray! :)
11967    path="$BOOT_JDK"
11968
11969    if test ! -f "$path" && test ! -d "$path"; then
11970      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11971    fi
11972
11973    has_space=`$ECHO "$path" | $GREP " "`
11974    if test "x$has_space" != x; then
11975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11977      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11978    fi
11979  fi
11980
11981              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11982$as_echo_n "checking for Boot JDK... " >&6; }
11983              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11984$as_echo "$BOOT_JDK" >&6; }
11985              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11986$as_echo_n "checking Boot JDK version... " >&6; }
11987              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11988              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11989$as_echo "$BOOT_JDK_VERSION" >&6; }
11990            fi # end check jdk version
11991          fi # end check rt.jar
11992        fi # end check javac
11993      fi # end check java
11994    fi # end check boot jdk found
11995  fi
11996
11997
11998# Test: Is there a JDK installed in default, well-known locations?
11999
12000  if test "x$BOOT_JDK_FOUND" = xno; then
12001    # Now execute the test
12002
12003  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12004
12005  if test "x$BOOT_JDK_FOUND" = xno; then
12006    # Now execute the test
12007
12008  if test "x$ProgramW6432" != x; then
12009    VIRTUAL_DIR="$ProgramW6432/Java"
12010
12011  windows_path="$VIRTUAL_DIR"
12012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12013    unix_path=`$CYGPATH -u "$windows_path"`
12014    VIRTUAL_DIR="$unix_path"
12015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12017    VIRTUAL_DIR="$unix_path"
12018  fi
12019
12020
12021  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12022  BOOT_JDK_SUFFIX=""
12023  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12024  if test "x$ALL_JDKS_FOUND" != x; then
12025    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12026
12027  if test "x$BOOT_JDK_FOUND" = xno; then
12028    # Now execute the test
12029
12030        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12031        if test -d "$BOOT_JDK"; then
12032          BOOT_JDK_FOUND=maybe
12033          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12034$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12035        fi
12036
12037
12038    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12039    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12040      # Do we have a bin/java?
12041      if test ! -x "$BOOT_JDK/bin/java"; then
12042        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12044        BOOT_JDK_FOUND=no
12045      else
12046        # Do we have a bin/javac?
12047        if test ! -x "$BOOT_JDK/bin/javac"; then
12048          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12050          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12051$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12052          BOOT_JDK_FOUND=no
12053        else
12054          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12055          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12056            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12058            BOOT_JDK_FOUND=no
12059          else
12060            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12062
12063            # Extra M4 quote needed to protect [] in grep expression.
12064            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12065            if test "x$FOUND_VERSION_78" = x; then
12066              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12068              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12069$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12070              BOOT_JDK_FOUND=no
12071            else
12072              # We're done! :-)
12073              BOOT_JDK_FOUND=yes
12074
12075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12076
12077  # Input might be given as Windows format, start by converting to
12078  # unix format.
12079  path="$BOOT_JDK"
12080  new_path=`$CYGPATH -u "$path"`
12081
12082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12085  # "foo.exe" is OK but "foo" is an error.
12086  #
12087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12088  # It is also a way to make sure we got the proper file name for the real test later on.
12089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12090  if test "x$test_shortpath" = x; then
12091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12093    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12094  fi
12095
12096  # Call helper function which possibly converts this using DOS-style short mode.
12097  # If so, the updated path is stored in $new_path.
12098
12099  input_path="$new_path"
12100  # Check if we need to convert this using DOS-style short mode. If the path
12101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12102  # take no chances and rewrite it.
12103  # Note: m4 eats our [], so we need to use [ and ] instead.
12104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12105  if test "x$has_forbidden_chars" != x; then
12106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12110      # Going to short mode and back again did indeed matter. Since short mode is
12111      # case insensitive, let's make it lowercase to improve readability.
12112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12113      # Now convert it back to Unix-stile (cygpath)
12114      input_path=`$CYGPATH -u "$shortmode_path"`
12115      new_path="$input_path"
12116    fi
12117  fi
12118
12119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12120  if test "x$test_cygdrive_prefix" = x; then
12121    # As a simple fix, exclude /usr/bin since it's not a real path.
12122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12124      # a path prefixed by /cygdrive for fixpath to work.
12125      new_path="$CYGWIN_ROOT_PATH$input_path"
12126    fi
12127  fi
12128
12129
12130  if test "x$path" != "x$new_path"; then
12131    BOOT_JDK="$new_path"
12132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12134  fi
12135
12136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12137
12138  path="$BOOT_JDK"
12139  has_colon=`$ECHO $path | $GREP ^.:`
12140  new_path="$path"
12141  if test "x$has_colon" = x; then
12142    # Not in mixed or Windows style, start by that.
12143    new_path=`cmd //c echo $path`
12144  fi
12145
12146
12147  input_path="$new_path"
12148  # Check if we need to convert this using DOS-style short mode. If the path
12149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12150  # take no chances and rewrite it.
12151  # Note: m4 eats our [], so we need to use [ and ] instead.
12152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12153  if test "x$has_forbidden_chars" != x; then
12154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12156  fi
12157
12158
12159  windows_path="$new_path"
12160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12161    unix_path=`$CYGPATH -u "$windows_path"`
12162    new_path="$unix_path"
12163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12165    new_path="$unix_path"
12166  fi
12167
12168  if test "x$path" != "x$new_path"; then
12169    BOOT_JDK="$new_path"
12170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12172  fi
12173
12174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12176
12177  else
12178    # We're on a posix platform. Hooray! :)
12179    path="$BOOT_JDK"
12180
12181    if test ! -f "$path" && test ! -d "$path"; then
12182      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12183    fi
12184
12185    has_space=`$ECHO "$path" | $GREP " "`
12186    if test "x$has_space" != x; then
12187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12189      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12190    fi
12191  fi
12192
12193              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12194$as_echo_n "checking for Boot JDK... " >&6; }
12195              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12196$as_echo "$BOOT_JDK" >&6; }
12197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12198$as_echo_n "checking Boot JDK version... " >&6; }
12199              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12201$as_echo "$BOOT_JDK_VERSION" >&6; }
12202            fi # end check jdk version
12203          fi # end check rt.jar
12204        fi # end check javac
12205      fi # end check java
12206    fi # end check boot jdk found
12207  fi
12208
12209    done
12210  fi
12211
12212  fi
12213
12214
12215    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12216    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12217      # Do we have a bin/java?
12218      if test ! -x "$BOOT_JDK/bin/java"; then
12219        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12221        BOOT_JDK_FOUND=no
12222      else
12223        # Do we have a bin/javac?
12224        if test ! -x "$BOOT_JDK/bin/javac"; then
12225          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12227          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12228$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12229          BOOT_JDK_FOUND=no
12230        else
12231          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12232          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12233            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12235            BOOT_JDK_FOUND=no
12236          else
12237            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12239
12240            # Extra M4 quote needed to protect [] in grep expression.
12241            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12242            if test "x$FOUND_VERSION_78" = x; then
12243              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12245              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12246$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12247              BOOT_JDK_FOUND=no
12248            else
12249              # We're done! :-)
12250              BOOT_JDK_FOUND=yes
12251
12252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12253
12254  # Input might be given as Windows format, start by converting to
12255  # unix format.
12256  path="$BOOT_JDK"
12257  new_path=`$CYGPATH -u "$path"`
12258
12259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12262  # "foo.exe" is OK but "foo" is an error.
12263  #
12264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12265  # It is also a way to make sure we got the proper file name for the real test later on.
12266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12267  if test "x$test_shortpath" = x; then
12268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12271  fi
12272
12273  # Call helper function which possibly converts this using DOS-style short mode.
12274  # If so, the updated path is stored in $new_path.
12275
12276  input_path="$new_path"
12277  # Check if we need to convert this using DOS-style short mode. If the path
12278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12279  # take no chances and rewrite it.
12280  # Note: m4 eats our [], so we need to use [ and ] instead.
12281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12282  if test "x$has_forbidden_chars" != x; then
12283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12287      # Going to short mode and back again did indeed matter. Since short mode is
12288      # case insensitive, let's make it lowercase to improve readability.
12289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12290      # Now convert it back to Unix-stile (cygpath)
12291      input_path=`$CYGPATH -u "$shortmode_path"`
12292      new_path="$input_path"
12293    fi
12294  fi
12295
12296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12297  if test "x$test_cygdrive_prefix" = x; then
12298    # As a simple fix, exclude /usr/bin since it's not a real path.
12299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12301      # a path prefixed by /cygdrive for fixpath to work.
12302      new_path="$CYGWIN_ROOT_PATH$input_path"
12303    fi
12304  fi
12305
12306
12307  if test "x$path" != "x$new_path"; then
12308    BOOT_JDK="$new_path"
12309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12311  fi
12312
12313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12314
12315  path="$BOOT_JDK"
12316  has_colon=`$ECHO $path | $GREP ^.:`
12317  new_path="$path"
12318  if test "x$has_colon" = x; then
12319    # Not in mixed or Windows style, start by that.
12320    new_path=`cmd //c echo $path`
12321  fi
12322
12323
12324  input_path="$new_path"
12325  # Check if we need to convert this using DOS-style short mode. If the path
12326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12327  # take no chances and rewrite it.
12328  # Note: m4 eats our [], so we need to use [ and ] instead.
12329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12330  if test "x$has_forbidden_chars" != x; then
12331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12333  fi
12334
12335
12336  windows_path="$new_path"
12337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12338    unix_path=`$CYGPATH -u "$windows_path"`
12339    new_path="$unix_path"
12340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12342    new_path="$unix_path"
12343  fi
12344
12345  if test "x$path" != "x$new_path"; then
12346    BOOT_JDK="$new_path"
12347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12349  fi
12350
12351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12353
12354  else
12355    # We're on a posix platform. Hooray! :)
12356    path="$BOOT_JDK"
12357
12358    if test ! -f "$path" && test ! -d "$path"; then
12359      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12360    fi
12361
12362    has_space=`$ECHO "$path" | $GREP " "`
12363    if test "x$has_space" != x; then
12364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12366      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12367    fi
12368  fi
12369
12370              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12371$as_echo_n "checking for Boot JDK... " >&6; }
12372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12373$as_echo "$BOOT_JDK" >&6; }
12374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12375$as_echo_n "checking Boot JDK version... " >&6; }
12376              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12377              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12378$as_echo "$BOOT_JDK_VERSION" >&6; }
12379            fi # end check jdk version
12380          fi # end check rt.jar
12381        fi # end check javac
12382      fi # end check java
12383    fi # end check boot jdk found
12384  fi
12385
12386
12387  if test "x$BOOT_JDK_FOUND" = xno; then
12388    # Now execute the test
12389
12390  if test "x$PROGRAMW6432" != x; then
12391    VIRTUAL_DIR="$PROGRAMW6432/Java"
12392
12393  windows_path="$VIRTUAL_DIR"
12394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12395    unix_path=`$CYGPATH -u "$windows_path"`
12396    VIRTUAL_DIR="$unix_path"
12397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12399    VIRTUAL_DIR="$unix_path"
12400  fi
12401
12402
12403  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12404  BOOT_JDK_SUFFIX=""
12405  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12406  if test "x$ALL_JDKS_FOUND" != x; then
12407    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12408
12409  if test "x$BOOT_JDK_FOUND" = xno; then
12410    # Now execute the test
12411
12412        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12413        if test -d "$BOOT_JDK"; then
12414          BOOT_JDK_FOUND=maybe
12415          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12416$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12417        fi
12418
12419
12420    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12421    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12422      # Do we have a bin/java?
12423      if test ! -x "$BOOT_JDK/bin/java"; then
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12426        BOOT_JDK_FOUND=no
12427      else
12428        # Do we have a bin/javac?
12429        if test ! -x "$BOOT_JDK/bin/javac"; then
12430          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12432          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12433$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12434          BOOT_JDK_FOUND=no
12435        else
12436          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12437          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12438            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12440            BOOT_JDK_FOUND=no
12441          else
12442            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12443            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12444
12445            # Extra M4 quote needed to protect [] in grep expression.
12446            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12447            if test "x$FOUND_VERSION_78" = x; then
12448              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12450              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12451$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12452              BOOT_JDK_FOUND=no
12453            else
12454              # We're done! :-)
12455              BOOT_JDK_FOUND=yes
12456
12457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12458
12459  # Input might be given as Windows format, start by converting to
12460  # unix format.
12461  path="$BOOT_JDK"
12462  new_path=`$CYGPATH -u "$path"`
12463
12464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12467  # "foo.exe" is OK but "foo" is an error.
12468  #
12469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12470  # It is also a way to make sure we got the proper file name for the real test later on.
12471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12472  if test "x$test_shortpath" = x; then
12473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12476  fi
12477
12478  # Call helper function which possibly converts this using DOS-style short mode.
12479  # If so, the updated path is stored in $new_path.
12480
12481  input_path="$new_path"
12482  # Check if we need to convert this using DOS-style short mode. If the path
12483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12484  # take no chances and rewrite it.
12485  # Note: m4 eats our [], so we need to use [ and ] instead.
12486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12487  if test "x$has_forbidden_chars" != x; then
12488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12492      # Going to short mode and back again did indeed matter. Since short mode is
12493      # case insensitive, let's make it lowercase to improve readability.
12494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12495      # Now convert it back to Unix-stile (cygpath)
12496      input_path=`$CYGPATH -u "$shortmode_path"`
12497      new_path="$input_path"
12498    fi
12499  fi
12500
12501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12502  if test "x$test_cygdrive_prefix" = x; then
12503    # As a simple fix, exclude /usr/bin since it's not a real path.
12504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12506      # a path prefixed by /cygdrive for fixpath to work.
12507      new_path="$CYGWIN_ROOT_PATH$input_path"
12508    fi
12509  fi
12510
12511
12512  if test "x$path" != "x$new_path"; then
12513    BOOT_JDK="$new_path"
12514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12516  fi
12517
12518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12519
12520  path="$BOOT_JDK"
12521  has_colon=`$ECHO $path | $GREP ^.:`
12522  new_path="$path"
12523  if test "x$has_colon" = x; then
12524    # Not in mixed or Windows style, start by that.
12525    new_path=`cmd //c echo $path`
12526  fi
12527
12528
12529  input_path="$new_path"
12530  # Check if we need to convert this using DOS-style short mode. If the path
12531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12532  # take no chances and rewrite it.
12533  # Note: m4 eats our [], so we need to use [ and ] instead.
12534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12535  if test "x$has_forbidden_chars" != x; then
12536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12538  fi
12539
12540
12541  windows_path="$new_path"
12542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12543    unix_path=`$CYGPATH -u "$windows_path"`
12544    new_path="$unix_path"
12545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12547    new_path="$unix_path"
12548  fi
12549
12550  if test "x$path" != "x$new_path"; then
12551    BOOT_JDK="$new_path"
12552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12554  fi
12555
12556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12558
12559  else
12560    # We're on a posix platform. Hooray! :)
12561    path="$BOOT_JDK"
12562
12563    if test ! -f "$path" && test ! -d "$path"; then
12564      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12565    fi
12566
12567    has_space=`$ECHO "$path" | $GREP " "`
12568    if test "x$has_space" != x; then
12569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12570$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12571      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12572    fi
12573  fi
12574
12575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12576$as_echo_n "checking for Boot JDK... " >&6; }
12577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12578$as_echo "$BOOT_JDK" >&6; }
12579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12580$as_echo_n "checking Boot JDK version... " >&6; }
12581              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12583$as_echo "$BOOT_JDK_VERSION" >&6; }
12584            fi # end check jdk version
12585          fi # end check rt.jar
12586        fi # end check javac
12587      fi # end check java
12588    fi # end check boot jdk found
12589  fi
12590
12591    done
12592  fi
12593
12594  fi
12595
12596
12597    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12598    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12599      # Do we have a bin/java?
12600      if test ! -x "$BOOT_JDK/bin/java"; then
12601        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12603        BOOT_JDK_FOUND=no
12604      else
12605        # Do we have a bin/javac?
12606        if test ! -x "$BOOT_JDK/bin/javac"; then
12607          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12609          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12610$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12611          BOOT_JDK_FOUND=no
12612        else
12613          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12614          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12617            BOOT_JDK_FOUND=no
12618          else
12619            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12620            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12621
12622            # Extra M4 quote needed to protect [] in grep expression.
12623            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12624            if test "x$FOUND_VERSION_78" = x; then
12625              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12627              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12628$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12629              BOOT_JDK_FOUND=no
12630            else
12631              # We're done! :-)
12632              BOOT_JDK_FOUND=yes
12633
12634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12635
12636  # Input might be given as Windows format, start by converting to
12637  # unix format.
12638  path="$BOOT_JDK"
12639  new_path=`$CYGPATH -u "$path"`
12640
12641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12644  # "foo.exe" is OK but "foo" is an error.
12645  #
12646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12647  # It is also a way to make sure we got the proper file name for the real test later on.
12648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12649  if test "x$test_shortpath" = x; then
12650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12652    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12653  fi
12654
12655  # Call helper function which possibly converts this using DOS-style short mode.
12656  # If so, the updated path is stored in $new_path.
12657
12658  input_path="$new_path"
12659  # Check if we need to convert this using DOS-style short mode. If the path
12660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12661  # take no chances and rewrite it.
12662  # Note: m4 eats our [], so we need to use [ and ] instead.
12663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12664  if test "x$has_forbidden_chars" != x; then
12665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12669      # Going to short mode and back again did indeed matter. Since short mode is
12670      # case insensitive, let's make it lowercase to improve readability.
12671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12672      # Now convert it back to Unix-stile (cygpath)
12673      input_path=`$CYGPATH -u "$shortmode_path"`
12674      new_path="$input_path"
12675    fi
12676  fi
12677
12678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12679  if test "x$test_cygdrive_prefix" = x; then
12680    # As a simple fix, exclude /usr/bin since it's not a real path.
12681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12683      # a path prefixed by /cygdrive for fixpath to work.
12684      new_path="$CYGWIN_ROOT_PATH$input_path"
12685    fi
12686  fi
12687
12688
12689  if test "x$path" != "x$new_path"; then
12690    BOOT_JDK="$new_path"
12691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12693  fi
12694
12695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12696
12697  path="$BOOT_JDK"
12698  has_colon=`$ECHO $path | $GREP ^.:`
12699  new_path="$path"
12700  if test "x$has_colon" = x; then
12701    # Not in mixed or Windows style, start by that.
12702    new_path=`cmd //c echo $path`
12703  fi
12704
12705
12706  input_path="$new_path"
12707  # Check if we need to convert this using DOS-style short mode. If the path
12708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12709  # take no chances and rewrite it.
12710  # Note: m4 eats our [], so we need to use [ and ] instead.
12711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12712  if test "x$has_forbidden_chars" != x; then
12713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12715  fi
12716
12717
12718  windows_path="$new_path"
12719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12720    unix_path=`$CYGPATH -u "$windows_path"`
12721    new_path="$unix_path"
12722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12724    new_path="$unix_path"
12725  fi
12726
12727  if test "x$path" != "x$new_path"; then
12728    BOOT_JDK="$new_path"
12729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12731  fi
12732
12733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12735
12736  else
12737    # We're on a posix platform. Hooray! :)
12738    path="$BOOT_JDK"
12739
12740    if test ! -f "$path" && test ! -d "$path"; then
12741      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12742    fi
12743
12744    has_space=`$ECHO "$path" | $GREP " "`
12745    if test "x$has_space" != x; then
12746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12749    fi
12750  fi
12751
12752              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12753$as_echo_n "checking for Boot JDK... " >&6; }
12754              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12755$as_echo "$BOOT_JDK" >&6; }
12756              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12757$as_echo_n "checking Boot JDK version... " >&6; }
12758              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12759              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12760$as_echo "$BOOT_JDK_VERSION" >&6; }
12761            fi # end check jdk version
12762          fi # end check rt.jar
12763        fi # end check javac
12764      fi # end check java
12765    fi # end check boot jdk found
12766  fi
12767
12768
12769  if test "x$BOOT_JDK_FOUND" = xno; then
12770    # Now execute the test
12771
12772  if test "x$PROGRAMFILES" != x; then
12773    VIRTUAL_DIR="$PROGRAMFILES/Java"
12774
12775  windows_path="$VIRTUAL_DIR"
12776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12777    unix_path=`$CYGPATH -u "$windows_path"`
12778    VIRTUAL_DIR="$unix_path"
12779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12781    VIRTUAL_DIR="$unix_path"
12782  fi
12783
12784
12785  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12786  BOOT_JDK_SUFFIX=""
12787  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12788  if test "x$ALL_JDKS_FOUND" != x; then
12789    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12790
12791  if test "x$BOOT_JDK_FOUND" = xno; then
12792    # Now execute the test
12793
12794        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12795        if test -d "$BOOT_JDK"; then
12796          BOOT_JDK_FOUND=maybe
12797          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12798$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12799        fi
12800
12801
12802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12804      # Do we have a bin/java?
12805      if test ! -x "$BOOT_JDK/bin/java"; then
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12808        BOOT_JDK_FOUND=no
12809      else
12810        # Do we have a bin/javac?
12811        if test ! -x "$BOOT_JDK/bin/javac"; then
12812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12816          BOOT_JDK_FOUND=no
12817        else
12818          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12819          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12822            BOOT_JDK_FOUND=no
12823          else
12824            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12825            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12826
12827            # Extra M4 quote needed to protect [] in grep expression.
12828            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12829            if test "x$FOUND_VERSION_78" = x; then
12830              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12832              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12833$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12834              BOOT_JDK_FOUND=no
12835            else
12836              # We're done! :-)
12837              BOOT_JDK_FOUND=yes
12838
12839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12840
12841  # Input might be given as Windows format, start by converting to
12842  # unix format.
12843  path="$BOOT_JDK"
12844  new_path=`$CYGPATH -u "$path"`
12845
12846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12849  # "foo.exe" is OK but "foo" is an error.
12850  #
12851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12852  # It is also a way to make sure we got the proper file name for the real test later on.
12853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12854  if test "x$test_shortpath" = x; then
12855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12857    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12858  fi
12859
12860  # Call helper function which possibly converts this using DOS-style short mode.
12861  # If so, the updated path is stored in $new_path.
12862
12863  input_path="$new_path"
12864  # Check if we need to convert this using DOS-style short mode. If the path
12865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12866  # take no chances and rewrite it.
12867  # Note: m4 eats our [], so we need to use [ and ] instead.
12868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12869  if test "x$has_forbidden_chars" != x; then
12870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12874      # Going to short mode and back again did indeed matter. Since short mode is
12875      # case insensitive, let's make it lowercase to improve readability.
12876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12877      # Now convert it back to Unix-stile (cygpath)
12878      input_path=`$CYGPATH -u "$shortmode_path"`
12879      new_path="$input_path"
12880    fi
12881  fi
12882
12883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12884  if test "x$test_cygdrive_prefix" = x; then
12885    # As a simple fix, exclude /usr/bin since it's not a real path.
12886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12888      # a path prefixed by /cygdrive for fixpath to work.
12889      new_path="$CYGWIN_ROOT_PATH$input_path"
12890    fi
12891  fi
12892
12893
12894  if test "x$path" != "x$new_path"; then
12895    BOOT_JDK="$new_path"
12896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12898  fi
12899
12900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12901
12902  path="$BOOT_JDK"
12903  has_colon=`$ECHO $path | $GREP ^.:`
12904  new_path="$path"
12905  if test "x$has_colon" = x; then
12906    # Not in mixed or Windows style, start by that.
12907    new_path=`cmd //c echo $path`
12908  fi
12909
12910
12911  input_path="$new_path"
12912  # Check if we need to convert this using DOS-style short mode. If the path
12913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12914  # take no chances and rewrite it.
12915  # Note: m4 eats our [], so we need to use [ and ] instead.
12916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12917  if test "x$has_forbidden_chars" != x; then
12918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12920  fi
12921
12922
12923  windows_path="$new_path"
12924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12925    unix_path=`$CYGPATH -u "$windows_path"`
12926    new_path="$unix_path"
12927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12929    new_path="$unix_path"
12930  fi
12931
12932  if test "x$path" != "x$new_path"; then
12933    BOOT_JDK="$new_path"
12934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12936  fi
12937
12938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12940
12941  else
12942    # We're on a posix platform. Hooray! :)
12943    path="$BOOT_JDK"
12944
12945    if test ! -f "$path" && test ! -d "$path"; then
12946      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12947    fi
12948
12949    has_space=`$ECHO "$path" | $GREP " "`
12950    if test "x$has_space" != x; then
12951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12954    fi
12955  fi
12956
12957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12958$as_echo_n "checking for Boot JDK... " >&6; }
12959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12960$as_echo "$BOOT_JDK" >&6; }
12961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12962$as_echo_n "checking Boot JDK version... " >&6; }
12963              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12964              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12965$as_echo "$BOOT_JDK_VERSION" >&6; }
12966            fi # end check jdk version
12967          fi # end check rt.jar
12968        fi # end check javac
12969      fi # end check java
12970    fi # end check boot jdk found
12971  fi
12972
12973    done
12974  fi
12975
12976  fi
12977
12978
12979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12981      # Do we have a bin/java?
12982      if test ! -x "$BOOT_JDK/bin/java"; then
12983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12985        BOOT_JDK_FOUND=no
12986      else
12987        # Do we have a bin/javac?
12988        if test ! -x "$BOOT_JDK/bin/javac"; then
12989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12993          BOOT_JDK_FOUND=no
12994        else
12995          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12996          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12999            BOOT_JDK_FOUND=no
13000          else
13001            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13003
13004            # Extra M4 quote needed to protect [] in grep expression.
13005            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13006            if test "x$FOUND_VERSION_78" = x; then
13007              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13009              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13010$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13011              BOOT_JDK_FOUND=no
13012            else
13013              # We're done! :-)
13014              BOOT_JDK_FOUND=yes
13015
13016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13017
13018  # Input might be given as Windows format, start by converting to
13019  # unix format.
13020  path="$BOOT_JDK"
13021  new_path=`$CYGPATH -u "$path"`
13022
13023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13026  # "foo.exe" is OK but "foo" is an error.
13027  #
13028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13029  # It is also a way to make sure we got the proper file name for the real test later on.
13030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13031  if test "x$test_shortpath" = x; then
13032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13035  fi
13036
13037  # Call helper function which possibly converts this using DOS-style short mode.
13038  # If so, the updated path is stored in $new_path.
13039
13040  input_path="$new_path"
13041  # Check if we need to convert this using DOS-style short mode. If the path
13042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13043  # take no chances and rewrite it.
13044  # Note: m4 eats our [], so we need to use [ and ] instead.
13045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13046  if test "x$has_forbidden_chars" != x; then
13047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13051      # Going to short mode and back again did indeed matter. Since short mode is
13052      # case insensitive, let's make it lowercase to improve readability.
13053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13054      # Now convert it back to Unix-stile (cygpath)
13055      input_path=`$CYGPATH -u "$shortmode_path"`
13056      new_path="$input_path"
13057    fi
13058  fi
13059
13060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13061  if test "x$test_cygdrive_prefix" = x; then
13062    # As a simple fix, exclude /usr/bin since it's not a real path.
13063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13065      # a path prefixed by /cygdrive for fixpath to work.
13066      new_path="$CYGWIN_ROOT_PATH$input_path"
13067    fi
13068  fi
13069
13070
13071  if test "x$path" != "x$new_path"; then
13072    BOOT_JDK="$new_path"
13073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13075  fi
13076
13077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13078
13079  path="$BOOT_JDK"
13080  has_colon=`$ECHO $path | $GREP ^.:`
13081  new_path="$path"
13082  if test "x$has_colon" = x; then
13083    # Not in mixed or Windows style, start by that.
13084    new_path=`cmd //c echo $path`
13085  fi
13086
13087
13088  input_path="$new_path"
13089  # Check if we need to convert this using DOS-style short mode. If the path
13090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13091  # take no chances and rewrite it.
13092  # Note: m4 eats our [], so we need to use [ and ] instead.
13093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13094  if test "x$has_forbidden_chars" != x; then
13095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13097  fi
13098
13099
13100  windows_path="$new_path"
13101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13102    unix_path=`$CYGPATH -u "$windows_path"`
13103    new_path="$unix_path"
13104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13106    new_path="$unix_path"
13107  fi
13108
13109  if test "x$path" != "x$new_path"; then
13110    BOOT_JDK="$new_path"
13111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13113  fi
13114
13115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13117
13118  else
13119    # We're on a posix platform. Hooray! :)
13120    path="$BOOT_JDK"
13121
13122    if test ! -f "$path" && test ! -d "$path"; then
13123      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13124    fi
13125
13126    has_space=`$ECHO "$path" | $GREP " "`
13127    if test "x$has_space" != x; then
13128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13130      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13131    fi
13132  fi
13133
13134              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13135$as_echo_n "checking for Boot JDK... " >&6; }
13136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13137$as_echo "$BOOT_JDK" >&6; }
13138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13139$as_echo_n "checking Boot JDK version... " >&6; }
13140              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13141              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13142$as_echo "$BOOT_JDK_VERSION" >&6; }
13143            fi # end check jdk version
13144          fi # end check rt.jar
13145        fi # end check javac
13146      fi # end check java
13147    fi # end check boot jdk found
13148  fi
13149
13150
13151  if test "x$BOOT_JDK_FOUND" = xno; then
13152    # Now execute the test
13153
13154  if test "x$ProgramFiles" != x; then
13155    VIRTUAL_DIR="$ProgramFiles/Java"
13156
13157  windows_path="$VIRTUAL_DIR"
13158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13159    unix_path=`$CYGPATH -u "$windows_path"`
13160    VIRTUAL_DIR="$unix_path"
13161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13163    VIRTUAL_DIR="$unix_path"
13164  fi
13165
13166
13167  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13168  BOOT_JDK_SUFFIX=""
13169  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13170  if test "x$ALL_JDKS_FOUND" != x; then
13171    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13172
13173  if test "x$BOOT_JDK_FOUND" = xno; then
13174    # Now execute the test
13175
13176        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13177        if test -d "$BOOT_JDK"; then
13178          BOOT_JDK_FOUND=maybe
13179          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13180$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13181        fi
13182
13183
13184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13186      # Do we have a bin/java?
13187      if test ! -x "$BOOT_JDK/bin/java"; then
13188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13190        BOOT_JDK_FOUND=no
13191      else
13192        # Do we have a bin/javac?
13193        if test ! -x "$BOOT_JDK/bin/javac"; then
13194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13198          BOOT_JDK_FOUND=no
13199        else
13200          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13201          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13204            BOOT_JDK_FOUND=no
13205          else
13206            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13208
13209            # Extra M4 quote needed to protect [] in grep expression.
13210            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13211            if test "x$FOUND_VERSION_78" = x; then
13212              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13214              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13215$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13216              BOOT_JDK_FOUND=no
13217            else
13218              # We're done! :-)
13219              BOOT_JDK_FOUND=yes
13220
13221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13222
13223  # Input might be given as Windows format, start by converting to
13224  # unix format.
13225  path="$BOOT_JDK"
13226  new_path=`$CYGPATH -u "$path"`
13227
13228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13231  # "foo.exe" is OK but "foo" is an error.
13232  #
13233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13234  # It is also a way to make sure we got the proper file name for the real test later on.
13235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13236  if test "x$test_shortpath" = x; then
13237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13239    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13240  fi
13241
13242  # Call helper function which possibly converts this using DOS-style short mode.
13243  # If so, the updated path is stored in $new_path.
13244
13245  input_path="$new_path"
13246  # Check if we need to convert this using DOS-style short mode. If the path
13247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13248  # take no chances and rewrite it.
13249  # Note: m4 eats our [], so we need to use [ and ] instead.
13250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13251  if test "x$has_forbidden_chars" != x; then
13252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13256      # Going to short mode and back again did indeed matter. Since short mode is
13257      # case insensitive, let's make it lowercase to improve readability.
13258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13259      # Now convert it back to Unix-stile (cygpath)
13260      input_path=`$CYGPATH -u "$shortmode_path"`
13261      new_path="$input_path"
13262    fi
13263  fi
13264
13265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13266  if test "x$test_cygdrive_prefix" = x; then
13267    # As a simple fix, exclude /usr/bin since it's not a real path.
13268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13270      # a path prefixed by /cygdrive for fixpath to work.
13271      new_path="$CYGWIN_ROOT_PATH$input_path"
13272    fi
13273  fi
13274
13275
13276  if test "x$path" != "x$new_path"; then
13277    BOOT_JDK="$new_path"
13278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13280  fi
13281
13282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13283
13284  path="$BOOT_JDK"
13285  has_colon=`$ECHO $path | $GREP ^.:`
13286  new_path="$path"
13287  if test "x$has_colon" = x; then
13288    # Not in mixed or Windows style, start by that.
13289    new_path=`cmd //c echo $path`
13290  fi
13291
13292
13293  input_path="$new_path"
13294  # Check if we need to convert this using DOS-style short mode. If the path
13295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13296  # take no chances and rewrite it.
13297  # Note: m4 eats our [], so we need to use [ and ] instead.
13298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13299  if test "x$has_forbidden_chars" != x; then
13300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13302  fi
13303
13304
13305  windows_path="$new_path"
13306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13307    unix_path=`$CYGPATH -u "$windows_path"`
13308    new_path="$unix_path"
13309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13311    new_path="$unix_path"
13312  fi
13313
13314  if test "x$path" != "x$new_path"; then
13315    BOOT_JDK="$new_path"
13316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13318  fi
13319
13320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13322
13323  else
13324    # We're on a posix platform. Hooray! :)
13325    path="$BOOT_JDK"
13326
13327    if test ! -f "$path" && test ! -d "$path"; then
13328      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13329    fi
13330
13331    has_space=`$ECHO "$path" | $GREP " "`
13332    if test "x$has_space" != x; then
13333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13336    fi
13337  fi
13338
13339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13340$as_echo_n "checking for Boot JDK... " >&6; }
13341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13342$as_echo "$BOOT_JDK" >&6; }
13343              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13344$as_echo_n "checking Boot JDK version... " >&6; }
13345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13347$as_echo "$BOOT_JDK_VERSION" >&6; }
13348            fi # end check jdk version
13349          fi # end check rt.jar
13350        fi # end check javac
13351      fi # end check java
13352    fi # end check boot jdk found
13353  fi
13354
13355    done
13356  fi
13357
13358  fi
13359
13360
13361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13363      # Do we have a bin/java?
13364      if test ! -x "$BOOT_JDK/bin/java"; then
13365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13367        BOOT_JDK_FOUND=no
13368      else
13369        # Do we have a bin/javac?
13370        if test ! -x "$BOOT_JDK/bin/javac"; then
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13375          BOOT_JDK_FOUND=no
13376        else
13377          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13378          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13381            BOOT_JDK_FOUND=no
13382          else
13383            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13384            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13385
13386            # Extra M4 quote needed to protect [] in grep expression.
13387            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13388            if test "x$FOUND_VERSION_78" = x; then
13389              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13391              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13392$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13393              BOOT_JDK_FOUND=no
13394            else
13395              # We're done! :-)
13396              BOOT_JDK_FOUND=yes
13397
13398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13399
13400  # Input might be given as Windows format, start by converting to
13401  # unix format.
13402  path="$BOOT_JDK"
13403  new_path=`$CYGPATH -u "$path"`
13404
13405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13408  # "foo.exe" is OK but "foo" is an error.
13409  #
13410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13411  # It is also a way to make sure we got the proper file name for the real test later on.
13412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13413  if test "x$test_shortpath" = x; then
13414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13417  fi
13418
13419  # Call helper function which possibly converts this using DOS-style short mode.
13420  # If so, the updated path is stored in $new_path.
13421
13422  input_path="$new_path"
13423  # Check if we need to convert this using DOS-style short mode. If the path
13424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13425  # take no chances and rewrite it.
13426  # Note: m4 eats our [], so we need to use [ and ] instead.
13427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13428  if test "x$has_forbidden_chars" != x; then
13429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13433      # Going to short mode and back again did indeed matter. Since short mode is
13434      # case insensitive, let's make it lowercase to improve readability.
13435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13436      # Now convert it back to Unix-stile (cygpath)
13437      input_path=`$CYGPATH -u "$shortmode_path"`
13438      new_path="$input_path"
13439    fi
13440  fi
13441
13442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13443  if test "x$test_cygdrive_prefix" = x; then
13444    # As a simple fix, exclude /usr/bin since it's not a real path.
13445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13447      # a path prefixed by /cygdrive for fixpath to work.
13448      new_path="$CYGWIN_ROOT_PATH$input_path"
13449    fi
13450  fi
13451
13452
13453  if test "x$path" != "x$new_path"; then
13454    BOOT_JDK="$new_path"
13455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13457  fi
13458
13459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13460
13461  path="$BOOT_JDK"
13462  has_colon=`$ECHO $path | $GREP ^.:`
13463  new_path="$path"
13464  if test "x$has_colon" = x; then
13465    # Not in mixed or Windows style, start by that.
13466    new_path=`cmd //c echo $path`
13467  fi
13468
13469
13470  input_path="$new_path"
13471  # Check if we need to convert this using DOS-style short mode. If the path
13472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13473  # take no chances and rewrite it.
13474  # Note: m4 eats our [], so we need to use [ and ] instead.
13475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13476  if test "x$has_forbidden_chars" != x; then
13477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13479  fi
13480
13481
13482  windows_path="$new_path"
13483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13484    unix_path=`$CYGPATH -u "$windows_path"`
13485    new_path="$unix_path"
13486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13488    new_path="$unix_path"
13489  fi
13490
13491  if test "x$path" != "x$new_path"; then
13492    BOOT_JDK="$new_path"
13493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13495  fi
13496
13497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13499
13500  else
13501    # We're on a posix platform. Hooray! :)
13502    path="$BOOT_JDK"
13503
13504    if test ! -f "$path" && test ! -d "$path"; then
13505      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13506    fi
13507
13508    has_space=`$ECHO "$path" | $GREP " "`
13509    if test "x$has_space" != x; then
13510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13513    fi
13514  fi
13515
13516              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13517$as_echo_n "checking for Boot JDK... " >&6; }
13518              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13519$as_echo "$BOOT_JDK" >&6; }
13520              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13521$as_echo_n "checking Boot JDK version... " >&6; }
13522              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13523              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13524$as_echo "$BOOT_JDK_VERSION" >&6; }
13525            fi # end check jdk version
13526          fi # end check rt.jar
13527        fi # end check javac
13528      fi # end check java
13529    fi # end check boot jdk found
13530  fi
13531
13532
13533  if test "x$BOOT_JDK_FOUND" = xno; then
13534    # Now execute the test
13535
13536  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13537  BOOT_JDK_SUFFIX=""
13538  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13539  if test "x$ALL_JDKS_FOUND" != x; then
13540    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13541
13542  if test "x$BOOT_JDK_FOUND" = xno; then
13543    # Now execute the test
13544
13545        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13546        if test -d "$BOOT_JDK"; then
13547          BOOT_JDK_FOUND=maybe
13548          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13549$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13550        fi
13551
13552
13553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13555      # Do we have a bin/java?
13556      if test ! -x "$BOOT_JDK/bin/java"; then
13557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13559        BOOT_JDK_FOUND=no
13560      else
13561        # Do we have a bin/javac?
13562        if test ! -x "$BOOT_JDK/bin/javac"; then
13563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13567          BOOT_JDK_FOUND=no
13568        else
13569          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13570          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13571            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13573            BOOT_JDK_FOUND=no
13574          else
13575            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13576            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13577
13578            # Extra M4 quote needed to protect [] in grep expression.
13579            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13580            if test "x$FOUND_VERSION_78" = x; then
13581              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13583              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13584$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13585              BOOT_JDK_FOUND=no
13586            else
13587              # We're done! :-)
13588              BOOT_JDK_FOUND=yes
13589
13590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13591
13592  # Input might be given as Windows format, start by converting to
13593  # unix format.
13594  path="$BOOT_JDK"
13595  new_path=`$CYGPATH -u "$path"`
13596
13597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13600  # "foo.exe" is OK but "foo" is an error.
13601  #
13602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13603  # It is also a way to make sure we got the proper file name for the real test later on.
13604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13605  if test "x$test_shortpath" = x; then
13606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13609  fi
13610
13611  # Call helper function which possibly converts this using DOS-style short mode.
13612  # If so, the updated path is stored in $new_path.
13613
13614  input_path="$new_path"
13615  # Check if we need to convert this using DOS-style short mode. If the path
13616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13617  # take no chances and rewrite it.
13618  # Note: m4 eats our [], so we need to use [ and ] instead.
13619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13620  if test "x$has_forbidden_chars" != x; then
13621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13625      # Going to short mode and back again did indeed matter. Since short mode is
13626      # case insensitive, let's make it lowercase to improve readability.
13627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13628      # Now convert it back to Unix-stile (cygpath)
13629      input_path=`$CYGPATH -u "$shortmode_path"`
13630      new_path="$input_path"
13631    fi
13632  fi
13633
13634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13635  if test "x$test_cygdrive_prefix" = x; then
13636    # As a simple fix, exclude /usr/bin since it's not a real path.
13637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13639      # a path prefixed by /cygdrive for fixpath to work.
13640      new_path="$CYGWIN_ROOT_PATH$input_path"
13641    fi
13642  fi
13643
13644
13645  if test "x$path" != "x$new_path"; then
13646    BOOT_JDK="$new_path"
13647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13649  fi
13650
13651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13652
13653  path="$BOOT_JDK"
13654  has_colon=`$ECHO $path | $GREP ^.:`
13655  new_path="$path"
13656  if test "x$has_colon" = x; then
13657    # Not in mixed or Windows style, start by that.
13658    new_path=`cmd //c echo $path`
13659  fi
13660
13661
13662  input_path="$new_path"
13663  # Check if we need to convert this using DOS-style short mode. If the path
13664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13665  # take no chances and rewrite it.
13666  # Note: m4 eats our [], so we need to use [ and ] instead.
13667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13668  if test "x$has_forbidden_chars" != x; then
13669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13671  fi
13672
13673
13674  windows_path="$new_path"
13675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13676    unix_path=`$CYGPATH -u "$windows_path"`
13677    new_path="$unix_path"
13678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13680    new_path="$unix_path"
13681  fi
13682
13683  if test "x$path" != "x$new_path"; then
13684    BOOT_JDK="$new_path"
13685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13687  fi
13688
13689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13691
13692  else
13693    # We're on a posix platform. Hooray! :)
13694    path="$BOOT_JDK"
13695
13696    if test ! -f "$path" && test ! -d "$path"; then
13697      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13698    fi
13699
13700    has_space=`$ECHO "$path" | $GREP " "`
13701    if test "x$has_space" != x; then
13702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13704      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13705    fi
13706  fi
13707
13708              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13709$as_echo_n "checking for Boot JDK... " >&6; }
13710              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13711$as_echo "$BOOT_JDK" >&6; }
13712              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13713$as_echo_n "checking Boot JDK version... " >&6; }
13714              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13715              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13716$as_echo "$BOOT_JDK_VERSION" >&6; }
13717            fi # end check jdk version
13718          fi # end check rt.jar
13719        fi # end check javac
13720      fi # end check java
13721    fi # end check boot jdk found
13722  fi
13723
13724    done
13725  fi
13726
13727
13728    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13729    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13730      # Do we have a bin/java?
13731      if test ! -x "$BOOT_JDK/bin/java"; then
13732        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13734        BOOT_JDK_FOUND=no
13735      else
13736        # Do we have a bin/javac?
13737        if test ! -x "$BOOT_JDK/bin/javac"; then
13738          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13740          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13741$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13742          BOOT_JDK_FOUND=no
13743        else
13744          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13745          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13746            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13748            BOOT_JDK_FOUND=no
13749          else
13750            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13751            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13752
13753            # Extra M4 quote needed to protect [] in grep expression.
13754            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13755            if test "x$FOUND_VERSION_78" = x; then
13756              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13758              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13759$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13760              BOOT_JDK_FOUND=no
13761            else
13762              # We're done! :-)
13763              BOOT_JDK_FOUND=yes
13764
13765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13766
13767  # Input might be given as Windows format, start by converting to
13768  # unix format.
13769  path="$BOOT_JDK"
13770  new_path=`$CYGPATH -u "$path"`
13771
13772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13775  # "foo.exe" is OK but "foo" is an error.
13776  #
13777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13778  # It is also a way to make sure we got the proper file name for the real test later on.
13779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13780  if test "x$test_shortpath" = x; then
13781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13783    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13784  fi
13785
13786  # Call helper function which possibly converts this using DOS-style short mode.
13787  # If so, the updated path is stored in $new_path.
13788
13789  input_path="$new_path"
13790  # Check if we need to convert this using DOS-style short mode. If the path
13791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13792  # take no chances and rewrite it.
13793  # Note: m4 eats our [], so we need to use [ and ] instead.
13794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13795  if test "x$has_forbidden_chars" != x; then
13796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13800      # Going to short mode and back again did indeed matter. Since short mode is
13801      # case insensitive, let's make it lowercase to improve readability.
13802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13803      # Now convert it back to Unix-stile (cygpath)
13804      input_path=`$CYGPATH -u "$shortmode_path"`
13805      new_path="$input_path"
13806    fi
13807  fi
13808
13809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13810  if test "x$test_cygdrive_prefix" = x; then
13811    # As a simple fix, exclude /usr/bin since it's not a real path.
13812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13814      # a path prefixed by /cygdrive for fixpath to work.
13815      new_path="$CYGWIN_ROOT_PATH$input_path"
13816    fi
13817  fi
13818
13819
13820  if test "x$path" != "x$new_path"; then
13821    BOOT_JDK="$new_path"
13822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13824  fi
13825
13826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13827
13828  path="$BOOT_JDK"
13829  has_colon=`$ECHO $path | $GREP ^.:`
13830  new_path="$path"
13831  if test "x$has_colon" = x; then
13832    # Not in mixed or Windows style, start by that.
13833    new_path=`cmd //c echo $path`
13834  fi
13835
13836
13837  input_path="$new_path"
13838  # Check if we need to convert this using DOS-style short mode. If the path
13839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13840  # take no chances and rewrite it.
13841  # Note: m4 eats our [], so we need to use [ and ] instead.
13842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13843  if test "x$has_forbidden_chars" != x; then
13844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13846  fi
13847
13848
13849  windows_path="$new_path"
13850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13851    unix_path=`$CYGPATH -u "$windows_path"`
13852    new_path="$unix_path"
13853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13855    new_path="$unix_path"
13856  fi
13857
13858  if test "x$path" != "x$new_path"; then
13859    BOOT_JDK="$new_path"
13860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13862  fi
13863
13864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13866
13867  else
13868    # We're on a posix platform. Hooray! :)
13869    path="$BOOT_JDK"
13870
13871    if test ! -f "$path" && test ! -d "$path"; then
13872      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13873    fi
13874
13875    has_space=`$ECHO "$path" | $GREP " "`
13876    if test "x$has_space" != x; then
13877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13879      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13880    fi
13881  fi
13882
13883              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13884$as_echo_n "checking for Boot JDK... " >&6; }
13885              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13886$as_echo "$BOOT_JDK" >&6; }
13887              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13888$as_echo_n "checking Boot JDK version... " >&6; }
13889              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13891$as_echo "$BOOT_JDK_VERSION" >&6; }
13892            fi # end check jdk version
13893          fi # end check rt.jar
13894        fi # end check javac
13895      fi # end check java
13896    fi # end check boot jdk found
13897  fi
13898
13899  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13900
13901  if test "x$BOOT_JDK_FOUND" = xno; then
13902    # Now execute the test
13903
13904  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13905  BOOT_JDK_SUFFIX="/Contents/Home"
13906  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13907  if test "x$ALL_JDKS_FOUND" != x; then
13908    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13909
13910  if test "x$BOOT_JDK_FOUND" = xno; then
13911    # Now execute the test
13912
13913        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13914        if test -d "$BOOT_JDK"; then
13915          BOOT_JDK_FOUND=maybe
13916          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13917$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13918        fi
13919
13920
13921    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13922    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13923      # Do we have a bin/java?
13924      if test ! -x "$BOOT_JDK/bin/java"; then
13925        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13927        BOOT_JDK_FOUND=no
13928      else
13929        # Do we have a bin/javac?
13930        if test ! -x "$BOOT_JDK/bin/javac"; then
13931          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13933          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13934$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13935          BOOT_JDK_FOUND=no
13936        else
13937          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13938          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13939            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13941            BOOT_JDK_FOUND=no
13942          else
13943            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13944            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13945
13946            # Extra M4 quote needed to protect [] in grep expression.
13947            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13948            if test "x$FOUND_VERSION_78" = x; then
13949              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13951              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13952$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13953              BOOT_JDK_FOUND=no
13954            else
13955              # We're done! :-)
13956              BOOT_JDK_FOUND=yes
13957
13958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13959
13960  # Input might be given as Windows format, start by converting to
13961  # unix format.
13962  path="$BOOT_JDK"
13963  new_path=`$CYGPATH -u "$path"`
13964
13965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13968  # "foo.exe" is OK but "foo" is an error.
13969  #
13970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13971  # It is also a way to make sure we got the proper file name for the real test later on.
13972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13973  if test "x$test_shortpath" = x; then
13974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13976    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13977  fi
13978
13979  # Call helper function which possibly converts this using DOS-style short mode.
13980  # If so, the updated path is stored in $new_path.
13981
13982  input_path="$new_path"
13983  # Check if we need to convert this using DOS-style short mode. If the path
13984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13985  # take no chances and rewrite it.
13986  # Note: m4 eats our [], so we need to use [ and ] instead.
13987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13988  if test "x$has_forbidden_chars" != x; then
13989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13993      # Going to short mode and back again did indeed matter. Since short mode is
13994      # case insensitive, let's make it lowercase to improve readability.
13995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13996      # Now convert it back to Unix-stile (cygpath)
13997      input_path=`$CYGPATH -u "$shortmode_path"`
13998      new_path="$input_path"
13999    fi
14000  fi
14001
14002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14003  if test "x$test_cygdrive_prefix" = x; then
14004    # As a simple fix, exclude /usr/bin since it's not a real path.
14005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14007      # a path prefixed by /cygdrive for fixpath to work.
14008      new_path="$CYGWIN_ROOT_PATH$input_path"
14009    fi
14010  fi
14011
14012
14013  if test "x$path" != "x$new_path"; then
14014    BOOT_JDK="$new_path"
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14017  fi
14018
14019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14020
14021  path="$BOOT_JDK"
14022  has_colon=`$ECHO $path | $GREP ^.:`
14023  new_path="$path"
14024  if test "x$has_colon" = x; then
14025    # Not in mixed or Windows style, start by that.
14026    new_path=`cmd //c echo $path`
14027  fi
14028
14029
14030  input_path="$new_path"
14031  # Check if we need to convert this using DOS-style short mode. If the path
14032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14033  # take no chances and rewrite it.
14034  # Note: m4 eats our [], so we need to use [ and ] instead.
14035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14036  if test "x$has_forbidden_chars" != x; then
14037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14039  fi
14040
14041
14042  windows_path="$new_path"
14043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14044    unix_path=`$CYGPATH -u "$windows_path"`
14045    new_path="$unix_path"
14046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14048    new_path="$unix_path"
14049  fi
14050
14051  if test "x$path" != "x$new_path"; then
14052    BOOT_JDK="$new_path"
14053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14054$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14055  fi
14056
14057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14059
14060  else
14061    # We're on a posix platform. Hooray! :)
14062    path="$BOOT_JDK"
14063
14064    if test ! -f "$path" && test ! -d "$path"; then
14065      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14066    fi
14067
14068    has_space=`$ECHO "$path" | $GREP " "`
14069    if test "x$has_space" != x; then
14070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14072      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14073    fi
14074  fi
14075
14076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14077$as_echo_n "checking for Boot JDK... " >&6; }
14078              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14079$as_echo "$BOOT_JDK" >&6; }
14080              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14081$as_echo_n "checking Boot JDK version... " >&6; }
14082              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14083              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14084$as_echo "$BOOT_JDK_VERSION" >&6; }
14085            fi # end check jdk version
14086          fi # end check rt.jar
14087        fi # end check javac
14088      fi # end check java
14089    fi # end check boot jdk found
14090  fi
14091
14092    done
14093  fi
14094
14095
14096    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14097    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14098      # Do we have a bin/java?
14099      if test ! -x "$BOOT_JDK/bin/java"; then
14100        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14102        BOOT_JDK_FOUND=no
14103      else
14104        # Do we have a bin/javac?
14105        if test ! -x "$BOOT_JDK/bin/javac"; then
14106          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14108          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14109$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14110          BOOT_JDK_FOUND=no
14111        else
14112          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14113          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14116            BOOT_JDK_FOUND=no
14117          else
14118            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14120
14121            # Extra M4 quote needed to protect [] in grep expression.
14122            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14123            if test "x$FOUND_VERSION_78" = x; then
14124              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14126              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14127$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14128              BOOT_JDK_FOUND=no
14129            else
14130              # We're done! :-)
14131              BOOT_JDK_FOUND=yes
14132
14133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14134
14135  # Input might be given as Windows format, start by converting to
14136  # unix format.
14137  path="$BOOT_JDK"
14138  new_path=`$CYGPATH -u "$path"`
14139
14140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14143  # "foo.exe" is OK but "foo" is an error.
14144  #
14145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14146  # It is also a way to make sure we got the proper file name for the real test later on.
14147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14148  if test "x$test_shortpath" = x; then
14149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14152  fi
14153
14154  # Call helper function which possibly converts this using DOS-style short mode.
14155  # If so, the updated path is stored in $new_path.
14156
14157  input_path="$new_path"
14158  # Check if we need to convert this using DOS-style short mode. If the path
14159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14160  # take no chances and rewrite it.
14161  # Note: m4 eats our [], so we need to use [ and ] instead.
14162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14163  if test "x$has_forbidden_chars" != x; then
14164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14168      # Going to short mode and back again did indeed matter. Since short mode is
14169      # case insensitive, let's make it lowercase to improve readability.
14170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14171      # Now convert it back to Unix-stile (cygpath)
14172      input_path=`$CYGPATH -u "$shortmode_path"`
14173      new_path="$input_path"
14174    fi
14175  fi
14176
14177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14178  if test "x$test_cygdrive_prefix" = x; then
14179    # As a simple fix, exclude /usr/bin since it's not a real path.
14180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14182      # a path prefixed by /cygdrive for fixpath to work.
14183      new_path="$CYGWIN_ROOT_PATH$input_path"
14184    fi
14185  fi
14186
14187
14188  if test "x$path" != "x$new_path"; then
14189    BOOT_JDK="$new_path"
14190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14192  fi
14193
14194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14195
14196  path="$BOOT_JDK"
14197  has_colon=`$ECHO $path | $GREP ^.:`
14198  new_path="$path"
14199  if test "x$has_colon" = x; then
14200    # Not in mixed or Windows style, start by that.
14201    new_path=`cmd //c echo $path`
14202  fi
14203
14204
14205  input_path="$new_path"
14206  # Check if we need to convert this using DOS-style short mode. If the path
14207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14208  # take no chances and rewrite it.
14209  # Note: m4 eats our [], so we need to use [ and ] instead.
14210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14211  if test "x$has_forbidden_chars" != x; then
14212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14214  fi
14215
14216
14217  windows_path="$new_path"
14218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14219    unix_path=`$CYGPATH -u "$windows_path"`
14220    new_path="$unix_path"
14221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14223    new_path="$unix_path"
14224  fi
14225
14226  if test "x$path" != "x$new_path"; then
14227    BOOT_JDK="$new_path"
14228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14230  fi
14231
14232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14234
14235  else
14236    # We're on a posix platform. Hooray! :)
14237    path="$BOOT_JDK"
14238
14239    if test ! -f "$path" && test ! -d "$path"; then
14240      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14241    fi
14242
14243    has_space=`$ECHO "$path" | $GREP " "`
14244    if test "x$has_space" != x; then
14245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14247      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14248    fi
14249  fi
14250
14251              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14252$as_echo_n "checking for Boot JDK... " >&6; }
14253              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14254$as_echo "$BOOT_JDK" >&6; }
14255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14256$as_echo_n "checking Boot JDK version... " >&6; }
14257              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14259$as_echo "$BOOT_JDK_VERSION" >&6; }
14260            fi # end check jdk version
14261          fi # end check rt.jar
14262        fi # end check javac
14263      fi # end check java
14264    fi # end check boot jdk found
14265  fi
14266
14267
14268  if test "x$BOOT_JDK_FOUND" = xno; then
14269    # Now execute the test
14270
14271  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14272  BOOT_JDK_SUFFIX="/Contents/Home"
14273  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14274  if test "x$ALL_JDKS_FOUND" != x; then
14275    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14276
14277  if test "x$BOOT_JDK_FOUND" = xno; then
14278    # Now execute the test
14279
14280        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14281        if test -d "$BOOT_JDK"; then
14282          BOOT_JDK_FOUND=maybe
14283          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14284$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14285        fi
14286
14287
14288    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14289    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14290      # Do we have a bin/java?
14291      if test ! -x "$BOOT_JDK/bin/java"; then
14292        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14294        BOOT_JDK_FOUND=no
14295      else
14296        # Do we have a bin/javac?
14297        if test ! -x "$BOOT_JDK/bin/javac"; then
14298          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14300          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14301$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14302          BOOT_JDK_FOUND=no
14303        else
14304          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14305          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14306            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14308            BOOT_JDK_FOUND=no
14309          else
14310            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14311            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14312
14313            # Extra M4 quote needed to protect [] in grep expression.
14314            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14315            if test "x$FOUND_VERSION_78" = x; then
14316              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14318              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14319$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14320              BOOT_JDK_FOUND=no
14321            else
14322              # We're done! :-)
14323              BOOT_JDK_FOUND=yes
14324
14325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14326
14327  # Input might be given as Windows format, start by converting to
14328  # unix format.
14329  path="$BOOT_JDK"
14330  new_path=`$CYGPATH -u "$path"`
14331
14332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14335  # "foo.exe" is OK but "foo" is an error.
14336  #
14337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14338  # It is also a way to make sure we got the proper file name for the real test later on.
14339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14340  if test "x$test_shortpath" = x; then
14341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14343    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14344  fi
14345
14346  # Call helper function which possibly converts this using DOS-style short mode.
14347  # If so, the updated path is stored in $new_path.
14348
14349  input_path="$new_path"
14350  # Check if we need to convert this using DOS-style short mode. If the path
14351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14352  # take no chances and rewrite it.
14353  # Note: m4 eats our [], so we need to use [ and ] instead.
14354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14355  if test "x$has_forbidden_chars" != x; then
14356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14360      # Going to short mode and back again did indeed matter. Since short mode is
14361      # case insensitive, let's make it lowercase to improve readability.
14362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14363      # Now convert it back to Unix-stile (cygpath)
14364      input_path=`$CYGPATH -u "$shortmode_path"`
14365      new_path="$input_path"
14366    fi
14367  fi
14368
14369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14370  if test "x$test_cygdrive_prefix" = x; then
14371    # As a simple fix, exclude /usr/bin since it's not a real path.
14372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14374      # a path prefixed by /cygdrive for fixpath to work.
14375      new_path="$CYGWIN_ROOT_PATH$input_path"
14376    fi
14377  fi
14378
14379
14380  if test "x$path" != "x$new_path"; then
14381    BOOT_JDK="$new_path"
14382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14384  fi
14385
14386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14387
14388  path="$BOOT_JDK"
14389  has_colon=`$ECHO $path | $GREP ^.:`
14390  new_path="$path"
14391  if test "x$has_colon" = x; then
14392    # Not in mixed or Windows style, start by that.
14393    new_path=`cmd //c echo $path`
14394  fi
14395
14396
14397  input_path="$new_path"
14398  # Check if we need to convert this using DOS-style short mode. If the path
14399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14400  # take no chances and rewrite it.
14401  # Note: m4 eats our [], so we need to use [ and ] instead.
14402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14403  if test "x$has_forbidden_chars" != x; then
14404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14406  fi
14407
14408
14409  windows_path="$new_path"
14410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14411    unix_path=`$CYGPATH -u "$windows_path"`
14412    new_path="$unix_path"
14413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14415    new_path="$unix_path"
14416  fi
14417
14418  if test "x$path" != "x$new_path"; then
14419    BOOT_JDK="$new_path"
14420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14421$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14422  fi
14423
14424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14426
14427  else
14428    # We're on a posix platform. Hooray! :)
14429    path="$BOOT_JDK"
14430
14431    if test ! -f "$path" && test ! -d "$path"; then
14432      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14433    fi
14434
14435    has_space=`$ECHO "$path" | $GREP " "`
14436    if test "x$has_space" != x; then
14437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14439      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14440    fi
14441  fi
14442
14443              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14444$as_echo_n "checking for Boot JDK... " >&6; }
14445              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14446$as_echo "$BOOT_JDK" >&6; }
14447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14448$as_echo_n "checking Boot JDK version... " >&6; }
14449              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14450              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14451$as_echo "$BOOT_JDK_VERSION" >&6; }
14452            fi # end check jdk version
14453          fi # end check rt.jar
14454        fi # end check javac
14455      fi # end check java
14456    fi # end check boot jdk found
14457  fi
14458
14459    done
14460  fi
14461
14462
14463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14465      # Do we have a bin/java?
14466      if test ! -x "$BOOT_JDK/bin/java"; then
14467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14469        BOOT_JDK_FOUND=no
14470      else
14471        # Do we have a bin/javac?
14472        if test ! -x "$BOOT_JDK/bin/javac"; then
14473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14477          BOOT_JDK_FOUND=no
14478        else
14479          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14480          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14481            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14483            BOOT_JDK_FOUND=no
14484          else
14485            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14486            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14487
14488            # Extra M4 quote needed to protect [] in grep expression.
14489            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14490            if test "x$FOUND_VERSION_78" = x; then
14491              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14493              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14494$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14495              BOOT_JDK_FOUND=no
14496            else
14497              # We're done! :-)
14498              BOOT_JDK_FOUND=yes
14499
14500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14501
14502  # Input might be given as Windows format, start by converting to
14503  # unix format.
14504  path="$BOOT_JDK"
14505  new_path=`$CYGPATH -u "$path"`
14506
14507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14510  # "foo.exe" is OK but "foo" is an error.
14511  #
14512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14513  # It is also a way to make sure we got the proper file name for the real test later on.
14514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14515  if test "x$test_shortpath" = x; then
14516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14518    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14519  fi
14520
14521  # Call helper function which possibly converts this using DOS-style short mode.
14522  # If so, the updated path is stored in $new_path.
14523
14524  input_path="$new_path"
14525  # Check if we need to convert this using DOS-style short mode. If the path
14526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14527  # take no chances and rewrite it.
14528  # Note: m4 eats our [], so we need to use [ and ] instead.
14529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14530  if test "x$has_forbidden_chars" != x; then
14531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14535      # Going to short mode and back again did indeed matter. Since short mode is
14536      # case insensitive, let's make it lowercase to improve readability.
14537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14538      # Now convert it back to Unix-stile (cygpath)
14539      input_path=`$CYGPATH -u "$shortmode_path"`
14540      new_path="$input_path"
14541    fi
14542  fi
14543
14544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14545  if test "x$test_cygdrive_prefix" = x; then
14546    # As a simple fix, exclude /usr/bin since it's not a real path.
14547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14549      # a path prefixed by /cygdrive for fixpath to work.
14550      new_path="$CYGWIN_ROOT_PATH$input_path"
14551    fi
14552  fi
14553
14554
14555  if test "x$path" != "x$new_path"; then
14556    BOOT_JDK="$new_path"
14557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14558$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14559  fi
14560
14561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14562
14563  path="$BOOT_JDK"
14564  has_colon=`$ECHO $path | $GREP ^.:`
14565  new_path="$path"
14566  if test "x$has_colon" = x; then
14567    # Not in mixed or Windows style, start by that.
14568    new_path=`cmd //c echo $path`
14569  fi
14570
14571
14572  input_path="$new_path"
14573  # Check if we need to convert this using DOS-style short mode. If the path
14574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14575  # take no chances and rewrite it.
14576  # Note: m4 eats our [], so we need to use [ and ] instead.
14577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14578  if test "x$has_forbidden_chars" != x; then
14579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14581  fi
14582
14583
14584  windows_path="$new_path"
14585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14586    unix_path=`$CYGPATH -u "$windows_path"`
14587    new_path="$unix_path"
14588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14590    new_path="$unix_path"
14591  fi
14592
14593  if test "x$path" != "x$new_path"; then
14594    BOOT_JDK="$new_path"
14595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14597  fi
14598
14599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14601
14602  else
14603    # We're on a posix platform. Hooray! :)
14604    path="$BOOT_JDK"
14605
14606    if test ! -f "$path" && test ! -d "$path"; then
14607      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14608    fi
14609
14610    has_space=`$ECHO "$path" | $GREP " "`
14611    if test "x$has_space" != x; then
14612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14614      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14615    fi
14616  fi
14617
14618              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14619$as_echo_n "checking for Boot JDK... " >&6; }
14620              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14621$as_echo "$BOOT_JDK" >&6; }
14622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14623$as_echo_n "checking Boot JDK version... " >&6; }
14624              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14626$as_echo "$BOOT_JDK_VERSION" >&6; }
14627            fi # end check jdk version
14628          fi # end check rt.jar
14629        fi # end check javac
14630      fi # end check java
14631    fi # end check boot jdk found
14632  fi
14633
14634  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14635
14636  if test "x$BOOT_JDK_FOUND" = xno; then
14637    # Now execute the test
14638
14639  BOOT_JDK_PREFIX="/usr/lib/jvm"
14640  BOOT_JDK_SUFFIX=""
14641  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14642  if test "x$ALL_JDKS_FOUND" != x; then
14643    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14644
14645  if test "x$BOOT_JDK_FOUND" = xno; then
14646    # Now execute the test
14647
14648        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14649        if test -d "$BOOT_JDK"; then
14650          BOOT_JDK_FOUND=maybe
14651          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14652$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14653        fi
14654
14655
14656    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14657    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14658      # Do we have a bin/java?
14659      if test ! -x "$BOOT_JDK/bin/java"; then
14660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14662        BOOT_JDK_FOUND=no
14663      else
14664        # Do we have a bin/javac?
14665        if test ! -x "$BOOT_JDK/bin/javac"; then
14666          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14668          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14669$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14670          BOOT_JDK_FOUND=no
14671        else
14672          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14673          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14674            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14676            BOOT_JDK_FOUND=no
14677          else
14678            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14680
14681            # Extra M4 quote needed to protect [] in grep expression.
14682            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14683            if test "x$FOUND_VERSION_78" = x; then
14684              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14686              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14687$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14688              BOOT_JDK_FOUND=no
14689            else
14690              # We're done! :-)
14691              BOOT_JDK_FOUND=yes
14692
14693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14694
14695  # Input might be given as Windows format, start by converting to
14696  # unix format.
14697  path="$BOOT_JDK"
14698  new_path=`$CYGPATH -u "$path"`
14699
14700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14703  # "foo.exe" is OK but "foo" is an error.
14704  #
14705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14706  # It is also a way to make sure we got the proper file name for the real test later on.
14707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14708  if test "x$test_shortpath" = x; then
14709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14711    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14712  fi
14713
14714  # Call helper function which possibly converts this using DOS-style short mode.
14715  # If so, the updated path is stored in $new_path.
14716
14717  input_path="$new_path"
14718  # Check if we need to convert this using DOS-style short mode. If the path
14719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14720  # take no chances and rewrite it.
14721  # Note: m4 eats our [], so we need to use [ and ] instead.
14722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14723  if test "x$has_forbidden_chars" != x; then
14724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14728      # Going to short mode and back again did indeed matter. Since short mode is
14729      # case insensitive, let's make it lowercase to improve readability.
14730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14731      # Now convert it back to Unix-stile (cygpath)
14732      input_path=`$CYGPATH -u "$shortmode_path"`
14733      new_path="$input_path"
14734    fi
14735  fi
14736
14737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14738  if test "x$test_cygdrive_prefix" = x; then
14739    # As a simple fix, exclude /usr/bin since it's not a real path.
14740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14742      # a path prefixed by /cygdrive for fixpath to work.
14743      new_path="$CYGWIN_ROOT_PATH$input_path"
14744    fi
14745  fi
14746
14747
14748  if test "x$path" != "x$new_path"; then
14749    BOOT_JDK="$new_path"
14750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14752  fi
14753
14754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14755
14756  path="$BOOT_JDK"
14757  has_colon=`$ECHO $path | $GREP ^.:`
14758  new_path="$path"
14759  if test "x$has_colon" = x; then
14760    # Not in mixed or Windows style, start by that.
14761    new_path=`cmd //c echo $path`
14762  fi
14763
14764
14765  input_path="$new_path"
14766  # Check if we need to convert this using DOS-style short mode. If the path
14767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14768  # take no chances and rewrite it.
14769  # Note: m4 eats our [], so we need to use [ and ] instead.
14770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14771  if test "x$has_forbidden_chars" != x; then
14772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14774  fi
14775
14776
14777  windows_path="$new_path"
14778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14779    unix_path=`$CYGPATH -u "$windows_path"`
14780    new_path="$unix_path"
14781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14783    new_path="$unix_path"
14784  fi
14785
14786  if test "x$path" != "x$new_path"; then
14787    BOOT_JDK="$new_path"
14788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14790  fi
14791
14792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14794
14795  else
14796    # We're on a posix platform. Hooray! :)
14797    path="$BOOT_JDK"
14798
14799    if test ! -f "$path" && test ! -d "$path"; then
14800      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14801    fi
14802
14803    has_space=`$ECHO "$path" | $GREP " "`
14804    if test "x$has_space" != x; then
14805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14807      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14808    fi
14809  fi
14810
14811              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14812$as_echo_n "checking for Boot JDK... " >&6; }
14813              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14814$as_echo "$BOOT_JDK" >&6; }
14815              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14816$as_echo_n "checking Boot JDK version... " >&6; }
14817              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14818              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14819$as_echo "$BOOT_JDK_VERSION" >&6; }
14820            fi # end check jdk version
14821          fi # end check rt.jar
14822        fi # end check javac
14823      fi # end check java
14824    fi # end check boot jdk found
14825  fi
14826
14827    done
14828  fi
14829
14830
14831    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14832    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14833      # Do we have a bin/java?
14834      if test ! -x "$BOOT_JDK/bin/java"; then
14835        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14837        BOOT_JDK_FOUND=no
14838      else
14839        # Do we have a bin/javac?
14840        if test ! -x "$BOOT_JDK/bin/javac"; then
14841          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14843          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14844$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14845          BOOT_JDK_FOUND=no
14846        else
14847          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14848          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14851            BOOT_JDK_FOUND=no
14852          else
14853            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14854            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14855
14856            # Extra M4 quote needed to protect [] in grep expression.
14857            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14858            if test "x$FOUND_VERSION_78" = x; then
14859              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14861              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14862$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14863              BOOT_JDK_FOUND=no
14864            else
14865              # We're done! :-)
14866              BOOT_JDK_FOUND=yes
14867
14868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14869
14870  # Input might be given as Windows format, start by converting to
14871  # unix format.
14872  path="$BOOT_JDK"
14873  new_path=`$CYGPATH -u "$path"`
14874
14875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14878  # "foo.exe" is OK but "foo" is an error.
14879  #
14880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14881  # It is also a way to make sure we got the proper file name for the real test later on.
14882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14883  if test "x$test_shortpath" = x; then
14884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14887  fi
14888
14889  # Call helper function which possibly converts this using DOS-style short mode.
14890  # If so, the updated path is stored in $new_path.
14891
14892  input_path="$new_path"
14893  # Check if we need to convert this using DOS-style short mode. If the path
14894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14895  # take no chances and rewrite it.
14896  # Note: m4 eats our [], so we need to use [ and ] instead.
14897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14898  if test "x$has_forbidden_chars" != x; then
14899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14903      # Going to short mode and back again did indeed matter. Since short mode is
14904      # case insensitive, let's make it lowercase to improve readability.
14905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14906      # Now convert it back to Unix-stile (cygpath)
14907      input_path=`$CYGPATH -u "$shortmode_path"`
14908      new_path="$input_path"
14909    fi
14910  fi
14911
14912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14913  if test "x$test_cygdrive_prefix" = x; then
14914    # As a simple fix, exclude /usr/bin since it's not a real path.
14915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14917      # a path prefixed by /cygdrive for fixpath to work.
14918      new_path="$CYGWIN_ROOT_PATH$input_path"
14919    fi
14920  fi
14921
14922
14923  if test "x$path" != "x$new_path"; then
14924    BOOT_JDK="$new_path"
14925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14927  fi
14928
14929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14930
14931  path="$BOOT_JDK"
14932  has_colon=`$ECHO $path | $GREP ^.:`
14933  new_path="$path"
14934  if test "x$has_colon" = x; then
14935    # Not in mixed or Windows style, start by that.
14936    new_path=`cmd //c echo $path`
14937  fi
14938
14939
14940  input_path="$new_path"
14941  # Check if we need to convert this using DOS-style short mode. If the path
14942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14943  # take no chances and rewrite it.
14944  # Note: m4 eats our [], so we need to use [ and ] instead.
14945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14946  if test "x$has_forbidden_chars" != x; then
14947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14949  fi
14950
14951
14952  windows_path="$new_path"
14953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14954    unix_path=`$CYGPATH -u "$windows_path"`
14955    new_path="$unix_path"
14956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14958    new_path="$unix_path"
14959  fi
14960
14961  if test "x$path" != "x$new_path"; then
14962    BOOT_JDK="$new_path"
14963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14965  fi
14966
14967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14969
14970  else
14971    # We're on a posix platform. Hooray! :)
14972    path="$BOOT_JDK"
14973
14974    if test ! -f "$path" && test ! -d "$path"; then
14975      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14976    fi
14977
14978    has_space=`$ECHO "$path" | $GREP " "`
14979    if test "x$has_space" != x; then
14980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14982      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14983    fi
14984  fi
14985
14986              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14987$as_echo_n "checking for Boot JDK... " >&6; }
14988              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14989$as_echo "$BOOT_JDK" >&6; }
14990              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14991$as_echo_n "checking Boot JDK version... " >&6; }
14992              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14993              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14994$as_echo "$BOOT_JDK_VERSION" >&6; }
14995            fi # end check jdk version
14996          fi # end check rt.jar
14997        fi # end check javac
14998      fi # end check java
14999    fi # end check boot jdk found
15000  fi
15001
15002  fi
15003
15004
15005    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15006    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15007      # Do we have a bin/java?
15008      if test ! -x "$BOOT_JDK/bin/java"; then
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15011        BOOT_JDK_FOUND=no
15012      else
15013        # Do we have a bin/javac?
15014        if test ! -x "$BOOT_JDK/bin/javac"; then
15015          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15017          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15018$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15019          BOOT_JDK_FOUND=no
15020        else
15021          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15022          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15023            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15025            BOOT_JDK_FOUND=no
15026          else
15027            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15028            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15029
15030            # Extra M4 quote needed to protect [] in grep expression.
15031            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15032            if test "x$FOUND_VERSION_78" = x; then
15033              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15035              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15036$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15037              BOOT_JDK_FOUND=no
15038            else
15039              # We're done! :-)
15040              BOOT_JDK_FOUND=yes
15041
15042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15043
15044  # Input might be given as Windows format, start by converting to
15045  # unix format.
15046  path="$BOOT_JDK"
15047  new_path=`$CYGPATH -u "$path"`
15048
15049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15052  # "foo.exe" is OK but "foo" is an error.
15053  #
15054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15055  # It is also a way to make sure we got the proper file name for the real test later on.
15056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15057  if test "x$test_shortpath" = x; then
15058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15060    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15061  fi
15062
15063  # Call helper function which possibly converts this using DOS-style short mode.
15064  # If so, the updated path is stored in $new_path.
15065
15066  input_path="$new_path"
15067  # Check if we need to convert this using DOS-style short mode. If the path
15068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15069  # take no chances and rewrite it.
15070  # Note: m4 eats our [], so we need to use [ and ] instead.
15071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15072  if test "x$has_forbidden_chars" != x; then
15073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15077      # Going to short mode and back again did indeed matter. Since short mode is
15078      # case insensitive, let's make it lowercase to improve readability.
15079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15080      # Now convert it back to Unix-stile (cygpath)
15081      input_path=`$CYGPATH -u "$shortmode_path"`
15082      new_path="$input_path"
15083    fi
15084  fi
15085
15086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15087  if test "x$test_cygdrive_prefix" = x; then
15088    # As a simple fix, exclude /usr/bin since it's not a real path.
15089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15091      # a path prefixed by /cygdrive for fixpath to work.
15092      new_path="$CYGWIN_ROOT_PATH$input_path"
15093    fi
15094  fi
15095
15096
15097  if test "x$path" != "x$new_path"; then
15098    BOOT_JDK="$new_path"
15099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15101  fi
15102
15103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15104
15105  path="$BOOT_JDK"
15106  has_colon=`$ECHO $path | $GREP ^.:`
15107  new_path="$path"
15108  if test "x$has_colon" = x; then
15109    # Not in mixed or Windows style, start by that.
15110    new_path=`cmd //c echo $path`
15111  fi
15112
15113
15114  input_path="$new_path"
15115  # Check if we need to convert this using DOS-style short mode. If the path
15116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15117  # take no chances and rewrite it.
15118  # Note: m4 eats our [], so we need to use [ and ] instead.
15119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15120  if test "x$has_forbidden_chars" != x; then
15121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15123  fi
15124
15125
15126  windows_path="$new_path"
15127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15128    unix_path=`$CYGPATH -u "$windows_path"`
15129    new_path="$unix_path"
15130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15132    new_path="$unix_path"
15133  fi
15134
15135  if test "x$path" != "x$new_path"; then
15136    BOOT_JDK="$new_path"
15137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15139  fi
15140
15141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15143
15144  else
15145    # We're on a posix platform. Hooray! :)
15146    path="$BOOT_JDK"
15147
15148    if test ! -f "$path" && test ! -d "$path"; then
15149      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15150    fi
15151
15152    has_space=`$ECHO "$path" | $GREP " "`
15153    if test "x$has_space" != x; then
15154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15156      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15157    fi
15158  fi
15159
15160              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15161$as_echo_n "checking for Boot JDK... " >&6; }
15162              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15163$as_echo "$BOOT_JDK" >&6; }
15164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15165$as_echo_n "checking Boot JDK version... " >&6; }
15166              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15168$as_echo "$BOOT_JDK_VERSION" >&6; }
15169            fi # end check jdk version
15170          fi # end check rt.jar
15171        fi # end check javac
15172      fi # end check java
15173    fi # end check boot jdk found
15174  fi
15175
15176
15177# If we haven't found anything yet, we've truly lost. Give up.
15178if test "x$BOOT_JDK_FOUND" = xno; then
15179
15180    # Print a helpful message on how to acquire the necessary build dependency.
15181    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15182    MISSING_DEPENDENCY=openjdk
15183    PKGHANDLER_COMMAND=
15184
15185    case $PKGHANDLER in
15186	apt-get)
15187                apt_help     $MISSING_DEPENDENCY ;;
15188    yum)
15189                yum_help     $MISSING_DEPENDENCY ;;
15190	port)
15191                port_help    $MISSING_DEPENDENCY ;;
15192	pkgutil)
15193                pkgutil_help $MISSING_DEPENDENCY ;;
15194	pkgadd)
15195                pkgadd_help  $MISSING_DEPENDENCY ;;
15196    * )
15197      break ;;
15198    esac
15199
15200    if test "x$PKGHANDLER_COMMAND" != x; then
15201        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15202    fi
15203
15204  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15205$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15207$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15208  as_fn_error $? "Cannot continue" "$LINENO" 5
15209fi
15210
15211# Setup proper paths for what we found
15212BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15213if test ! -f "$BOOT_RTJAR"; then
15214    # On MacOSX it is called classes.jar
15215    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15216    if test -f "$BOOT_RTJAR"; then
15217      # Remove the ..
15218      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15219    fi
15220fi
15221BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15222BOOT_JDK="$BOOT_JDK"
15223
15224
15225
15226
15227# Setup tools from the Boot JDK.
15228
15229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15230$as_echo_n "checking for java in Boot JDK... " >&6; }
15231  JAVA=$BOOT_JDK/bin/java
15232  if test ! -x $JAVA; then
15233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15234$as_echo "not found" >&6; }
15235      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15236$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15237      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15238  fi
15239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15240$as_echo "ok" >&6; }
15241
15242
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15244$as_echo_n "checking for javac in Boot JDK... " >&6; }
15245  JAVAC=$BOOT_JDK/bin/javac
15246  if test ! -x $JAVAC; then
15247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15248$as_echo "not found" >&6; }
15249      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15250$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15251      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15252  fi
15253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15254$as_echo "ok" >&6; }
15255
15256
15257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15258$as_echo_n "checking for javah in Boot JDK... " >&6; }
15259  JAVAH=$BOOT_JDK/bin/javah
15260  if test ! -x $JAVAH; then
15261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15262$as_echo "not found" >&6; }
15263      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15264$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15265      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15266  fi
15267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15268$as_echo "ok" >&6; }
15269
15270
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15272$as_echo_n "checking for javap in Boot JDK... " >&6; }
15273  JAVAP=$BOOT_JDK/bin/javap
15274  if test ! -x $JAVAP; then
15275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15276$as_echo "not found" >&6; }
15277      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15278$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15279      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15280  fi
15281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15282$as_echo "ok" >&6; }
15283
15284
15285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15286$as_echo_n "checking for jar in Boot JDK... " >&6; }
15287  JAR=$BOOT_JDK/bin/jar
15288  if test ! -x $JAR; then
15289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15290$as_echo "not found" >&6; }
15291      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15292$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15293      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15294  fi
15295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15296$as_echo "ok" >&6; }
15297
15298
15299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15300$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15301  RMIC=$BOOT_JDK/bin/rmic
15302  if test ! -x $RMIC; then
15303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15304$as_echo "not found" >&6; }
15305      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15306$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15307      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15308  fi
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15310$as_echo "ok" >&6; }
15311
15312
15313  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15314$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15315  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15316  if test ! -x $NATIVE2ASCII; then
15317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15318$as_echo "not found" >&6; }
15319      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15320$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15321      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15322  fi
15323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15324$as_echo "ok" >&6; }
15325
15326
15327# Finally, set some other options...
15328
15329# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15330BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15331
15332
15333
15334
15335##############################################################################
15336#
15337# Specify options for anything that is run with the Boot JDK.
15338#
15339
15340# Check whether --with-boot-jdk-jvmargs was given.
15341if test "${with_boot_jdk_jvmargs+set}" = set; then :
15342  withval=$with_boot_jdk_jvmargs;
15343fi
15344
15345
15346if test "x$with_boot_jdk_jvmargs" = x; then
15347    # Not all JVM:s accept the same arguments on the command line.
15348    # OpenJDK specific increase in thread stack for JDK build,
15349    # well more specifically, when running javac.
15350    if test "x$BUILD_NUM_BITS" = x32; then
15351       STACK_SIZE=768
15352    else
15353       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15354       # since 64-bit pointers are pushed on the stach. Apparently, we need
15355       # to increase the stack space when javacing the JDK....
15356       STACK_SIZE=1536
15357    fi
15358
15359    # Minimum amount of heap memory.
15360
15361    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15362    # If so, then append -Xms64M to boot_jdk_jvmargs
15363    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15364    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15365    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15366        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15367    fi
15368
15369    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15370        # Why does macosx need more heap? Its the huge JDK batch.
15371
15372    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15373    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15374    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15375    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15376    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15377        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15378    fi
15379
15380    else
15381
15382    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15383    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15384    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15385    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15386    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15387        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15388    fi
15389
15390    fi
15391    # When is adding -client something that speeds up the JVM?
15392    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15393
15394    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15395    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15396    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15397    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15398    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15399        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15400    fi
15401
15402
15403    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15404    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15405    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15406    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15407    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15408        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15409    fi
15410
15411
15412    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15413    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15414    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15415    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15416    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15417        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15418    fi
15419
15420    # Disable special log output when a debug build is used as Boot JDK...
15421
15422    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15423    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15424    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15425    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15426    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15427        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15428    fi
15429
15430fi
15431
15432BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15433
15434
15435
15436###############################################################################
15437#
15438# Configure the sources to use. We can add or override individual directories.
15439#
15440###############################################################################
15441
15442
15443
15444# Where are the sources. Any of these can be overridden
15445# using --with-override-corba and the likes.
15446LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15447CORBA_TOPDIR="$SRC_ROOT/corba"
15448JAXP_TOPDIR="$SRC_ROOT/jaxp"
15449JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15450HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15451JDK_TOPDIR="$SRC_ROOT/jdk"
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461###############################################################################
15462#
15463# Pickup additional source for a component from outside of the source root
15464# or override source for a component.
15465#
15466
15467# Check whether --with-add-source-root was given.
15468if test "${with_add_source_root+set}" = set; then :
15469  withval=$with_add_source_root;
15470fi
15471
15472
15473
15474# Check whether --with-override-source-root was given.
15475if test "${with_override_source_root+set}" = set; then :
15476  withval=$with_override_source_root;
15477fi
15478
15479
15480
15481# Check whether --with-adds-and-overrides was given.
15482if test "${with_adds_and_overrides+set}" = set; then :
15483  withval=$with_adds_and_overrides;
15484fi
15485
15486
15487if test "x$with_adds_and_overrides" != x; then
15488    with_add_source_root="$with_adds_and_overrides/adds"
15489    with_override_source_root="$with_adds_and_overrides/overrides"
15490fi
15491
15492if test "x$with_add_source_root" != x; then
15493    if ! test -d $with_add_source_root; then
15494       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15495    fi
15496    CURDIR="$PWD"
15497    cd "$with_add_source_root"
15498    ADD_SRC_ROOT="`pwd`"
15499    cd "$CURDIR"
15500    # Verify that the addon source root does not have any root makefiles.
15501    # If it does, then it is usually an error, prevent this.
15502    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15503       test -f $with_add_source_root/langtools/make/Makefile; then
15504        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
15505    fi
15506    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15507       test -f $with_add_source_root/corba/make/Makefile; then
15508        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
15509    fi
15510    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15511       test -f $with_add_source_root/jaxp/make/Makefile; then
15512        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
15513    fi
15514    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15515       test -f $with_add_source_root/jaxws/make/Makefile; then
15516        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
15517    fi
15518    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15519       test -f $with_add_source_root/hotspot/make/Makefile; then
15520        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
15521    fi
15522    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15523       test -f $with_add_source_root/jdk/make/Makefile; then
15524        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
15525    fi
15526fi
15527
15528
15529if test "x$with_override_source_root" != x; then
15530    if ! test -d $with_override_source_root; then
15531       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15532    fi
15533    CURDIR="$PWD"
15534    cd "$with_override_source_root"
15535    OVERRIDE_SRC_ROOT="`pwd`"
15536    cd "$CURDIR"
15537    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15538       test -f $with_override_source_root/langtools/make/Makefile; then
15539        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
15540    fi
15541    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15542       test -f $with_override_source_root/corba/make/Makefile; then
15543        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
15544    fi
15545    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15546       test -f $with_override_source_root/jaxp/make/Makefile; then
15547        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
15548    fi
15549    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15550       test -f $with_override_source_root/jaxws/make/Makefile; then
15551        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
15552    fi
15553    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15554       test -f $with_override_source_root/hotspot/make/Makefile; then
15555        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
15556    fi
15557    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15558       test -f $with_override_source_root/jdk/make/Makefile; then
15559        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
15560    fi
15561fi
15562
15563
15564###############################################################################
15565#
15566# Override a repo completely, this is used for example when you have 3 small
15567# development sandboxes of the langtools sources and want to avoid having 3 full
15568# OpenJDK sources checked out on disk.
15569#
15570# Assuming that the 3 langtools sandboxes are located here:
15571# /home/fredrik/sandbox1/langtools
15572# /home/fredrik/sandbox2/langtools
15573# /home/fredrik/sandbox3/langtools
15574#
15575# From the source root you create build subdirs manually:
15576#     mkdir -p build1 build2 build3
15577# in each build directory run:
15578#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15579#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15580#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15581#
15582
15583
15584# Check whether --with-override-langtools was given.
15585if test "${with_override_langtools+set}" = set; then :
15586  withval=$with_override_langtools;
15587fi
15588
15589
15590
15591# Check whether --with-override-corba was given.
15592if test "${with_override_corba+set}" = set; then :
15593  withval=$with_override_corba;
15594fi
15595
15596
15597
15598# Check whether --with-override-jaxp was given.
15599if test "${with_override_jaxp+set}" = set; then :
15600  withval=$with_override_jaxp;
15601fi
15602
15603
15604
15605# Check whether --with-override-jaxws was given.
15606if test "${with_override_jaxws+set}" = set; then :
15607  withval=$with_override_jaxws;
15608fi
15609
15610
15611
15612# Check whether --with-override-hotspot was given.
15613if test "${with_override_hotspot+set}" = set; then :
15614  withval=$with_override_hotspot;
15615fi
15616
15617
15618
15619# Check whether --with-override-jdk was given.
15620if test "${with_override_jdk+set}" = set; then :
15621  withval=$with_override_jdk;
15622fi
15623
15624
15625if test "x$with_override_langtools" != x; then
15626    CURDIR="$PWD"
15627    cd "$with_override_langtools"
15628    LANGTOOLS_TOPDIR="`pwd`"
15629    cd "$CURDIR"
15630    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15631        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15632    fi
15633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15634$as_echo_n "checking if langtools should be overridden... " >&6; }
15635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15636$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15637fi
15638if test "x$with_override_corba" != x; then
15639    CURDIR="$PWD"
15640    cd "$with_override_corba"
15641    CORBA_TOPDIR="`pwd`"
15642    cd "$CURDIR"
15643    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15644        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15645    fi
15646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15647$as_echo_n "checking if corba should be overridden... " >&6; }
15648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15649$as_echo "yes with $CORBA_TOPDIR" >&6; }
15650fi
15651if test "x$with_override_jaxp" != x; then
15652    CURDIR="$PWD"
15653    cd "$with_override_jaxp"
15654    JAXP_TOPDIR="`pwd`"
15655    cd "$CURDIR"
15656    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15657        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15658    fi
15659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15660$as_echo_n "checking if jaxp should be overridden... " >&6; }
15661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15662$as_echo "yes with $JAXP_TOPDIR" >&6; }
15663fi
15664if test "x$with_override_jaxws" != x; then
15665    CURDIR="$PWD"
15666    cd "$with_override_jaxws"
15667    JAXWS_TOPDIR="`pwd`"
15668    cd "$CURDIR"
15669    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15670        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15671    fi
15672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15673$as_echo_n "checking if jaxws should be overridden... " >&6; }
15674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15675$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15676fi
15677if test "x$with_override_hotspot" != x; then
15678    CURDIR="$PWD"
15679    cd "$with_override_hotspot"
15680    HOTSPOT_TOPDIR="`pwd`"
15681    cd "$CURDIR"
15682    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15683       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15684        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15685    fi
15686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15687$as_echo_n "checking if hotspot should be overridden... " >&6; }
15688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15689$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15690fi
15691if test "x$with_override_jdk" != x; then
15692    CURDIR="$PWD"
15693    cd "$with_override_jdk"
15694    JDK_TOPDIR="`pwd`"
15695    cd "$CURDIR"
15696    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15697        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15698    fi
15699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15700$as_echo_n "checking if JDK should be overridden... " >&6; }
15701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15702$as_echo "yes with $JDK_TOPDIR" >&6; }
15703fi
15704
15705
15706
15707BUILD_OUTPUT="$OUTPUT_ROOT"
15708
15709
15710HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15711BUILD_HOTSPOT=true
15712
15713
15714
15715# Check whether --with-import-hotspot was given.
15716if test "${with_import_hotspot+set}" = set; then :
15717  withval=$with_import_hotspot;
15718fi
15719
15720if test "x$with_import_hotspot" != x; then
15721    CURDIR="$PWD"
15722    cd "$with_import_hotspot"
15723    HOTSPOT_DIST="`pwd`"
15724    cd "$CURDIR"
15725    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15726        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15727    fi
15728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15729$as_echo_n "checking if hotspot should be imported... " >&6; }
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15731$as_echo "yes from $HOTSPOT_DIST" >&6; }
15732    BUILD_HOTSPOT=false
15733fi
15734
15735JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15736
15737
15738###############################################################################
15739#
15740# Setup the toolchain (compilers etc), i.e. the tools that need to be
15741# cross-compilation aware.
15742#
15743###############################################################################
15744
15745
15746###############################################################################
15747#
15748# Configure the development tool paths and potential sysroot.
15749#
15750ac_ext=cpp
15751ac_cpp='$CXXCPP $CPPFLAGS'
15752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15755
15756
15757# The option used to specify the target .o,.a or .so file.
15758# When compiling, how to specify the to be created object file.
15759CC_OUT_OPTION='-o$(SPACE)'
15760# When linking, how to specify the to be created executable.
15761EXE_OUT_OPTION='-o$(SPACE)'
15762# When linking, how to specify the to be created dynamically linkable library.
15763LD_OUT_OPTION='-o$(SPACE)'
15764# When archiving, how to specify the to be create static archive for object files.
15765AR_OUT_OPTION='rcs$(SPACE)'
15766
15767
15768
15769
15770
15771# Locate the actual tools
15772
15773if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15774
15775  # Store path to cygwin link.exe to help excluding it when searching for
15776  # VS linker. This must be done before changing the PATH when looking for VS.
15777  # Extract the first word of "link", so it can be a program name with args.
15778set dummy link; ac_word=$2
15779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15780$as_echo_n "checking for $ac_word... " >&6; }
15781if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15782  $as_echo_n "(cached) " >&6
15783else
15784  case $CYGWIN_LINK in
15785  [\\/]* | ?:[\\/]*)
15786  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15787  ;;
15788  *)
15789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15790for as_dir in $PATH
15791do
15792  IFS=$as_save_IFS
15793  test -z "$as_dir" && as_dir=.
15794    for ac_exec_ext in '' $ac_executable_extensions; do
15795  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15796    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15798    break 2
15799  fi
15800done
15801  done
15802IFS=$as_save_IFS
15803
15804  ;;
15805esac
15806fi
15807CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15808if test -n "$CYGWIN_LINK"; then
15809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15810$as_echo "$CYGWIN_LINK" >&6; }
15811else
15812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15813$as_echo "no" >&6; }
15814fi
15815
15816
15817  if test "x$CYGWIN_LINK" != x; then
15818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15819$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15820    "$CYGWIN_LINK" --version > /dev/null
15821    if test $? -eq 0 ; then
15822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15823$as_echo "yes" >&6; }
15824    else
15825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15826$as_echo "no" >&6; }
15827      # This might be the VS linker. Don't exclude it later on.
15828      CYGWIN_LINK=""
15829    fi
15830  fi
15831
15832  # First-hand choice is to locate and run the vsvars bat file.
15833
15834  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15835    VCVARSFILE="vc/bin/vcvars32.bat"
15836  else
15837    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15838  fi
15839
15840  VS_ENV_CMD=""
15841  VS_ENV_ARGS=""
15842  if test "x$with_toolsdir" != x; then
15843
15844  if test "x$VS_ENV_CMD" = x; then
15845    VS100BASE="$with_toolsdir/../.."
15846    METHOD="--with-tools-dir"
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  fi
15872
15873  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15874    # Having specified an argument which is incorrect will produce an instant failure;
15875    # we should not go on looking
15876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15877$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15878    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15879$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15880    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15881  fi
15882
15883  if test "x$ProgramW6432" != x; then
15884
15885  if test "x$VS_ENV_CMD" = x; then
15886    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15887    METHOD="well-known name"
15888
15889  windows_path="$WIN_SDK_BASE"
15890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15891    unix_path=`$CYGPATH -u "$windows_path"`
15892    WIN_SDK_BASE="$unix_path"
15893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15895    WIN_SDK_BASE="$unix_path"
15896  fi
15897
15898    if test -d "$WIN_SDK_BASE"; then
15899      # There have been cases of partial or broken SDK installations. A missing
15900      # lib dir is not going to work.
15901      if test ! -d "$WIN_SDK_BASE/../lib"; then
15902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15903$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15904        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15905$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15906      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15907        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15908$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15909        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15910        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15911          VS_ENV_ARGS="/x86"
15912        else
15913          VS_ENV_ARGS="/x64"
15914        fi
15915      else
15916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15918        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15919$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15920      fi
15921    fi
15922  fi
15923
15924  fi
15925  if test "x$PROGRAMW6432" != x; then
15926
15927  if test "x$VS_ENV_CMD" = x; then
15928    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15929    METHOD="well-known name"
15930
15931  windows_path="$WIN_SDK_BASE"
15932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15933    unix_path=`$CYGPATH -u "$windows_path"`
15934    WIN_SDK_BASE="$unix_path"
15935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15937    WIN_SDK_BASE="$unix_path"
15938  fi
15939
15940    if test -d "$WIN_SDK_BASE"; then
15941      # There have been cases of partial or broken SDK installations. A missing
15942      # lib dir is not going to work.
15943      if test ! -d "$WIN_SDK_BASE/../lib"; then
15944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15947$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15948      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15949        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15950$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15951        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15952        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15953          VS_ENV_ARGS="/x86"
15954        else
15955          VS_ENV_ARGS="/x64"
15956        fi
15957      else
15958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15959$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15960        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15961$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15962      fi
15963    fi
15964  fi
15965
15966  fi
15967  if test "x$PROGRAMFILES" != x; then
15968
15969  if test "x$VS_ENV_CMD" = x; then
15970    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15971    METHOD="well-known name"
15972
15973  windows_path="$WIN_SDK_BASE"
15974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975    unix_path=`$CYGPATH -u "$windows_path"`
15976    WIN_SDK_BASE="$unix_path"
15977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15979    WIN_SDK_BASE="$unix_path"
15980  fi
15981
15982    if test -d "$WIN_SDK_BASE"; then
15983      # There have been cases of partial or broken SDK installations. A missing
15984      # lib dir is not going to work.
15985      if test ! -d "$WIN_SDK_BASE/../lib"; then
15986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15987$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15988        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15989$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15990      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15991        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15992$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15993        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15994        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15995          VS_ENV_ARGS="/x86"
15996        else
15997          VS_ENV_ARGS="/x64"
15998        fi
15999      else
16000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16001$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16002        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16003$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16004      fi
16005    fi
16006  fi
16007
16008  fi
16009
16010  if test "x$VS_ENV_CMD" = x; then
16011    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16012    METHOD="well-known name"
16013
16014  windows_path="$WIN_SDK_BASE"
16015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16016    unix_path=`$CYGPATH -u "$windows_path"`
16017    WIN_SDK_BASE="$unix_path"
16018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16020    WIN_SDK_BASE="$unix_path"
16021  fi
16022
16023    if test -d "$WIN_SDK_BASE"; then
16024      # There have been cases of partial or broken SDK installations. A missing
16025      # lib dir is not going to work.
16026      if test ! -d "$WIN_SDK_BASE/../lib"; then
16027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16029        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16030$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16031      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16033$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16034        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16035        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16036          VS_ENV_ARGS="/x86"
16037        else
16038          VS_ENV_ARGS="/x64"
16039        fi
16040      else
16041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16042$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16044$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16045      fi
16046    fi
16047  fi
16048
16049
16050  if test "x$VS_ENV_CMD" = x; then
16051    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16052    METHOD="well-known name"
16053
16054  windows_path="$WIN_SDK_BASE"
16055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16056    unix_path=`$CYGPATH -u "$windows_path"`
16057    WIN_SDK_BASE="$unix_path"
16058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16060    WIN_SDK_BASE="$unix_path"
16061  fi
16062
16063    if test -d "$WIN_SDK_BASE"; then
16064      # There have been cases of partial or broken SDK installations. A missing
16065      # lib dir is not going to work.
16066      if test ! -d "$WIN_SDK_BASE/../lib"; then
16067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16070$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16071      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16074        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16075        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16076          VS_ENV_ARGS="/x86"
16077        else
16078          VS_ENV_ARGS="/x64"
16079        fi
16080      else
16081        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16082$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16083        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16084$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16085      fi
16086    fi
16087  fi
16088
16089
16090  if test "x$VS100COMNTOOLS" != x; then
16091
16092  if test "x$VS_ENV_CMD" = x; then
16093    VS100BASE="$VS100COMNTOOLS/../.."
16094    METHOD="VS100COMNTOOLS variable"
16095
16096  windows_path="$VS100BASE"
16097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16098    unix_path=`$CYGPATH -u "$windows_path"`
16099    VS100BASE="$unix_path"
16100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16102    VS100BASE="$unix_path"
16103  fi
16104
16105    if test -d "$VS100BASE"; then
16106      if test -f "$VS100BASE/$VCVARSFILE"; then
16107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16108$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16109        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16110      else
16111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16112$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16114$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16115      fi
16116    fi
16117  fi
16118
16119  fi
16120  if test "x$PROGRAMFILES" != x; then
16121
16122  if test "x$VS_ENV_CMD" = x; then
16123    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16124    METHOD="well-known name"
16125
16126  windows_path="$VS100BASE"
16127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16128    unix_path=`$CYGPATH -u "$windows_path"`
16129    VS100BASE="$unix_path"
16130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16132    VS100BASE="$unix_path"
16133  fi
16134
16135    if test -d "$VS100BASE"; then
16136      if test -f "$VS100BASE/$VCVARSFILE"; then
16137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16138$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16139        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16140      else
16141        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16142$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16143        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16144$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16145      fi
16146    fi
16147  fi
16148
16149  fi
16150
16151  if test "x$VS_ENV_CMD" = x; then
16152    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16153    METHOD="well-known name"
16154
16155  windows_path="$VS100BASE"
16156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157    unix_path=`$CYGPATH -u "$windows_path"`
16158    VS100BASE="$unix_path"
16159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16161    VS100BASE="$unix_path"
16162  fi
16163
16164    if test -d "$VS100BASE"; then
16165      if test -f "$VS100BASE/$VCVARSFILE"; then
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16167$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16168        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16169      else
16170        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16171$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16172        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16173$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16174      fi
16175    fi
16176  fi
16177
16178
16179  if test "x$VS_ENV_CMD" = x; then
16180    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16181    METHOD="well-known name"
16182
16183  windows_path="$VS100BASE"
16184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16185    unix_path=`$CYGPATH -u "$windows_path"`
16186    VS100BASE="$unix_path"
16187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16189    VS100BASE="$unix_path"
16190  fi
16191
16192    if test -d "$VS100BASE"; then
16193      if test -f "$VS100BASE/$VCVARSFILE"; then
16194        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16195$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16196        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16197      else
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16199$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16200        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16201$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16202      fi
16203    fi
16204  fi
16205
16206
16207  if test "x$VS_ENV_CMD" != x; then
16208    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16209
16210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16211
16212  # First separate the path from the arguments. This will split at the first
16213  # space.
16214  complete="$VS_ENV_CMD"
16215  path="${complete%% *}"
16216  tmp="$complete EOL"
16217  arguments="${tmp#* }"
16218
16219  # Input might be given as Windows format, start by converting to
16220  # unix format.
16221  new_path=`$CYGPATH -u "$path"`
16222
16223  # Now try to locate executable using which
16224  new_path=`$WHICH "$new_path" 2> /dev/null`
16225  # bat and cmd files are not always considered executable in cygwin causing which
16226  # to not find them
16227  if test "x$new_path" = x \
16228           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16229           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16230    new_path=`$CYGPATH -u "$path"`
16231  fi
16232  if test "x$new_path" = x; then
16233    # Oops. Which didn't find the executable.
16234    # The splitting of arguments from the executable at a space might have been incorrect,
16235    # since paths with space are more likely in Windows. Give it another try with the whole
16236    # argument.
16237    path="$complete"
16238    arguments="EOL"
16239    new_path=`$CYGPATH -u "$path"`
16240    new_path=`$WHICH "$new_path" 2> /dev/null`
16241    # bat and cmd files are not always considered executable in cygwin causing which
16242    # to not find them
16243    if test "x$new_path" = x \
16244             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16245             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16246      new_path=`$CYGPATH -u "$path"`
16247    fi
16248    if test "x$new_path" = x; then
16249      # It's still not found. Now this is an unrecoverable error.
16250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16251$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16252      has_space=`$ECHO "$complete" | $GREP " "`
16253      if test "x$has_space" != x; then
16254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16256      fi
16257      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16258    fi
16259  fi
16260
16261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16264  # "foo.exe" is OK but "foo" is an error.
16265  #
16266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16267  # It is also a way to make sure we got the proper file name for the real test later on.
16268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16269  if test "x$test_shortpath" = x; then
16270    # Short path failed, file does not exist as specified.
16271    # Try adding .exe or .cmd
16272    if test -f "${new_path}.exe"; then
16273       input_to_shortpath="${new_path}.exe"
16274    elif test -f "${new_path}.cmd"; then
16275       input_to_shortpath="${new_path}.cmd"
16276    else
16277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16278$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16281      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16282    fi
16283  else
16284    input_to_shortpath="$new_path"
16285  fi
16286
16287  # Call helper function which possibly converts this using DOS-style short mode.
16288  # If so, the updated path is stored in $new_path.
16289  new_path="$input_to_shortpath"
16290
16291  input_path="$input_to_shortpath"
16292  # Check if we need to convert this using DOS-style short mode. If the path
16293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16294  # take no chances and rewrite it.
16295  # Note: m4 eats our [], so we need to use [ and ] instead.
16296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16297  if test "x$has_forbidden_chars" != x; then
16298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16302      # Going to short mode and back again did indeed matter. Since short mode is
16303      # case insensitive, let's make it lowercase to improve readability.
16304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16305      # Now convert it back to Unix-stile (cygpath)
16306      input_path=`$CYGPATH -u "$shortmode_path"`
16307      new_path="$input_path"
16308    fi
16309  fi
16310
16311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16312  if test "x$test_cygdrive_prefix" = x; then
16313    # As a simple fix, exclude /usr/bin since it's not a real path.
16314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16316      # a path prefixed by /cygdrive for fixpath to work.
16317      new_path="$CYGWIN_ROOT_PATH$input_path"
16318    fi
16319  fi
16320
16321  # remove trailing .exe if any
16322  new_path="${new_path/%.exe/}"
16323
16324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325
16326  # First separate the path from the arguments. This will split at the first
16327  # space.
16328  complete="$VS_ENV_CMD"
16329  path="${complete%% *}"
16330  tmp="$complete EOL"
16331  arguments="${tmp#* }"
16332
16333  # Input might be given as Windows format, start by converting to
16334  # unix format.
16335  new_path="$path"
16336
16337  windows_path="$new_path"
16338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16339    unix_path=`$CYGPATH -u "$windows_path"`
16340    new_path="$unix_path"
16341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16343    new_path="$unix_path"
16344  fi
16345
16346
16347  # Now try to locate executable using which
16348  new_path=`$WHICH "$new_path" 2> /dev/null`
16349
16350  if test "x$new_path" = x; then
16351    # Oops. Which didn't find the executable.
16352    # The splitting of arguments from the executable at a space might have been incorrect,
16353    # since paths with space are more likely in Windows. Give it another try with the whole
16354    # argument.
16355    path="$complete"
16356    arguments="EOL"
16357    new_path="$path"
16358
16359  windows_path="$new_path"
16360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16361    unix_path=`$CYGPATH -u "$windows_path"`
16362    new_path="$unix_path"
16363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16365    new_path="$unix_path"
16366  fi
16367
16368
16369    new_path=`$WHICH "$new_path" 2> /dev/null`
16370
16371    if test "x$new_path" = x; then
16372      # It's still not found. Now this is an unrecoverable error.
16373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16374$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16375      has_space=`$ECHO "$complete" | $GREP " "`
16376      if test "x$has_space" != x; then
16377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16379      fi
16380      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16381    fi
16382  fi
16383
16384  # Now new_path has a complete unix path to the binary
16385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16386    # Keep paths in /bin as-is, but remove trailing .exe if any
16387    new_path="${new_path/%.exe/}"
16388    # Do not save /bin paths to all_fixpath_prefixes!
16389  else
16390    # Not in mixed or Windows style, start by that.
16391    new_path=`cmd //c echo $new_path`
16392
16393  input_path="$new_path"
16394  # Check if we need to convert this using DOS-style short mode. If the path
16395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16396  # take no chances and rewrite it.
16397  # Note: m4 eats our [], so we need to use [ and ] instead.
16398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16399  if test "x$has_forbidden_chars" != x; then
16400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16402  fi
16403
16404    # Output is in $new_path
16405
16406  windows_path="$new_path"
16407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16408    unix_path=`$CYGPATH -u "$windows_path"`
16409    new_path="$unix_path"
16410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16412    new_path="$unix_path"
16413  fi
16414
16415    # remove trailing .exe if any
16416    new_path="${new_path/%.exe/}"
16417
16418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16420  fi
16421
16422  else
16423    # We're on a posix platform. Hooray! :)
16424    # First separate the path from the arguments. This will split at the first
16425    # space.
16426    complete="$VS_ENV_CMD"
16427    path="${complete%% *}"
16428    tmp="$complete EOL"
16429    arguments="${tmp#* }"
16430
16431    # Cannot rely on the command "which" here since it doesn't always work.
16432    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16433    if test -z "$is_absolute_path"; then
16434      # Path to executable is not absolute. Find it.
16435      IFS_save="$IFS"
16436      IFS=:
16437      for p in $PATH; do
16438        if test -f "$p/$path" && test -x "$p/$path"; then
16439          new_path="$p/$path"
16440          break
16441        fi
16442      done
16443      IFS="$IFS_save"
16444    else
16445      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16446$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16447      new_path="$path"
16448    fi
16449
16450    if test "x$new_path" = x; then
16451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16452$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16453        has_space=`$ECHO "$complete" | $GREP " "`
16454        if test "x$has_space" != x; then
16455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16457        fi
16458        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16459      fi
16460  fi
16461
16462      # Now join together the path and the arguments once again
16463      if test "x$arguments" != xEOL; then
16464        new_complete="$new_path ${arguments% *}"
16465      else
16466        new_complete="$new_path"
16467      fi
16468
16469  if test "x$complete" != "x$new_complete"; then
16470      VS_ENV_CMD="$new_complete"
16471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16472$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16473    fi
16474
16475
16476    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16477    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16478$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16479    cd $OUTPUT_ROOT
16480    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16481    # to autoconf standards.
16482
16483    #----
16484
16485    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16486    # but calculate the difference in Cygwin environment before/after running it and then
16487    # apply the diff.
16488
16489    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16490      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16491      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16492      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16493    else
16494      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16495      _dosbash=`cmd //c echo \`which bash\``
16496    fi
16497
16498    # generate the set of exported vars before/after the vs10 setup
16499    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16500    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16501    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16502    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16503
16504    # Now execute the newly created bat file.
16505    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16506    cmd /c localdevenvtmp.bat | cat
16507
16508    # apply the diff (less some non-vs10 vars named by "!")
16509    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16510    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16511    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16512
16513    # cleanup
16514    $RM localdevenvtmp*
16515    #----
16516    cd $CURDIR
16517    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16519$as_echo "no" >&6; }
16520      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16521$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16522      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16523$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16524      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16525$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16526      as_fn_error $? "Cannot continue" "$LINENO" 5
16527    fi
16528
16529    # Now set all paths and other env variables. This will allow the rest of
16530    # the configure script to find and run the compiler in the proper way.
16531    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16532$as_echo "$as_me: Setting extracted environment variables" >&6;}
16533    . $OUTPUT_ROOT/localdevenv.sh
16534  else
16535    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16536    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16537$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16538  fi
16539
16540  # At this point, we should have corrent variables in the environment, or we can't continue.
16541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16542$as_echo_n "checking for Visual Studio variables... " >&6; }
16543
16544  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16545    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16547$as_echo "present but broken" >&6; }
16548      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16549    else
16550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16551$as_echo "ok" >&6; }
16552      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16553      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16554      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16555      VS_PATH="$PATH"
16556
16557
16558
16559    fi
16560  else
16561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16562$as_echo "not found" >&6; }
16563
16564    if test "x$VS_ENV_CMD" = x; then
16565      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16566$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16567      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16568$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16569    else
16570      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16571$as_echo "$as_me: Running the extraction script failed." >&6;}
16572    fi
16573    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16574$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16575    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16576$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16577    as_fn_error $? "Cannot continue" "$LINENO" 5
16578  fi
16579
16580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16581$as_echo_n "checking for msvcr100.dll... " >&6; }
16582
16583# Check whether --with-msvcr-dll was given.
16584if test "${with_msvcr_dll+set}" = set; then :
16585  withval=$with_msvcr_dll;
16586fi
16587
16588  if test "x$with_msvcr_dll" != x; then
16589    MSVCR_DLL="$with_msvcr_dll"
16590  else
16591    if test "x$VCINSTALLDIR" != x; then
16592      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16593        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16594      else
16595        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16596        if test "x$MSVCR_DLL" = x; then
16597          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16598        fi
16599      fi
16600      if test "x$MSVCR_DLL" != x; then
16601        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16602$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16603      else
16604        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16605$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16606      fi
16607    fi
16608    if test "x$MSVCR_DLL" = x; then
16609      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16610        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16611$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16612        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16613      fi
16614    fi
16615  fi
16616  if test "x$MSVCR_DLL" = x; then
16617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16618$as_echo "no" >&6; }
16619    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16620  fi
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16622$as_echo "$MSVCR_DLL" >&6; }
16623
16624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16625
16626  # Input might be given as Windows format, start by converting to
16627  # unix format.
16628  path="$MSVCR_DLL"
16629  new_path=`$CYGPATH -u "$path"`
16630
16631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16634  # "foo.exe" is OK but "foo" is an error.
16635  #
16636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16637  # It is also a way to make sure we got the proper file name for the real test later on.
16638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16639  if test "x$test_shortpath" = x; then
16640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16641$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16642    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16643  fi
16644
16645  # Call helper function which possibly converts this using DOS-style short mode.
16646  # If so, the updated path is stored in $new_path.
16647
16648  input_path="$new_path"
16649  # Check if we need to convert this using DOS-style short mode. If the path
16650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16651  # take no chances and rewrite it.
16652  # Note: m4 eats our [], so we need to use [ and ] instead.
16653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16654  if test "x$has_forbidden_chars" != x; then
16655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16659      # Going to short mode and back again did indeed matter. Since short mode is
16660      # case insensitive, let's make it lowercase to improve readability.
16661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16662      # Now convert it back to Unix-stile (cygpath)
16663      input_path=`$CYGPATH -u "$shortmode_path"`
16664      new_path="$input_path"
16665    fi
16666  fi
16667
16668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16669  if test "x$test_cygdrive_prefix" = x; then
16670    # As a simple fix, exclude /usr/bin since it's not a real path.
16671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16673      # a path prefixed by /cygdrive for fixpath to work.
16674      new_path="$CYGWIN_ROOT_PATH$input_path"
16675    fi
16676  fi
16677
16678
16679  if test "x$path" != "x$new_path"; then
16680    MSVCR_DLL="$new_path"
16681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16682$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16683  fi
16684
16685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16686
16687  path="$MSVCR_DLL"
16688  has_colon=`$ECHO $path | $GREP ^.:`
16689  new_path="$path"
16690  if test "x$has_colon" = x; then
16691    # Not in mixed or Windows style, start by that.
16692    new_path=`cmd //c echo $path`
16693  fi
16694
16695
16696  input_path="$new_path"
16697  # Check if we need to convert this using DOS-style short mode. If the path
16698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16699  # take no chances and rewrite it.
16700  # Note: m4 eats our [], so we need to use [ and ] instead.
16701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16702  if test "x$has_forbidden_chars" != x; then
16703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16705  fi
16706
16707
16708  windows_path="$new_path"
16709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16710    unix_path=`$CYGPATH -u "$windows_path"`
16711    new_path="$unix_path"
16712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16714    new_path="$unix_path"
16715  fi
16716
16717  if test "x$path" != "x$new_path"; then
16718    MSVCR_DLL="$new_path"
16719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16720$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16721  fi
16722
16723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16725
16726  else
16727    # We're on a posix platform. Hooray! :)
16728    path="$MSVCR_DLL"
16729
16730    if test ! -f "$path" && test ! -d "$path"; then
16731      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16732    fi
16733
16734    has_space=`$ECHO "$path" | $GREP " "`
16735    if test "x$has_space" != x; then
16736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16737$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16739    fi
16740  fi
16741
16742
16743fi
16744
16745
16746
16747# If --build AND --host is set, then the configure script will find any
16748# cross compilation tools in the PATH. Cross compilation tools
16749# follows the cross compilation standard where they are prefixed with ${host}.
16750# For example the binary i686-sun-solaris2.10-gcc
16751# will cross compile for i686-sun-solaris2.10
16752# If neither of build and host is not set, then build=host and the
16753# default compiler found in the path will be used.
16754# Setting only --host, does not seem to be really supported.
16755# Please set both --build and --host if you want to cross compile.
16756
16757if test "x$COMPILE_TYPE" = "xcross"; then
16758    # Now we to find a C/C++ compiler that can build executables for the build
16759    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16760    # once. Also, we need to do this before adding a tools dir to the path,
16761    # otherwise we might pick up cross-compilers which don't use standard naming.
16762    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16763    # to wait until they are properly discovered.
16764    for ac_prog in cl cc gcc
16765do
16766  # Extract the first word of "$ac_prog", so it can be a program name with args.
16767set dummy $ac_prog; ac_word=$2
16768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16769$as_echo_n "checking for $ac_word... " >&6; }
16770if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16771  $as_echo_n "(cached) " >&6
16772else
16773  case $BUILD_CC in
16774  [\\/]* | ?:[\\/]*)
16775  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16776  ;;
16777  *)
16778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16779for as_dir in $PATH
16780do
16781  IFS=$as_save_IFS
16782  test -z "$as_dir" && as_dir=.
16783    for ac_exec_ext in '' $ac_executable_extensions; do
16784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16785    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16787    break 2
16788  fi
16789done
16790  done
16791IFS=$as_save_IFS
16792
16793  ;;
16794esac
16795fi
16796BUILD_CC=$ac_cv_path_BUILD_CC
16797if test -n "$BUILD_CC"; then
16798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16799$as_echo "$BUILD_CC" >&6; }
16800else
16801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16802$as_echo "no" >&6; }
16803fi
16804
16805
16806  test -n "$BUILD_CC" && break
16807done
16808
16809
16810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16811
16812  # First separate the path from the arguments. This will split at the first
16813  # space.
16814  complete="$BUILD_CC"
16815  path="${complete%% *}"
16816  tmp="$complete EOL"
16817  arguments="${tmp#* }"
16818
16819  # Input might be given as Windows format, start by converting to
16820  # unix format.
16821  new_path=`$CYGPATH -u "$path"`
16822
16823  # Now try to locate executable using which
16824  new_path=`$WHICH "$new_path" 2> /dev/null`
16825  # bat and cmd files are not always considered executable in cygwin causing which
16826  # to not find them
16827  if test "x$new_path" = x \
16828           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16829           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16830    new_path=`$CYGPATH -u "$path"`
16831  fi
16832  if test "x$new_path" = x; then
16833    # Oops. Which didn't find the executable.
16834    # The splitting of arguments from the executable at a space might have been incorrect,
16835    # since paths with space are more likely in Windows. Give it another try with the whole
16836    # argument.
16837    path="$complete"
16838    arguments="EOL"
16839    new_path=`$CYGPATH -u "$path"`
16840    new_path=`$WHICH "$new_path" 2> /dev/null`
16841    # bat and cmd files are not always considered executable in cygwin causing which
16842    # to not find them
16843    if test "x$new_path" = x \
16844             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16845             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16846      new_path=`$CYGPATH -u "$path"`
16847    fi
16848    if test "x$new_path" = x; then
16849      # It's still not found. Now this is an unrecoverable error.
16850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16851$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16852      has_space=`$ECHO "$complete" | $GREP " "`
16853      if test "x$has_space" != x; then
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16856      fi
16857      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16858    fi
16859  fi
16860
16861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16864  # "foo.exe" is OK but "foo" is an error.
16865  #
16866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16867  # It is also a way to make sure we got the proper file name for the real test later on.
16868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16869  if test "x$test_shortpath" = x; then
16870    # Short path failed, file does not exist as specified.
16871    # Try adding .exe or .cmd
16872    if test -f "${new_path}.exe"; then
16873       input_to_shortpath="${new_path}.exe"
16874    elif test -f "${new_path}.cmd"; then
16875       input_to_shortpath="${new_path}.cmd"
16876    else
16877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16878$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16881      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16882    fi
16883  else
16884    input_to_shortpath="$new_path"
16885  fi
16886
16887  # Call helper function which possibly converts this using DOS-style short mode.
16888  # If so, the updated path is stored in $new_path.
16889  new_path="$input_to_shortpath"
16890
16891  input_path="$input_to_shortpath"
16892  # Check if we need to convert this using DOS-style short mode. If the path
16893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16894  # take no chances and rewrite it.
16895  # Note: m4 eats our [], so we need to use [ and ] instead.
16896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16897  if test "x$has_forbidden_chars" != x; then
16898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16902      # Going to short mode and back again did indeed matter. Since short mode is
16903      # case insensitive, let's make it lowercase to improve readability.
16904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16905      # Now convert it back to Unix-stile (cygpath)
16906      input_path=`$CYGPATH -u "$shortmode_path"`
16907      new_path="$input_path"
16908    fi
16909  fi
16910
16911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16912  if test "x$test_cygdrive_prefix" = x; then
16913    # As a simple fix, exclude /usr/bin since it's not a real path.
16914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16916      # a path prefixed by /cygdrive for fixpath to work.
16917      new_path="$CYGWIN_ROOT_PATH$input_path"
16918    fi
16919  fi
16920
16921  # remove trailing .exe if any
16922  new_path="${new_path/%.exe/}"
16923
16924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16925
16926  # First separate the path from the arguments. This will split at the first
16927  # space.
16928  complete="$BUILD_CC"
16929  path="${complete%% *}"
16930  tmp="$complete EOL"
16931  arguments="${tmp#* }"
16932
16933  # Input might be given as Windows format, start by converting to
16934  # unix format.
16935  new_path="$path"
16936
16937  windows_path="$new_path"
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939    unix_path=`$CYGPATH -u "$windows_path"`
16940    new_path="$unix_path"
16941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16943    new_path="$unix_path"
16944  fi
16945
16946
16947  # Now try to locate executable using which
16948  new_path=`$WHICH "$new_path" 2> /dev/null`
16949
16950  if test "x$new_path" = x; then
16951    # Oops. Which didn't find the executable.
16952    # The splitting of arguments from the executable at a space might have been incorrect,
16953    # since paths with space are more likely in Windows. Give it another try with the whole
16954    # argument.
16955    path="$complete"
16956    arguments="EOL"
16957    new_path="$path"
16958
16959  windows_path="$new_path"
16960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16961    unix_path=`$CYGPATH -u "$windows_path"`
16962    new_path="$unix_path"
16963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16965    new_path="$unix_path"
16966  fi
16967
16968
16969    new_path=`$WHICH "$new_path" 2> /dev/null`
16970
16971    if test "x$new_path" = x; then
16972      # It's still not found. Now this is an unrecoverable error.
16973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16974$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16975      has_space=`$ECHO "$complete" | $GREP " "`
16976      if test "x$has_space" != x; then
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16979      fi
16980      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16981    fi
16982  fi
16983
16984  # Now new_path has a complete unix path to the binary
16985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16986    # Keep paths in /bin as-is, but remove trailing .exe if any
16987    new_path="${new_path/%.exe/}"
16988    # Do not save /bin paths to all_fixpath_prefixes!
16989  else
16990    # Not in mixed or Windows style, start by that.
16991    new_path=`cmd //c echo $new_path`
16992
16993  input_path="$new_path"
16994  # Check if we need to convert this using DOS-style short mode. If the path
16995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16996  # take no chances and rewrite it.
16997  # Note: m4 eats our [], so we need to use [ and ] instead.
16998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16999  if test "x$has_forbidden_chars" != x; then
17000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17002  fi
17003
17004    # Output is in $new_path
17005
17006  windows_path="$new_path"
17007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17008    unix_path=`$CYGPATH -u "$windows_path"`
17009    new_path="$unix_path"
17010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17012    new_path="$unix_path"
17013  fi
17014
17015    # remove trailing .exe if any
17016    new_path="${new_path/%.exe/}"
17017
17018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17020  fi
17021
17022  else
17023    # We're on a posix platform. Hooray! :)
17024    # First separate the path from the arguments. This will split at the first
17025    # space.
17026    complete="$BUILD_CC"
17027    path="${complete%% *}"
17028    tmp="$complete EOL"
17029    arguments="${tmp#* }"
17030
17031    # Cannot rely on the command "which" here since it doesn't always work.
17032    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17033    if test -z "$is_absolute_path"; then
17034      # Path to executable is not absolute. Find it.
17035      IFS_save="$IFS"
17036      IFS=:
17037      for p in $PATH; do
17038        if test -f "$p/$path" && test -x "$p/$path"; then
17039          new_path="$p/$path"
17040          break
17041        fi
17042      done
17043      IFS="$IFS_save"
17044    else
17045      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17046$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17047      new_path="$path"
17048    fi
17049
17050    if test "x$new_path" = x; then
17051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17052$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17053        has_space=`$ECHO "$complete" | $GREP " "`
17054        if test "x$has_space" != x; then
17055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17057        fi
17058        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17059      fi
17060  fi
17061
17062      # Now join together the path and the arguments once again
17063      if test "x$arguments" != xEOL; then
17064        new_complete="$new_path ${arguments% *}"
17065      else
17066        new_complete="$new_path"
17067      fi
17068
17069  if test "x$complete" != "x$new_complete"; then
17070      BUILD_CC="$new_complete"
17071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17072$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17073    fi
17074
17075    for ac_prog in cl CC g++
17076do
17077  # Extract the first word of "$ac_prog", so it can be a program name with args.
17078set dummy $ac_prog; ac_word=$2
17079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17080$as_echo_n "checking for $ac_word... " >&6; }
17081if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17082  $as_echo_n "(cached) " >&6
17083else
17084  case $BUILD_CXX in
17085  [\\/]* | ?:[\\/]*)
17086  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17087  ;;
17088  *)
17089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17090for as_dir in $PATH
17091do
17092  IFS=$as_save_IFS
17093  test -z "$as_dir" && as_dir=.
17094    for ac_exec_ext in '' $ac_executable_extensions; do
17095  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17096    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17098    break 2
17099  fi
17100done
17101  done
17102IFS=$as_save_IFS
17103
17104  ;;
17105esac
17106fi
17107BUILD_CXX=$ac_cv_path_BUILD_CXX
17108if test -n "$BUILD_CXX"; then
17109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17110$as_echo "$BUILD_CXX" >&6; }
17111else
17112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17113$as_echo "no" >&6; }
17114fi
17115
17116
17117  test -n "$BUILD_CXX" && break
17118done
17119
17120
17121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17122
17123  # First separate the path from the arguments. This will split at the first
17124  # space.
17125  complete="$BUILD_CXX"
17126  path="${complete%% *}"
17127  tmp="$complete EOL"
17128  arguments="${tmp#* }"
17129
17130  # Input might be given as Windows format, start by converting to
17131  # unix format.
17132  new_path=`$CYGPATH -u "$path"`
17133
17134  # Now try to locate executable using which
17135  new_path=`$WHICH "$new_path" 2> /dev/null`
17136  # bat and cmd files are not always considered executable in cygwin causing which
17137  # to not find them
17138  if test "x$new_path" = x \
17139           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17140           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17141    new_path=`$CYGPATH -u "$path"`
17142  fi
17143  if test "x$new_path" = x; then
17144    # Oops. Which didn't find the executable.
17145    # The splitting of arguments from the executable at a space might have been incorrect,
17146    # since paths with space are more likely in Windows. Give it another try with the whole
17147    # argument.
17148    path="$complete"
17149    arguments="EOL"
17150    new_path=`$CYGPATH -u "$path"`
17151    new_path=`$WHICH "$new_path" 2> /dev/null`
17152    # bat and cmd files are not always considered executable in cygwin causing which
17153    # to not find them
17154    if test "x$new_path" = x \
17155             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17156             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17157      new_path=`$CYGPATH -u "$path"`
17158    fi
17159    if test "x$new_path" = x; then
17160      # It's still not found. Now this is an unrecoverable error.
17161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17162$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17163      has_space=`$ECHO "$complete" | $GREP " "`
17164      if test "x$has_space" != x; then
17165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17167      fi
17168      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17169    fi
17170  fi
17171
17172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17175  # "foo.exe" is OK but "foo" is an error.
17176  #
17177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17178  # It is also a way to make sure we got the proper file name for the real test later on.
17179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17180  if test "x$test_shortpath" = x; then
17181    # Short path failed, file does not exist as specified.
17182    # Try adding .exe or .cmd
17183    if test -f "${new_path}.exe"; then
17184       input_to_shortpath="${new_path}.exe"
17185    elif test -f "${new_path}.cmd"; then
17186       input_to_shortpath="${new_path}.cmd"
17187    else
17188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17189$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17190      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17191$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17192      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17193    fi
17194  else
17195    input_to_shortpath="$new_path"
17196  fi
17197
17198  # Call helper function which possibly converts this using DOS-style short mode.
17199  # If so, the updated path is stored in $new_path.
17200  new_path="$input_to_shortpath"
17201
17202  input_path="$input_to_shortpath"
17203  # Check if we need to convert this using DOS-style short mode. If the path
17204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17205  # take no chances and rewrite it.
17206  # Note: m4 eats our [], so we need to use [ and ] instead.
17207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17208  if test "x$has_forbidden_chars" != x; then
17209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17213      # Going to short mode and back again did indeed matter. Since short mode is
17214      # case insensitive, let's make it lowercase to improve readability.
17215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17216      # Now convert it back to Unix-stile (cygpath)
17217      input_path=`$CYGPATH -u "$shortmode_path"`
17218      new_path="$input_path"
17219    fi
17220  fi
17221
17222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17223  if test "x$test_cygdrive_prefix" = x; then
17224    # As a simple fix, exclude /usr/bin since it's not a real path.
17225    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17227      # a path prefixed by /cygdrive for fixpath to work.
17228      new_path="$CYGWIN_ROOT_PATH$input_path"
17229    fi
17230  fi
17231
17232  # remove trailing .exe if any
17233  new_path="${new_path/%.exe/}"
17234
17235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17236
17237  # First separate the path from the arguments. This will split at the first
17238  # space.
17239  complete="$BUILD_CXX"
17240  path="${complete%% *}"
17241  tmp="$complete EOL"
17242  arguments="${tmp#* }"
17243
17244  # Input might be given as Windows format, start by converting to
17245  # unix format.
17246  new_path="$path"
17247
17248  windows_path="$new_path"
17249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17250    unix_path=`$CYGPATH -u "$windows_path"`
17251    new_path="$unix_path"
17252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17254    new_path="$unix_path"
17255  fi
17256
17257
17258  # Now try to locate executable using which
17259  new_path=`$WHICH "$new_path" 2> /dev/null`
17260
17261  if test "x$new_path" = x; then
17262    # Oops. Which didn't find the executable.
17263    # The splitting of arguments from the executable at a space might have been incorrect,
17264    # since paths with space are more likely in Windows. Give it another try with the whole
17265    # argument.
17266    path="$complete"
17267    arguments="EOL"
17268    new_path="$path"
17269
17270  windows_path="$new_path"
17271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17272    unix_path=`$CYGPATH -u "$windows_path"`
17273    new_path="$unix_path"
17274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17276    new_path="$unix_path"
17277  fi
17278
17279
17280    new_path=`$WHICH "$new_path" 2> /dev/null`
17281
17282    if test "x$new_path" = x; then
17283      # It's still not found. Now this is an unrecoverable error.
17284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17285$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17286      has_space=`$ECHO "$complete" | $GREP " "`
17287      if test "x$has_space" != x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17290      fi
17291      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17292    fi
17293  fi
17294
17295  # Now new_path has a complete unix path to the binary
17296  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17297    # Keep paths in /bin as-is, but remove trailing .exe if any
17298    new_path="${new_path/%.exe/}"
17299    # Do not save /bin paths to all_fixpath_prefixes!
17300  else
17301    # Not in mixed or Windows style, start by that.
17302    new_path=`cmd //c echo $new_path`
17303
17304  input_path="$new_path"
17305  # Check if we need to convert this using DOS-style short mode. If the path
17306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17307  # take no chances and rewrite it.
17308  # Note: m4 eats our [], so we need to use [ and ] instead.
17309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17310  if test "x$has_forbidden_chars" != x; then
17311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17313  fi
17314
17315    # Output is in $new_path
17316
17317  windows_path="$new_path"
17318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17319    unix_path=`$CYGPATH -u "$windows_path"`
17320    new_path="$unix_path"
17321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17323    new_path="$unix_path"
17324  fi
17325
17326    # remove trailing .exe if any
17327    new_path="${new_path/%.exe/}"
17328
17329    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17330    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17331  fi
17332
17333  else
17334    # We're on a posix platform. Hooray! :)
17335    # First separate the path from the arguments. This will split at the first
17336    # space.
17337    complete="$BUILD_CXX"
17338    path="${complete%% *}"
17339    tmp="$complete EOL"
17340    arguments="${tmp#* }"
17341
17342    # Cannot rely on the command "which" here since it doesn't always work.
17343    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17344    if test -z "$is_absolute_path"; then
17345      # Path to executable is not absolute. Find it.
17346      IFS_save="$IFS"
17347      IFS=:
17348      for p in $PATH; do
17349        if test -f "$p/$path" && test -x "$p/$path"; then
17350          new_path="$p/$path"
17351          break
17352        fi
17353      done
17354      IFS="$IFS_save"
17355    else
17356      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17357$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17358      new_path="$path"
17359    fi
17360
17361    if test "x$new_path" = x; then
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17363$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17364        has_space=`$ECHO "$complete" | $GREP " "`
17365        if test "x$has_space" != x; then
17366          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17367$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17368        fi
17369        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17370      fi
17371  fi
17372
17373      # Now join together the path and the arguments once again
17374      if test "x$arguments" != xEOL; then
17375        new_complete="$new_path ${arguments% *}"
17376      else
17377        new_complete="$new_path"
17378      fi
17379
17380  if test "x$complete" != "x$new_complete"; then
17381      BUILD_CXX="$new_complete"
17382      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17383$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17384    fi
17385
17386    # Extract the first word of "ld", so it can be a program name with args.
17387set dummy ld; ac_word=$2
17388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17389$as_echo_n "checking for $ac_word... " >&6; }
17390if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17391  $as_echo_n "(cached) " >&6
17392else
17393  case $BUILD_LD in
17394  [\\/]* | ?:[\\/]*)
17395  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17396  ;;
17397  *)
17398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17399for as_dir in $PATH
17400do
17401  IFS=$as_save_IFS
17402  test -z "$as_dir" && as_dir=.
17403    for ac_exec_ext in '' $ac_executable_extensions; do
17404  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17405    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17407    break 2
17408  fi
17409done
17410  done
17411IFS=$as_save_IFS
17412
17413  ;;
17414esac
17415fi
17416BUILD_LD=$ac_cv_path_BUILD_LD
17417if test -n "$BUILD_LD"; then
17418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17419$as_echo "$BUILD_LD" >&6; }
17420else
17421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17422$as_echo "no" >&6; }
17423fi
17424
17425
17426
17427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17428
17429  # First separate the path from the arguments. This will split at the first
17430  # space.
17431  complete="$BUILD_LD"
17432  path="${complete%% *}"
17433  tmp="$complete EOL"
17434  arguments="${tmp#* }"
17435
17436  # Input might be given as Windows format, start by converting to
17437  # unix format.
17438  new_path=`$CYGPATH -u "$path"`
17439
17440  # Now try to locate executable using which
17441  new_path=`$WHICH "$new_path" 2> /dev/null`
17442  # bat and cmd files are not always considered executable in cygwin causing which
17443  # to not find them
17444  if test "x$new_path" = x \
17445           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17446           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17447    new_path=`$CYGPATH -u "$path"`
17448  fi
17449  if test "x$new_path" = x; then
17450    # Oops. Which didn't find the executable.
17451    # The splitting of arguments from the executable at a space might have been incorrect,
17452    # since paths with space are more likely in Windows. Give it another try with the whole
17453    # argument.
17454    path="$complete"
17455    arguments="EOL"
17456    new_path=`$CYGPATH -u "$path"`
17457    new_path=`$WHICH "$new_path" 2> /dev/null`
17458    # bat and cmd files are not always considered executable in cygwin causing which
17459    # to not find them
17460    if test "x$new_path" = x \
17461             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17462             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17463      new_path=`$CYGPATH -u "$path"`
17464    fi
17465    if test "x$new_path" = x; then
17466      # It's still not found. Now this is an unrecoverable error.
17467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17468$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17469      has_space=`$ECHO "$complete" | $GREP " "`
17470      if test "x$has_space" != x; then
17471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17473      fi
17474      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17475    fi
17476  fi
17477
17478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17481  # "foo.exe" is OK but "foo" is an error.
17482  #
17483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17484  # It is also a way to make sure we got the proper file name for the real test later on.
17485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17486  if test "x$test_shortpath" = x; then
17487    # Short path failed, file does not exist as specified.
17488    # Try adding .exe or .cmd
17489    if test -f "${new_path}.exe"; then
17490       input_to_shortpath="${new_path}.exe"
17491    elif test -f "${new_path}.cmd"; then
17492       input_to_shortpath="${new_path}.cmd"
17493    else
17494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17495$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17498      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17499    fi
17500  else
17501    input_to_shortpath="$new_path"
17502  fi
17503
17504  # Call helper function which possibly converts this using DOS-style short mode.
17505  # If so, the updated path is stored in $new_path.
17506  new_path="$input_to_shortpath"
17507
17508  input_path="$input_to_shortpath"
17509  # Check if we need to convert this using DOS-style short mode. If the path
17510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17511  # take no chances and rewrite it.
17512  # Note: m4 eats our [], so we need to use [ and ] instead.
17513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17514  if test "x$has_forbidden_chars" != x; then
17515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17519      # Going to short mode and back again did indeed matter. Since short mode is
17520      # case insensitive, let's make it lowercase to improve readability.
17521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17522      # Now convert it back to Unix-stile (cygpath)
17523      input_path=`$CYGPATH -u "$shortmode_path"`
17524      new_path="$input_path"
17525    fi
17526  fi
17527
17528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17529  if test "x$test_cygdrive_prefix" = x; then
17530    # As a simple fix, exclude /usr/bin since it's not a real path.
17531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17533      # a path prefixed by /cygdrive for fixpath to work.
17534      new_path="$CYGWIN_ROOT_PATH$input_path"
17535    fi
17536  fi
17537
17538  # remove trailing .exe if any
17539  new_path="${new_path/%.exe/}"
17540
17541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17542
17543  # First separate the path from the arguments. This will split at the first
17544  # space.
17545  complete="$BUILD_LD"
17546  path="${complete%% *}"
17547  tmp="$complete EOL"
17548  arguments="${tmp#* }"
17549
17550  # Input might be given as Windows format, start by converting to
17551  # unix format.
17552  new_path="$path"
17553
17554  windows_path="$new_path"
17555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17556    unix_path=`$CYGPATH -u "$windows_path"`
17557    new_path="$unix_path"
17558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17560    new_path="$unix_path"
17561  fi
17562
17563
17564  # Now try to locate executable using which
17565  new_path=`$WHICH "$new_path" 2> /dev/null`
17566
17567  if test "x$new_path" = x; then
17568    # Oops. Which didn't find the executable.
17569    # The splitting of arguments from the executable at a space might have been incorrect,
17570    # since paths with space are more likely in Windows. Give it another try with the whole
17571    # argument.
17572    path="$complete"
17573    arguments="EOL"
17574    new_path="$path"
17575
17576  windows_path="$new_path"
17577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17578    unix_path=`$CYGPATH -u "$windows_path"`
17579    new_path="$unix_path"
17580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17582    new_path="$unix_path"
17583  fi
17584
17585
17586    new_path=`$WHICH "$new_path" 2> /dev/null`
17587
17588    if test "x$new_path" = x; then
17589      # It's still not found. Now this is an unrecoverable error.
17590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17591$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17592      has_space=`$ECHO "$complete" | $GREP " "`
17593      if test "x$has_space" != x; then
17594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17596      fi
17597      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17598    fi
17599  fi
17600
17601  # Now new_path has a complete unix path to the binary
17602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17603    # Keep paths in /bin as-is, but remove trailing .exe if any
17604    new_path="${new_path/%.exe/}"
17605    # Do not save /bin paths to all_fixpath_prefixes!
17606  else
17607    # Not in mixed or Windows style, start by that.
17608    new_path=`cmd //c echo $new_path`
17609
17610  input_path="$new_path"
17611  # Check if we need to convert this using DOS-style short mode. If the path
17612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17613  # take no chances and rewrite it.
17614  # Note: m4 eats our [], so we need to use [ and ] instead.
17615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17616  if test "x$has_forbidden_chars" != x; then
17617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17619  fi
17620
17621    # Output is in $new_path
17622
17623  windows_path="$new_path"
17624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625    unix_path=`$CYGPATH -u "$windows_path"`
17626    new_path="$unix_path"
17627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17629    new_path="$unix_path"
17630  fi
17631
17632    # remove trailing .exe if any
17633    new_path="${new_path/%.exe/}"
17634
17635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17637  fi
17638
17639  else
17640    # We're on a posix platform. Hooray! :)
17641    # First separate the path from the arguments. This will split at the first
17642    # space.
17643    complete="$BUILD_LD"
17644    path="${complete%% *}"
17645    tmp="$complete EOL"
17646    arguments="${tmp#* }"
17647
17648    # Cannot rely on the command "which" here since it doesn't always work.
17649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17650    if test -z "$is_absolute_path"; then
17651      # Path to executable is not absolute. Find it.
17652      IFS_save="$IFS"
17653      IFS=:
17654      for p in $PATH; do
17655        if test -f "$p/$path" && test -x "$p/$path"; then
17656          new_path="$p/$path"
17657          break
17658        fi
17659      done
17660      IFS="$IFS_save"
17661    else
17662      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17663$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17664      new_path="$path"
17665    fi
17666
17667    if test "x$new_path" = x; then
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17669$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17670        has_space=`$ECHO "$complete" | $GREP " "`
17671        if test "x$has_space" != x; then
17672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17674        fi
17675        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17676      fi
17677  fi
17678
17679      # Now join together the path and the arguments once again
17680      if test "x$arguments" != xEOL; then
17681        new_complete="$new_path ${arguments% *}"
17682      else
17683        new_complete="$new_path"
17684      fi
17685
17686  if test "x$complete" != "x$new_complete"; then
17687      BUILD_LD="$new_complete"
17688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17689$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17690    fi
17691
17692fi
17693
17694
17695
17696
17697# If a devkit is found on the builddeps server, then prepend its path to the
17698# PATH variable. If there are cross compilers available in the devkit, these
17699# will be found by AC_PROG_CC et al.
17700DEVKIT=
17701
17702
17703    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17704        # Source the builddeps file again, to make sure it uses the latest variables!
17705        . $builddepsfile
17706        # Look for a target and build machine specific resource!
17707        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17708        if test "x$resource" = x; then
17709            # Ok, lets instead look for a target specific resource
17710            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17711        fi
17712        if test "x$resource" = x; then
17713            # Ok, lets instead look for a build specific resource
17714            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17715        fi
17716        if test "x$resource" = x; then
17717            # Ok, lets instead look for a generic resource
17718            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17719            resource=${builddep_devkit}
17720        fi
17721        if test "x$resource" != x; then
17722            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17723$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17724	    # If the resource in the builddeps.conf file is an existing directory,
17725	    # for example /java/linux/cups
17726	    if test -d ${resource}; then
17727	       depdir=${resource}
17728	    else
17729
17730# devkit is for example mymodule
17731# $resource is for example libs/general/libmymod_1_2_3.zip
17732# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17733# $with_builddeps_dir is for example /localhome/builddeps
17734# depdir is the name of the variable into which we store the depdir, eg MYMOD
17735# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17736# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17737    filename=`basename $resource`
17738    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17739    filebase=${filename%%.*}
17740    extension=${filename#*.}
17741    installdir=$with_builddeps_dir/$filebase
17742    if test ! -f $installdir/$filename.unpacked; then
17743        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17744$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17745        if test ! -d $installdir; then
17746            mkdir -p $installdir
17747        fi
17748        if test ! -d $installdir; then
17749            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17750        fi
17751        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17752        touch $tmpfile
17753        if test ! -f $tmpfile; then
17754            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17755        fi
17756
17757    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17758    # $tmpfile is the local file name for the downloaded file.
17759    VALID_TOOL=no
17760    if test "x$BDEPS_FTP" = xwget; then
17761       VALID_TOOL=yes
17762       wget -O $tmpfile $with_builddeps_server/$resource
17763    fi
17764    if test "x$BDEPS_FTP" = xlftp; then
17765       VALID_TOOL=yes
17766       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17767    fi
17768    if test "x$BDEPS_FTP" = xftp; then
17769        VALID_TOOL=yes
17770        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17771        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17772        FTPUSERPWD=${FTPSERVER%%@*}
17773        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17774            FTPUSER=${userpwd%%:*}
17775            FTPPWD=${userpwd#*@}
17776            FTPSERVER=${FTPSERVER#*@}
17777        else
17778            FTPUSER=ftp
17779            FTPPWD=ftp
17780        fi
17781        # the "pass" command does not work on some
17782        # ftp clients (read ftp.exe) but if it works,
17783        # passive mode is better!
17784        (\
17785            echo "user $FTPUSER $FTPPWD"        ;\
17786            echo "pass"                         ;\
17787            echo "bin"                          ;\
17788            echo "get $FTPPATH $tmpfile"              ;\
17789        ) | ftp -in $FTPSERVER
17790    fi
17791    if test "x$VALID_TOOL" != xyes; then
17792       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17793    fi
17794
17795        mv $tmpfile $installdir/$filename
17796        if test ! -s $installdir/$filename; then
17797            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17798        fi
17799        case "$extension" in
17800            zip)  echo "Unzipping $installdir/$filename..."
17801               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17802            ;;
17803            tar.gz) echo "Untaring $installdir/$filename..."
17804               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17805            ;;
17806            tgz) echo "Untaring $installdir/$filename..."
17807               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17808            ;;
17809            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17810            ;;
17811        esac
17812    fi
17813    if test -f $installdir/$filename.unpacked; then
17814        depdir=$installdir
17815    fi
17816
17817	    fi
17818            # Source the builddeps file again, because in the previous command, the depdir
17819            # was updated to point at the current build dependency install directory.
17820            . $builddepsfile
17821            # Now extract variables from the builddeps.conf files.
17822            theroot=${builddep_devkit_ROOT}
17823            thecflags=${builddep_devkit_CFLAGS}
17824            thelibs=${builddep_devkit_LIBS}
17825            if test "x$depdir" = x; then
17826                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17827            fi
17828            DEVKIT=$depdir
17829            if test "x$theroot" != x; then
17830               DEVKIT="$theroot"
17831            fi
17832            if test "x$thecflags" != x; then
17833               DEVKIT_CFLAGS="$thecflags"
17834            fi
17835            if test "x$thelibs" != x; then
17836               DEVKIT_LIBS="$thelibs"
17837            fi
17838            # Found devkit
17839                     PATH="$DEVKIT/bin:$PATH"
17840                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17841                     if test "x$x_includes" = "xNONE"; then
17842                         x_includes="$SYS_ROOT/usr/include/X11"
17843                     fi
17844                     if test "x$x_libraries" = "xNONE"; then
17845                         x_libraries="$SYS_ROOT/usr/lib"
17846                     fi
17847
17848
17849        fi
17850
17851    fi
17852
17853
17854if test "x$SYS_ROOT" != "x/" ; then
17855    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17856    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17857    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17858    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17859    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17860    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17861fi
17862
17863# Store the CFLAGS etal passed to the configure script.
17864ORG_CFLAGS="$CFLAGS"
17865ORG_CXXFLAGS="$CXXFLAGS"
17866ORG_OBJCFLAGS="$OBJCFLAGS"
17867
17868# autoconf magic only relies on PATH, so update it if tools dir is specified
17869OLD_PATH="$PATH"
17870if test "x$TOOLS_DIR" != x; then
17871  PATH=$TOOLS_DIR:$PATH
17872fi
17873
17874
17875### Locate C compiler (CC)
17876
17877# gcc is almost always present, but on Windows we
17878# prefer cl.exe and on Solaris we prefer CC.
17879# Thus test for them in this order.
17880if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17881  # Do not probe for cc on MacOSX.
17882  COMPILER_CHECK_LIST="cl gcc"
17883else
17884  COMPILER_CHECK_LIST="cl cc gcc"
17885fi
17886
17887
17888  COMPILER_NAME=C
17889
17890  CC=
17891  # If TOOLS_DIR is set, check for all compiler names in there first
17892  # before checking the rest of the PATH.
17893  if test -n "$TOOLS_DIR"; then
17894    PATH_save="$PATH"
17895    PATH="$TOOLS_DIR"
17896    for ac_prog in $COMPILER_CHECK_LIST
17897do
17898  # Extract the first word of "$ac_prog", so it can be a program name with args.
17899set dummy $ac_prog; ac_word=$2
17900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17901$as_echo_n "checking for $ac_word... " >&6; }
17902if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
17903  $as_echo_n "(cached) " >&6
17904else
17905  case $TOOLS_DIR_CC in
17906  [\\/]* | ?:[\\/]*)
17907  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
17908  ;;
17909  *)
17910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17911for as_dir in $PATH
17912do
17913  IFS=$as_save_IFS
17914  test -z "$as_dir" && as_dir=.
17915    for ac_exec_ext in '' $ac_executable_extensions; do
17916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17917    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
17918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17919    break 2
17920  fi
17921done
17922  done
17923IFS=$as_save_IFS
17924
17925  ;;
17926esac
17927fi
17928TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
17929if test -n "$TOOLS_DIR_CC"; then
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
17931$as_echo "$TOOLS_DIR_CC" >&6; }
17932else
17933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17934$as_echo "no" >&6; }
17935fi
17936
17937
17938  test -n "$TOOLS_DIR_CC" && break
17939done
17940
17941    CC=$TOOLS_DIR_CC
17942    PATH="$PATH_save"
17943  fi
17944
17945  # AC_PATH_PROGS can't be run multiple times with the same variable,
17946  # so create a new name for this run.
17947  if test "x$CC" = x; then
17948    for ac_prog in $COMPILER_CHECK_LIST
17949do
17950  # Extract the first word of "$ac_prog", so it can be a program name with args.
17951set dummy $ac_prog; ac_word=$2
17952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17953$as_echo_n "checking for $ac_word... " >&6; }
17954if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17955  $as_echo_n "(cached) " >&6
17956else
17957  case $POTENTIAL_CC in
17958  [\\/]* | ?:[\\/]*)
17959  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17960  ;;
17961  *)
17962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17963for as_dir in $PATH
17964do
17965  IFS=$as_save_IFS
17966  test -z "$as_dir" && as_dir=.
17967    for ac_exec_ext in '' $ac_executable_extensions; do
17968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17969    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17971    break 2
17972  fi
17973done
17974  done
17975IFS=$as_save_IFS
17976
17977  ;;
17978esac
17979fi
17980POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17981if test -n "$POTENTIAL_CC"; then
17982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17983$as_echo "$POTENTIAL_CC" >&6; }
17984else
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17986$as_echo "no" >&6; }
17987fi
17988
17989
17990  test -n "$POTENTIAL_CC" && break
17991done
17992
17993    CC=$POTENTIAL_CC
17994  fi
17995
17996  if test "x$CC" = x; then
17997
17998    # Print a helpful message on how to acquire the necessary build dependency.
17999    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18000    MISSING_DEPENDENCY=devkit
18001    PKGHANDLER_COMMAND=
18002
18003    case $PKGHANDLER in
18004	apt-get)
18005                apt_help     $MISSING_DEPENDENCY ;;
18006    yum)
18007                yum_help     $MISSING_DEPENDENCY ;;
18008	port)
18009                port_help    $MISSING_DEPENDENCY ;;
18010	pkgutil)
18011                pkgutil_help $MISSING_DEPENDENCY ;;
18012	pkgadd)
18013                pkgadd_help  $MISSING_DEPENDENCY ;;
18014    * )
18015      break ;;
18016    esac
18017
18018    if test "x$PKGHANDLER_COMMAND" != x; then
18019        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18020    fi
18021
18022      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18023  fi
18024
18025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18026
18027  # First separate the path from the arguments. This will split at the first
18028  # space.
18029  complete="$CC"
18030  path="${complete%% *}"
18031  tmp="$complete EOL"
18032  arguments="${tmp#* }"
18033
18034  # Input might be given as Windows format, start by converting to
18035  # unix format.
18036  new_path=`$CYGPATH -u "$path"`
18037
18038  # Now try to locate executable using which
18039  new_path=`$WHICH "$new_path" 2> /dev/null`
18040  # bat and cmd files are not always considered executable in cygwin causing which
18041  # to not find them
18042  if test "x$new_path" = x \
18043           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18044           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18045    new_path=`$CYGPATH -u "$path"`
18046  fi
18047  if test "x$new_path" = x; then
18048    # Oops. Which didn't find the executable.
18049    # The splitting of arguments from the executable at a space might have been incorrect,
18050    # since paths with space are more likely in Windows. Give it another try with the whole
18051    # argument.
18052    path="$complete"
18053    arguments="EOL"
18054    new_path=`$CYGPATH -u "$path"`
18055    new_path=`$WHICH "$new_path" 2> /dev/null`
18056    # bat and cmd files are not always considered executable in cygwin causing which
18057    # to not find them
18058    if test "x$new_path" = x \
18059             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18060             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18061      new_path=`$CYGPATH -u "$path"`
18062    fi
18063    if test "x$new_path" = x; then
18064      # It's still not found. Now this is an unrecoverable error.
18065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18066$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18067      has_space=`$ECHO "$complete" | $GREP " "`
18068      if test "x$has_space" != x; then
18069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18071      fi
18072      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18073    fi
18074  fi
18075
18076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18079  # "foo.exe" is OK but "foo" is an error.
18080  #
18081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18082  # It is also a way to make sure we got the proper file name for the real test later on.
18083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18084  if test "x$test_shortpath" = x; then
18085    # Short path failed, file does not exist as specified.
18086    # Try adding .exe or .cmd
18087    if test -f "${new_path}.exe"; then
18088       input_to_shortpath="${new_path}.exe"
18089    elif test -f "${new_path}.cmd"; then
18090       input_to_shortpath="${new_path}.cmd"
18091    else
18092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18093$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18096      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18097    fi
18098  else
18099    input_to_shortpath="$new_path"
18100  fi
18101
18102  # Call helper function which possibly converts this using DOS-style short mode.
18103  # If so, the updated path is stored in $new_path.
18104  new_path="$input_to_shortpath"
18105
18106  input_path="$input_to_shortpath"
18107  # Check if we need to convert this using DOS-style short mode. If the path
18108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18109  # take no chances and rewrite it.
18110  # Note: m4 eats our [], so we need to use [ and ] instead.
18111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18112  if test "x$has_forbidden_chars" != x; then
18113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18117      # Going to short mode and back again did indeed matter. Since short mode is
18118      # case insensitive, let's make it lowercase to improve readability.
18119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18120      # Now convert it back to Unix-stile (cygpath)
18121      input_path=`$CYGPATH -u "$shortmode_path"`
18122      new_path="$input_path"
18123    fi
18124  fi
18125
18126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18127  if test "x$test_cygdrive_prefix" = x; then
18128    # As a simple fix, exclude /usr/bin since it's not a real path.
18129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18131      # a path prefixed by /cygdrive for fixpath to work.
18132      new_path="$CYGWIN_ROOT_PATH$input_path"
18133    fi
18134  fi
18135
18136  # remove trailing .exe if any
18137  new_path="${new_path/%.exe/}"
18138
18139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18140
18141  # First separate the path from the arguments. This will split at the first
18142  # space.
18143  complete="$CC"
18144  path="${complete%% *}"
18145  tmp="$complete EOL"
18146  arguments="${tmp#* }"
18147
18148  # Input might be given as Windows format, start by converting to
18149  # unix format.
18150  new_path="$path"
18151
18152  windows_path="$new_path"
18153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18154    unix_path=`$CYGPATH -u "$windows_path"`
18155    new_path="$unix_path"
18156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18158    new_path="$unix_path"
18159  fi
18160
18161
18162  # Now try to locate executable using which
18163  new_path=`$WHICH "$new_path" 2> /dev/null`
18164
18165  if test "x$new_path" = x; then
18166    # Oops. Which didn't find the executable.
18167    # The splitting of arguments from the executable at a space might have been incorrect,
18168    # since paths with space are more likely in Windows. Give it another try with the whole
18169    # argument.
18170    path="$complete"
18171    arguments="EOL"
18172    new_path="$path"
18173
18174  windows_path="$new_path"
18175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18176    unix_path=`$CYGPATH -u "$windows_path"`
18177    new_path="$unix_path"
18178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18180    new_path="$unix_path"
18181  fi
18182
18183
18184    new_path=`$WHICH "$new_path" 2> /dev/null`
18185
18186    if test "x$new_path" = x; then
18187      # It's still not found. Now this is an unrecoverable error.
18188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18189$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18190      has_space=`$ECHO "$complete" | $GREP " "`
18191      if test "x$has_space" != x; then
18192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18194      fi
18195      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18196    fi
18197  fi
18198
18199  # Now new_path has a complete unix path to the binary
18200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18201    # Keep paths in /bin as-is, but remove trailing .exe if any
18202    new_path="${new_path/%.exe/}"
18203    # Do not save /bin paths to all_fixpath_prefixes!
18204  else
18205    # Not in mixed or Windows style, start by that.
18206    new_path=`cmd //c echo $new_path`
18207
18208  input_path="$new_path"
18209  # Check if we need to convert this using DOS-style short mode. If the path
18210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18211  # take no chances and rewrite it.
18212  # Note: m4 eats our [], so we need to use [ and ] instead.
18213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18214  if test "x$has_forbidden_chars" != x; then
18215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18217  fi
18218
18219    # Output is in $new_path
18220
18221  windows_path="$new_path"
18222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18223    unix_path=`$CYGPATH -u "$windows_path"`
18224    new_path="$unix_path"
18225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18227    new_path="$unix_path"
18228  fi
18229
18230    # remove trailing .exe if any
18231    new_path="${new_path/%.exe/}"
18232
18233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18235  fi
18236
18237  else
18238    # We're on a posix platform. Hooray! :)
18239    # First separate the path from the arguments. This will split at the first
18240    # space.
18241    complete="$CC"
18242    path="${complete%% *}"
18243    tmp="$complete EOL"
18244    arguments="${tmp#* }"
18245
18246    # Cannot rely on the command "which" here since it doesn't always work.
18247    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18248    if test -z "$is_absolute_path"; then
18249      # Path to executable is not absolute. Find it.
18250      IFS_save="$IFS"
18251      IFS=:
18252      for p in $PATH; do
18253        if test -f "$p/$path" && test -x "$p/$path"; then
18254          new_path="$p/$path"
18255          break
18256        fi
18257      done
18258      IFS="$IFS_save"
18259    else
18260      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18261$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18262      new_path="$path"
18263    fi
18264
18265    if test "x$new_path" = x; then
18266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18267$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18268        has_space=`$ECHO "$complete" | $GREP " "`
18269        if test "x$has_space" != x; then
18270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18272        fi
18273        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18274      fi
18275  fi
18276
18277      # Now join together the path and the arguments once again
18278      if test "x$arguments" != xEOL; then
18279        new_complete="$new_path ${arguments% *}"
18280      else
18281        new_complete="$new_path"
18282      fi
18283
18284  if test "x$complete" != "x$new_complete"; then
18285      CC="$new_complete"
18286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18287$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18288    fi
18289
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18291$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18292  TEST_COMPILER="$CC"
18293
18294    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18295        # Follow a chain of symbolic links. Use readlink
18296        # where it exists, else fall back to horribly
18297        # complicated shell code.
18298        if test "x$READLINK_TESTED" != yes; then
18299            # On MacOSX there is a readlink tool with a different
18300            # purpose than the GNU readlink tool. Check the found readlink.
18301            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18302            if test "x$ISGNU" = x; then
18303                 # A readlink that we do not know how to use.
18304                 # Are there other non-GNU readlinks out there?
18305                 READLINK_TESTED=yes
18306                 READLINK=
18307            fi
18308        fi
18309
18310        if test "x$READLINK" != x; then
18311            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18312        else
18313            # Save the current directory for restoring afterwards
18314            STARTDIR=$PWD
18315            COUNTER=0
18316            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18317            sym_link_file=`$BASENAME $TEST_COMPILER`
18318            # Use the system pwd and not the shell builtin to resolve directory symlinks
18319            cd $sym_link_dir
18320            cd `$THEPWDCMD`
18321            sym_link_dir=`$THEPWDCMD`
18322            # Resolve file symlinks
18323            while test $COUNTER -lt 20; do
18324                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18325                if test "x$ISLINK" == x; then
18326                    # This is not a symbolic link! We are done!
18327                    break
18328                fi
18329                # Again resolve directory symlinks since the target of the just found
18330                # link could be in a different directory
18331                cd `$DIRNAME $ISLINK`
18332                sym_link_dir=`$THEPWDCMD`
18333                sym_link_file=`$BASENAME $ISLINK`
18334                let COUNTER=COUNTER+1
18335            done
18336            cd $STARTDIR
18337            TEST_COMPILER=$sym_link_dir/$sym_link_file
18338        fi
18339    fi
18340
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18342$as_echo "$TEST_COMPILER" >&6; }
18343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18344$as_echo_n "checking if CC is disguised ccache... " >&6; }
18345
18346  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18347  if test "x$COMPILER_BASENAME" = "xccache"; then
18348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18349$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18350    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18351    # We want to control ccache invocation ourselves, so ignore this cc and try
18352    # searching again.
18353
18354    # Remove the path to the fake ccache cc from the PATH
18355    RETRY_COMPILER_SAVED_PATH="$PATH"
18356    COMPILER_DIRNAME=`$DIRNAME $CC`
18357    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18358
18359    # Try again looking for our compiler
18360    if test -n "$ac_tool_prefix"; then
18361  for ac_prog in $COMPILER_CHECK_LIST
18362  do
18363    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18364set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18366$as_echo_n "checking for $ac_word... " >&6; }
18367if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18368  $as_echo_n "(cached) " >&6
18369else
18370  if test -n "$PROPER_COMPILER_CC"; then
18371  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18372else
18373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18374for as_dir in $PATH
18375do
18376  IFS=$as_save_IFS
18377  test -z "$as_dir" && as_dir=.
18378    for ac_exec_ext in '' $ac_executable_extensions; do
18379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18380    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18382    break 2
18383  fi
18384done
18385  done
18386IFS=$as_save_IFS
18387
18388fi
18389fi
18390PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18391if test -n "$PROPER_COMPILER_CC"; then
18392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18393$as_echo "$PROPER_COMPILER_CC" >&6; }
18394else
18395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18396$as_echo "no" >&6; }
18397fi
18398
18399
18400    test -n "$PROPER_COMPILER_CC" && break
18401  done
18402fi
18403if test -z "$PROPER_COMPILER_CC"; then
18404  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18405  for ac_prog in $COMPILER_CHECK_LIST
18406do
18407  # Extract the first word of "$ac_prog", so it can be a program name with args.
18408set dummy $ac_prog; ac_word=$2
18409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18410$as_echo_n "checking for $ac_word... " >&6; }
18411if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18412  $as_echo_n "(cached) " >&6
18413else
18414  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18415  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18416else
18417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18418for as_dir in $PATH
18419do
18420  IFS=$as_save_IFS
18421  test -z "$as_dir" && as_dir=.
18422    for ac_exec_ext in '' $ac_executable_extensions; do
18423  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18424    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18426    break 2
18427  fi
18428done
18429  done
18430IFS=$as_save_IFS
18431
18432fi
18433fi
18434ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18435if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18437$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18438else
18439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18440$as_echo "no" >&6; }
18441fi
18442
18443
18444  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18445done
18446
18447  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18448    PROPER_COMPILER_CC=""
18449  else
18450    case $cross_compiling:$ac_tool_warned in
18451yes:)
18452{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18453$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18454ac_tool_warned=yes ;;
18455esac
18456    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18457  fi
18458fi
18459
18460
18461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18462
18463  # First separate the path from the arguments. This will split at the first
18464  # space.
18465  complete="$PROPER_COMPILER_CC"
18466  path="${complete%% *}"
18467  tmp="$complete EOL"
18468  arguments="${tmp#* }"
18469
18470  # Input might be given as Windows format, start by converting to
18471  # unix format.
18472  new_path=`$CYGPATH -u "$path"`
18473
18474  # Now try to locate executable using which
18475  new_path=`$WHICH "$new_path" 2> /dev/null`
18476  # bat and cmd files are not always considered executable in cygwin causing which
18477  # to not find them
18478  if test "x$new_path" = x \
18479           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18480           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18481    new_path=`$CYGPATH -u "$path"`
18482  fi
18483  if test "x$new_path" = x; then
18484    # Oops. Which didn't find the executable.
18485    # The splitting of arguments from the executable at a space might have been incorrect,
18486    # since paths with space are more likely in Windows. Give it another try with the whole
18487    # argument.
18488    path="$complete"
18489    arguments="EOL"
18490    new_path=`$CYGPATH -u "$path"`
18491    new_path=`$WHICH "$new_path" 2> /dev/null`
18492    # bat and cmd files are not always considered executable in cygwin causing which
18493    # to not find them
18494    if test "x$new_path" = x \
18495             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18496             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18497      new_path=`$CYGPATH -u "$path"`
18498    fi
18499    if test "x$new_path" = x; then
18500      # It's still not found. Now this is an unrecoverable error.
18501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18502$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18503      has_space=`$ECHO "$complete" | $GREP " "`
18504      if test "x$has_space" != x; then
18505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18507      fi
18508      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18509    fi
18510  fi
18511
18512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18515  # "foo.exe" is OK but "foo" is an error.
18516  #
18517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18518  # It is also a way to make sure we got the proper file name for the real test later on.
18519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18520  if test "x$test_shortpath" = x; then
18521    # Short path failed, file does not exist as specified.
18522    # Try adding .exe or .cmd
18523    if test -f "${new_path}.exe"; then
18524       input_to_shortpath="${new_path}.exe"
18525    elif test -f "${new_path}.cmd"; then
18526       input_to_shortpath="${new_path}.cmd"
18527    else
18528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18529$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18530      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18531$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18532      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18533    fi
18534  else
18535    input_to_shortpath="$new_path"
18536  fi
18537
18538  # Call helper function which possibly converts this using DOS-style short mode.
18539  # If so, the updated path is stored in $new_path.
18540  new_path="$input_to_shortpath"
18541
18542  input_path="$input_to_shortpath"
18543  # Check if we need to convert this using DOS-style short mode. If the path
18544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18545  # take no chances and rewrite it.
18546  # Note: m4 eats our [], so we need to use [ and ] instead.
18547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18548  if test "x$has_forbidden_chars" != x; then
18549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18553      # Going to short mode and back again did indeed matter. Since short mode is
18554      # case insensitive, let's make it lowercase to improve readability.
18555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18556      # Now convert it back to Unix-stile (cygpath)
18557      input_path=`$CYGPATH -u "$shortmode_path"`
18558      new_path="$input_path"
18559    fi
18560  fi
18561
18562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18563  if test "x$test_cygdrive_prefix" = x; then
18564    # As a simple fix, exclude /usr/bin since it's not a real path.
18565    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18567      # a path prefixed by /cygdrive for fixpath to work.
18568      new_path="$CYGWIN_ROOT_PATH$input_path"
18569    fi
18570  fi
18571
18572  # remove trailing .exe if any
18573  new_path="${new_path/%.exe/}"
18574
18575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18576
18577  # First separate the path from the arguments. This will split at the first
18578  # space.
18579  complete="$PROPER_COMPILER_CC"
18580  path="${complete%% *}"
18581  tmp="$complete EOL"
18582  arguments="${tmp#* }"
18583
18584  # Input might be given as Windows format, start by converting to
18585  # unix format.
18586  new_path="$path"
18587
18588  windows_path="$new_path"
18589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18590    unix_path=`$CYGPATH -u "$windows_path"`
18591    new_path="$unix_path"
18592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18594    new_path="$unix_path"
18595  fi
18596
18597
18598  # Now try to locate executable using which
18599  new_path=`$WHICH "$new_path" 2> /dev/null`
18600
18601  if test "x$new_path" = x; then
18602    # Oops. Which didn't find the executable.
18603    # The splitting of arguments from the executable at a space might have been incorrect,
18604    # since paths with space are more likely in Windows. Give it another try with the whole
18605    # argument.
18606    path="$complete"
18607    arguments="EOL"
18608    new_path="$path"
18609
18610  windows_path="$new_path"
18611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18612    unix_path=`$CYGPATH -u "$windows_path"`
18613    new_path="$unix_path"
18614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18616    new_path="$unix_path"
18617  fi
18618
18619
18620    new_path=`$WHICH "$new_path" 2> /dev/null`
18621
18622    if test "x$new_path" = x; then
18623      # It's still not found. Now this is an unrecoverable error.
18624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18625$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18626      has_space=`$ECHO "$complete" | $GREP " "`
18627      if test "x$has_space" != x; then
18628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18630      fi
18631      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18632    fi
18633  fi
18634
18635  # Now new_path has a complete unix path to the binary
18636  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18637    # Keep paths in /bin as-is, but remove trailing .exe if any
18638    new_path="${new_path/%.exe/}"
18639    # Do not save /bin paths to all_fixpath_prefixes!
18640  else
18641    # Not in mixed or Windows style, start by that.
18642    new_path=`cmd //c echo $new_path`
18643
18644  input_path="$new_path"
18645  # Check if we need to convert this using DOS-style short mode. If the path
18646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18647  # take no chances and rewrite it.
18648  # Note: m4 eats our [], so we need to use [ and ] instead.
18649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18650  if test "x$has_forbidden_chars" != x; then
18651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18653  fi
18654
18655    # Output is in $new_path
18656
18657  windows_path="$new_path"
18658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18659    unix_path=`$CYGPATH -u "$windows_path"`
18660    new_path="$unix_path"
18661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18663    new_path="$unix_path"
18664  fi
18665
18666    # remove trailing .exe if any
18667    new_path="${new_path/%.exe/}"
18668
18669    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18670    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18671  fi
18672
18673  else
18674    # We're on a posix platform. Hooray! :)
18675    # First separate the path from the arguments. This will split at the first
18676    # space.
18677    complete="$PROPER_COMPILER_CC"
18678    path="${complete%% *}"
18679    tmp="$complete EOL"
18680    arguments="${tmp#* }"
18681
18682    # Cannot rely on the command "which" here since it doesn't always work.
18683    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18684    if test -z "$is_absolute_path"; then
18685      # Path to executable is not absolute. Find it.
18686      IFS_save="$IFS"
18687      IFS=:
18688      for p in $PATH; do
18689        if test -f "$p/$path" && test -x "$p/$path"; then
18690          new_path="$p/$path"
18691          break
18692        fi
18693      done
18694      IFS="$IFS_save"
18695    else
18696      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18697$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18698      new_path="$path"
18699    fi
18700
18701    if test "x$new_path" = x; then
18702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18703$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18704        has_space=`$ECHO "$complete" | $GREP " "`
18705        if test "x$has_space" != x; then
18706          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18707$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18708        fi
18709        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18710      fi
18711  fi
18712
18713      # Now join together the path and the arguments once again
18714      if test "x$arguments" != xEOL; then
18715        new_complete="$new_path ${arguments% *}"
18716      else
18717        new_complete="$new_path"
18718      fi
18719
18720  if test "x$complete" != "x$new_complete"; then
18721      PROPER_COMPILER_CC="$new_complete"
18722      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18723$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18724    fi
18725
18726    PATH="$RETRY_COMPILER_SAVED_PATH"
18727
18728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18729$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18730
18731    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18732        # Follow a chain of symbolic links. Use readlink
18733        # where it exists, else fall back to horribly
18734        # complicated shell code.
18735        if test "x$READLINK_TESTED" != yes; then
18736            # On MacOSX there is a readlink tool with a different
18737            # purpose than the GNU readlink tool. Check the found readlink.
18738            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18739            if test "x$ISGNU" = x; then
18740                 # A readlink that we do not know how to use.
18741                 # Are there other non-GNU readlinks out there?
18742                 READLINK_TESTED=yes
18743                 READLINK=
18744            fi
18745        fi
18746
18747        if test "x$READLINK" != x; then
18748            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18749        else
18750            # Save the current directory for restoring afterwards
18751            STARTDIR=$PWD
18752            COUNTER=0
18753            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18754            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18755            # Use the system pwd and not the shell builtin to resolve directory symlinks
18756            cd $sym_link_dir
18757            cd `$THEPWDCMD`
18758            sym_link_dir=`$THEPWDCMD`
18759            # Resolve file symlinks
18760            while test $COUNTER -lt 20; do
18761                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18762                if test "x$ISLINK" == x; then
18763                    # This is not a symbolic link! We are done!
18764                    break
18765                fi
18766                # Again resolve directory symlinks since the target of the just found
18767                # link could be in a different directory
18768                cd `$DIRNAME $ISLINK`
18769                sym_link_dir=`$THEPWDCMD`
18770                sym_link_file=`$BASENAME $ISLINK`
18771                let COUNTER=COUNTER+1
18772            done
18773            cd $STARTDIR
18774            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18775        fi
18776    fi
18777
18778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18779$as_echo "$PROPER_COMPILER_CC" >&6; }
18780    CC="$PROPER_COMPILER_CC"
18781  else
18782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18783$as_echo "no, keeping CC" >&6; }
18784    CC="$TEST_COMPILER"
18785  fi
18786
18787  COMPILER=$CC
18788  COMPILER_NAME=$COMPILER_NAME
18789
18790  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18791    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18792    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18793    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18794    if test $? -ne 0; then
18795      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18796
18797      { $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
18798$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18799      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18800$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18801      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18802    else
18803      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18804      COMPILER_VENDOR="Sun Studio"
18805    fi
18806  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18807    # First line typically looks something like:
18808    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18809    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18810    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18811    COMPILER_VENDOR="Microsoft CL.EXE"
18812    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18813    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18814      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18815        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18816      fi
18817    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18818      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18819        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18820      fi
18821    fi
18822  else
18823    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18824    # Check that this is likely to be GCC.
18825    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18826    if test $? -ne 0; then
18827      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18828$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18829      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18830$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18831      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18832    fi
18833
18834    # First line typically looks something like:
18835    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18836    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18837    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18838  fi
18839  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18840  CC_VERSION="$COMPILER_VERSION"
18841  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18842  CC_VENDOR="$COMPILER_VENDOR"
18843
18844  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18845$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18846
18847
18848# Now that we have resolved CC ourself, let autoconf have it's go at it
18849ac_ext=c
18850ac_cpp='$CPP $CPPFLAGS'
18851ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18852ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18853ac_compiler_gnu=$ac_cv_c_compiler_gnu
18854if test -n "$ac_tool_prefix"; then
18855  for ac_prog in $CC
18856  do
18857    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18858set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18860$as_echo_n "checking for $ac_word... " >&6; }
18861if test "${ac_cv_prog_CC+set}" = set; then :
18862  $as_echo_n "(cached) " >&6
18863else
18864  if test -n "$CC"; then
18865  ac_cv_prog_CC="$CC" # Let the user override the test.
18866else
18867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18868for as_dir in $PATH
18869do
18870  IFS=$as_save_IFS
18871  test -z "$as_dir" && as_dir=.
18872    for ac_exec_ext in '' $ac_executable_extensions; do
18873  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18874    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18876    break 2
18877  fi
18878done
18879  done
18880IFS=$as_save_IFS
18881
18882fi
18883fi
18884CC=$ac_cv_prog_CC
18885if test -n "$CC"; then
18886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18887$as_echo "$CC" >&6; }
18888else
18889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18890$as_echo "no" >&6; }
18891fi
18892
18893
18894    test -n "$CC" && break
18895  done
18896fi
18897if test -z "$CC"; then
18898  ac_ct_CC=$CC
18899  for ac_prog in $CC
18900do
18901  # Extract the first word of "$ac_prog", so it can be a program name with args.
18902set dummy $ac_prog; ac_word=$2
18903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18904$as_echo_n "checking for $ac_word... " >&6; }
18905if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18906  $as_echo_n "(cached) " >&6
18907else
18908  if test -n "$ac_ct_CC"; then
18909  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18910else
18911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18912for as_dir in $PATH
18913do
18914  IFS=$as_save_IFS
18915  test -z "$as_dir" && as_dir=.
18916    for ac_exec_ext in '' $ac_executable_extensions; do
18917  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18918    ac_cv_prog_ac_ct_CC="$ac_prog"
18919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18920    break 2
18921  fi
18922done
18923  done
18924IFS=$as_save_IFS
18925
18926fi
18927fi
18928ac_ct_CC=$ac_cv_prog_ac_ct_CC
18929if test -n "$ac_ct_CC"; then
18930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18931$as_echo "$ac_ct_CC" >&6; }
18932else
18933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18934$as_echo "no" >&6; }
18935fi
18936
18937
18938  test -n "$ac_ct_CC" && break
18939done
18940
18941  if test "x$ac_ct_CC" = x; then
18942    CC=""
18943  else
18944    case $cross_compiling:$ac_tool_warned in
18945yes:)
18946{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18947$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18948ac_tool_warned=yes ;;
18949esac
18950    CC=$ac_ct_CC
18951  fi
18952fi
18953
18954
18955test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18957as_fn_error $? "no acceptable C compiler found in \$PATH
18958See \`config.log' for more details" "$LINENO" 5 ; }
18959
18960# Provide some information about the compiler.
18961$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18962set X $ac_compile
18963ac_compiler=$2
18964for ac_option in --version -v -V -qversion; do
18965  { { ac_try="$ac_compiler $ac_option >&5"
18966case "(($ac_try" in
18967  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18968  *) ac_try_echo=$ac_try;;
18969esac
18970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18971$as_echo "$ac_try_echo"; } >&5
18972  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18973  ac_status=$?
18974  if test -s conftest.err; then
18975    sed '10a\
18976... rest of stderr output deleted ...
18977         10q' conftest.err >conftest.er1
18978    cat conftest.er1 >&5
18979  fi
18980  rm -f conftest.er1 conftest.err
18981  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18982  test $ac_status = 0; }
18983done
18984
18985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18986/* end confdefs.h.  */
18987
18988int
18989main ()
18990{
18991
18992  ;
18993  return 0;
18994}
18995_ACEOF
18996ac_clean_files_save=$ac_clean_files
18997ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18998# Try to create an executable without -o first, disregard a.out.
18999# It will help us diagnose broken compilers, and finding out an intuition
19000# of exeext.
19001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19002$as_echo_n "checking whether the C compiler works... " >&6; }
19003ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19004
19005# The possible output files:
19006ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19007
19008ac_rmfiles=
19009for ac_file in $ac_files
19010do
19011  case $ac_file in
19012    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19013    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19014  esac
19015done
19016rm -f $ac_rmfiles
19017
19018if { { ac_try="$ac_link_default"
19019case "(($ac_try" in
19020  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19021  *) ac_try_echo=$ac_try;;
19022esac
19023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19024$as_echo "$ac_try_echo"; } >&5
19025  (eval "$ac_link_default") 2>&5
19026  ac_status=$?
19027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19028  test $ac_status = 0; }; then :
19029  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19030# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19031# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19032# so that the user can short-circuit this test for compilers unknown to
19033# Autoconf.
19034for ac_file in $ac_files ''
19035do
19036  test -f "$ac_file" || continue
19037  case $ac_file in
19038    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19039	;;
19040    [ab].out )
19041	# We found the default executable, but exeext='' is most
19042	# certainly right.
19043	break;;
19044    *.* )
19045	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19046	then :; else
19047	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19048	fi
19049	# We set ac_cv_exeext here because the later test for it is not
19050	# safe: cross compilers may not add the suffix if given an `-o'
19051	# argument, so we may need to know it at that point already.
19052	# Even if this section looks crufty: it has the advantage of
19053	# actually working.
19054	break;;
19055    * )
19056	break;;
19057  esac
19058done
19059test "$ac_cv_exeext" = no && ac_cv_exeext=
19060
19061else
19062  ac_file=''
19063fi
19064if test -z "$ac_file"; then :
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19066$as_echo "no" >&6; }
19067$as_echo "$as_me: failed program was:" >&5
19068sed 's/^/| /' conftest.$ac_ext >&5
19069
19070{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19072as_fn_error 77 "C compiler cannot create executables
19073See \`config.log' for more details" "$LINENO" 5 ; }
19074else
19075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19076$as_echo "yes" >&6; }
19077fi
19078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19079$as_echo_n "checking for C compiler default output file name... " >&6; }
19080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19081$as_echo "$ac_file" >&6; }
19082ac_exeext=$ac_cv_exeext
19083
19084rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19085ac_clean_files=$ac_clean_files_save
19086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19087$as_echo_n "checking for suffix of executables... " >&6; }
19088if { { ac_try="$ac_link"
19089case "(($ac_try" in
19090  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19091  *) ac_try_echo=$ac_try;;
19092esac
19093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19094$as_echo "$ac_try_echo"; } >&5
19095  (eval "$ac_link") 2>&5
19096  ac_status=$?
19097  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19098  test $ac_status = 0; }; then :
19099  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19100# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19101# work properly (i.e., refer to `conftest.exe'), while it won't with
19102# `rm'.
19103for ac_file in conftest.exe conftest conftest.*; do
19104  test -f "$ac_file" || continue
19105  case $ac_file in
19106    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19107    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19108	  break;;
19109    * ) break;;
19110  esac
19111done
19112else
19113  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19115as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19116See \`config.log' for more details" "$LINENO" 5 ; }
19117fi
19118rm -f conftest conftest$ac_cv_exeext
19119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19120$as_echo "$ac_cv_exeext" >&6; }
19121
19122rm -f conftest.$ac_ext
19123EXEEXT=$ac_cv_exeext
19124ac_exeext=$EXEEXT
19125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19126/* end confdefs.h.  */
19127#include <stdio.h>
19128int
19129main ()
19130{
19131FILE *f = fopen ("conftest.out", "w");
19132 return ferror (f) || fclose (f) != 0;
19133
19134  ;
19135  return 0;
19136}
19137_ACEOF
19138ac_clean_files="$ac_clean_files conftest.out"
19139# Check that the compiler produces executables we can run.  If not, either
19140# the compiler is broken, or we cross compile.
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19142$as_echo_n "checking whether we are cross compiling... " >&6; }
19143if test "$cross_compiling" != yes; then
19144  { { ac_try="$ac_link"
19145case "(($ac_try" in
19146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19147  *) ac_try_echo=$ac_try;;
19148esac
19149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19150$as_echo "$ac_try_echo"; } >&5
19151  (eval "$ac_link") 2>&5
19152  ac_status=$?
19153  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19154  test $ac_status = 0; }
19155  if { ac_try='./conftest$ac_cv_exeext'
19156  { { case "(($ac_try" in
19157  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19158  *) ac_try_echo=$ac_try;;
19159esac
19160eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19161$as_echo "$ac_try_echo"; } >&5
19162  (eval "$ac_try") 2>&5
19163  ac_status=$?
19164  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19165  test $ac_status = 0; }; }; then
19166    cross_compiling=no
19167  else
19168    if test "$cross_compiling" = maybe; then
19169	cross_compiling=yes
19170    else
19171	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19173as_fn_error $? "cannot run C compiled programs.
19174If you meant to cross compile, use \`--host'.
19175See \`config.log' for more details" "$LINENO" 5 ; }
19176    fi
19177  fi
19178fi
19179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19180$as_echo "$cross_compiling" >&6; }
19181
19182rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19183ac_clean_files=$ac_clean_files_save
19184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19185$as_echo_n "checking for suffix of object files... " >&6; }
19186if test "${ac_cv_objext+set}" = set; then :
19187  $as_echo_n "(cached) " >&6
19188else
19189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19190/* end confdefs.h.  */
19191
19192int
19193main ()
19194{
19195
19196  ;
19197  return 0;
19198}
19199_ACEOF
19200rm -f conftest.o conftest.obj
19201if { { ac_try="$ac_compile"
19202case "(($ac_try" in
19203  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19204  *) ac_try_echo=$ac_try;;
19205esac
19206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19207$as_echo "$ac_try_echo"; } >&5
19208  (eval "$ac_compile") 2>&5
19209  ac_status=$?
19210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19211  test $ac_status = 0; }; then :
19212  for ac_file in conftest.o conftest.obj conftest.*; do
19213  test -f "$ac_file" || continue;
19214  case $ac_file in
19215    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19216    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19217       break;;
19218  esac
19219done
19220else
19221  $as_echo "$as_me: failed program was:" >&5
19222sed 's/^/| /' conftest.$ac_ext >&5
19223
19224{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19226as_fn_error $? "cannot compute suffix of object files: cannot compile
19227See \`config.log' for more details" "$LINENO" 5 ; }
19228fi
19229rm -f conftest.$ac_cv_objext conftest.$ac_ext
19230fi
19231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19232$as_echo "$ac_cv_objext" >&6; }
19233OBJEXT=$ac_cv_objext
19234ac_objext=$OBJEXT
19235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19236$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19237if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19238  $as_echo_n "(cached) " >&6
19239else
19240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19241/* end confdefs.h.  */
19242
19243int
19244main ()
19245{
19246#ifndef __GNUC__
19247       choke me
19248#endif
19249
19250  ;
19251  return 0;
19252}
19253_ACEOF
19254if ac_fn_c_try_compile "$LINENO"; then :
19255  ac_compiler_gnu=yes
19256else
19257  ac_compiler_gnu=no
19258fi
19259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19260ac_cv_c_compiler_gnu=$ac_compiler_gnu
19261
19262fi
19263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19264$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19265if test $ac_compiler_gnu = yes; then
19266  GCC=yes
19267else
19268  GCC=
19269fi
19270ac_test_CFLAGS=${CFLAGS+set}
19271ac_save_CFLAGS=$CFLAGS
19272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19273$as_echo_n "checking whether $CC accepts -g... " >&6; }
19274if test "${ac_cv_prog_cc_g+set}" = set; then :
19275  $as_echo_n "(cached) " >&6
19276else
19277  ac_save_c_werror_flag=$ac_c_werror_flag
19278   ac_c_werror_flag=yes
19279   ac_cv_prog_cc_g=no
19280   CFLAGS="-g"
19281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19282/* end confdefs.h.  */
19283
19284int
19285main ()
19286{
19287
19288  ;
19289  return 0;
19290}
19291_ACEOF
19292if ac_fn_c_try_compile "$LINENO"; then :
19293  ac_cv_prog_cc_g=yes
19294else
19295  CFLAGS=""
19296      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19297/* end confdefs.h.  */
19298
19299int
19300main ()
19301{
19302
19303  ;
19304  return 0;
19305}
19306_ACEOF
19307if ac_fn_c_try_compile "$LINENO"; then :
19308
19309else
19310  ac_c_werror_flag=$ac_save_c_werror_flag
19311	 CFLAGS="-g"
19312	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19313/* end confdefs.h.  */
19314
19315int
19316main ()
19317{
19318
19319  ;
19320  return 0;
19321}
19322_ACEOF
19323if ac_fn_c_try_compile "$LINENO"; then :
19324  ac_cv_prog_cc_g=yes
19325fi
19326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19327fi
19328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19329fi
19330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19331   ac_c_werror_flag=$ac_save_c_werror_flag
19332fi
19333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19334$as_echo "$ac_cv_prog_cc_g" >&6; }
19335if test "$ac_test_CFLAGS" = set; then
19336  CFLAGS=$ac_save_CFLAGS
19337elif test $ac_cv_prog_cc_g = yes; then
19338  if test "$GCC" = yes; then
19339    CFLAGS="-g -O2"
19340  else
19341    CFLAGS="-g"
19342  fi
19343else
19344  if test "$GCC" = yes; then
19345    CFLAGS="-O2"
19346  else
19347    CFLAGS=
19348  fi
19349fi
19350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19351$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19352if test "${ac_cv_prog_cc_c89+set}" = set; then :
19353  $as_echo_n "(cached) " >&6
19354else
19355  ac_cv_prog_cc_c89=no
19356ac_save_CC=$CC
19357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19358/* end confdefs.h.  */
19359#include <stdarg.h>
19360#include <stdio.h>
19361#include <sys/types.h>
19362#include <sys/stat.h>
19363/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19364struct buf { int x; };
19365FILE * (*rcsopen) (struct buf *, struct stat *, int);
19366static char *e (p, i)
19367     char **p;
19368     int i;
19369{
19370  return p[i];
19371}
19372static char *f (char * (*g) (char **, int), char **p, ...)
19373{
19374  char *s;
19375  va_list v;
19376  va_start (v,p);
19377  s = g (p, va_arg (v,int));
19378  va_end (v);
19379  return s;
19380}
19381
19382/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19383   function prototypes and stuff, but not '\xHH' hex character constants.
19384   These don't provoke an error unfortunately, instead are silently treated
19385   as 'x'.  The following induces an error, until -std is added to get
19386   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19387   array size at least.  It's necessary to write '\x00'==0 to get something
19388   that's true only with -std.  */
19389int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19390
19391/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19392   inside strings and character constants.  */
19393#define FOO(x) 'x'
19394int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19395
19396int test (int i, double x);
19397struct s1 {int (*f) (int a);};
19398struct s2 {int (*f) (double a);};
19399int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19400int argc;
19401char **argv;
19402int
19403main ()
19404{
19405return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19406  ;
19407  return 0;
19408}
19409_ACEOF
19410for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19411	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19412do
19413  CC="$ac_save_CC $ac_arg"
19414  if ac_fn_c_try_compile "$LINENO"; then :
19415  ac_cv_prog_cc_c89=$ac_arg
19416fi
19417rm -f core conftest.err conftest.$ac_objext
19418  test "x$ac_cv_prog_cc_c89" != "xno" && break
19419done
19420rm -f conftest.$ac_ext
19421CC=$ac_save_CC
19422
19423fi
19424# AC_CACHE_VAL
19425case "x$ac_cv_prog_cc_c89" in
19426  x)
19427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19428$as_echo "none needed" >&6; } ;;
19429  xno)
19430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19431$as_echo "unsupported" >&6; } ;;
19432  *)
19433    CC="$CC $ac_cv_prog_cc_c89"
19434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19435$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19436esac
19437if test "x$ac_cv_prog_cc_c89" != xno; then :
19438
19439fi
19440
19441ac_ext=cpp
19442ac_cpp='$CXXCPP $CPPFLAGS'
19443ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19444ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19445ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19446
19447
19448### Locate C++ compiler (CXX)
19449
19450if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19451  # Do not probe for CC on MacOSX.
19452  COMPILER_CHECK_LIST="cl g++"
19453else
19454  COMPILER_CHECK_LIST="cl CC g++"
19455fi
19456
19457  COMPILER_NAME=C++
19458
19459  CXX=
19460  # If TOOLS_DIR is set, check for all compiler names in there first
19461  # before checking the rest of the PATH.
19462  if test -n "$TOOLS_DIR"; then
19463    PATH_save="$PATH"
19464    PATH="$TOOLS_DIR"
19465    for ac_prog in $COMPILER_CHECK_LIST
19466do
19467  # Extract the first word of "$ac_prog", so it can be a program name with args.
19468set dummy $ac_prog; ac_word=$2
19469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19470$as_echo_n "checking for $ac_word... " >&6; }
19471if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19472  $as_echo_n "(cached) " >&6
19473else
19474  case $TOOLS_DIR_CXX in
19475  [\\/]* | ?:[\\/]*)
19476  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19477  ;;
19478  *)
19479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19480for as_dir in $PATH
19481do
19482  IFS=$as_save_IFS
19483  test -z "$as_dir" && as_dir=.
19484    for ac_exec_ext in '' $ac_executable_extensions; do
19485  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19486    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19488    break 2
19489  fi
19490done
19491  done
19492IFS=$as_save_IFS
19493
19494  ;;
19495esac
19496fi
19497TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19498if test -n "$TOOLS_DIR_CXX"; then
19499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19500$as_echo "$TOOLS_DIR_CXX" >&6; }
19501else
19502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19503$as_echo "no" >&6; }
19504fi
19505
19506
19507  test -n "$TOOLS_DIR_CXX" && break
19508done
19509
19510    CXX=$TOOLS_DIR_CXX
19511    PATH="$PATH_save"
19512  fi
19513
19514  # AC_PATH_PROGS can't be run multiple times with the same variable,
19515  # so create a new name for this run.
19516  if test "x$CXX" = x; then
19517    for ac_prog in $COMPILER_CHECK_LIST
19518do
19519  # Extract the first word of "$ac_prog", so it can be a program name with args.
19520set dummy $ac_prog; ac_word=$2
19521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19522$as_echo_n "checking for $ac_word... " >&6; }
19523if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19524  $as_echo_n "(cached) " >&6
19525else
19526  case $POTENTIAL_CXX in
19527  [\\/]* | ?:[\\/]*)
19528  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19529  ;;
19530  *)
19531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19532for as_dir in $PATH
19533do
19534  IFS=$as_save_IFS
19535  test -z "$as_dir" && as_dir=.
19536    for ac_exec_ext in '' $ac_executable_extensions; do
19537  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19538    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19540    break 2
19541  fi
19542done
19543  done
19544IFS=$as_save_IFS
19545
19546  ;;
19547esac
19548fi
19549POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19550if test -n "$POTENTIAL_CXX"; then
19551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19552$as_echo "$POTENTIAL_CXX" >&6; }
19553else
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19555$as_echo "no" >&6; }
19556fi
19557
19558
19559  test -n "$POTENTIAL_CXX" && break
19560done
19561
19562    CXX=$POTENTIAL_CXX
19563  fi
19564
19565  if test "x$CXX" = x; then
19566
19567    # Print a helpful message on how to acquire the necessary build dependency.
19568    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19569    MISSING_DEPENDENCY=devkit
19570    PKGHANDLER_COMMAND=
19571
19572    case $PKGHANDLER in
19573	apt-get)
19574                apt_help     $MISSING_DEPENDENCY ;;
19575    yum)
19576                yum_help     $MISSING_DEPENDENCY ;;
19577	port)
19578                port_help    $MISSING_DEPENDENCY ;;
19579	pkgutil)
19580                pkgutil_help $MISSING_DEPENDENCY ;;
19581	pkgadd)
19582                pkgadd_help  $MISSING_DEPENDENCY ;;
19583    * )
19584      break ;;
19585    esac
19586
19587    if test "x$PKGHANDLER_COMMAND" != x; then
19588        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19589    fi
19590
19591      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19592  fi
19593
19594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19595
19596  # First separate the path from the arguments. This will split at the first
19597  # space.
19598  complete="$CXX"
19599  path="${complete%% *}"
19600  tmp="$complete EOL"
19601  arguments="${tmp#* }"
19602
19603  # Input might be given as Windows format, start by converting to
19604  # unix format.
19605  new_path=`$CYGPATH -u "$path"`
19606
19607  # Now try to locate executable using which
19608  new_path=`$WHICH "$new_path" 2> /dev/null`
19609  # bat and cmd files are not always considered executable in cygwin causing which
19610  # to not find them
19611  if test "x$new_path" = x \
19612           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19613           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19614    new_path=`$CYGPATH -u "$path"`
19615  fi
19616  if test "x$new_path" = x; then
19617    # Oops. Which didn't find the executable.
19618    # The splitting of arguments from the executable at a space might have been incorrect,
19619    # since paths with space are more likely in Windows. Give it another try with the whole
19620    # argument.
19621    path="$complete"
19622    arguments="EOL"
19623    new_path=`$CYGPATH -u "$path"`
19624    new_path=`$WHICH "$new_path" 2> /dev/null`
19625    # bat and cmd files are not always considered executable in cygwin causing which
19626    # to not find them
19627    if test "x$new_path" = x \
19628             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19629             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19630      new_path=`$CYGPATH -u "$path"`
19631    fi
19632    if test "x$new_path" = x; then
19633      # It's still not found. Now this is an unrecoverable error.
19634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19635$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19636      has_space=`$ECHO "$complete" | $GREP " "`
19637      if test "x$has_space" != x; then
19638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19640      fi
19641      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19642    fi
19643  fi
19644
19645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19648  # "foo.exe" is OK but "foo" is an error.
19649  #
19650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19651  # It is also a way to make sure we got the proper file name for the real test later on.
19652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19653  if test "x$test_shortpath" = x; then
19654    # Short path failed, file does not exist as specified.
19655    # Try adding .exe or .cmd
19656    if test -f "${new_path}.exe"; then
19657       input_to_shortpath="${new_path}.exe"
19658    elif test -f "${new_path}.cmd"; then
19659       input_to_shortpath="${new_path}.cmd"
19660    else
19661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19662$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19663      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19664$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19665      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19666    fi
19667  else
19668    input_to_shortpath="$new_path"
19669  fi
19670
19671  # Call helper function which possibly converts this using DOS-style short mode.
19672  # If so, the updated path is stored in $new_path.
19673  new_path="$input_to_shortpath"
19674
19675  input_path="$input_to_shortpath"
19676  # Check if we need to convert this using DOS-style short mode. If the path
19677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19678  # take no chances and rewrite it.
19679  # Note: m4 eats our [], so we need to use [ and ] instead.
19680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19681  if test "x$has_forbidden_chars" != x; then
19682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19686      # Going to short mode and back again did indeed matter. Since short mode is
19687      # case insensitive, let's make it lowercase to improve readability.
19688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19689      # Now convert it back to Unix-stile (cygpath)
19690      input_path=`$CYGPATH -u "$shortmode_path"`
19691      new_path="$input_path"
19692    fi
19693  fi
19694
19695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19696  if test "x$test_cygdrive_prefix" = x; then
19697    # As a simple fix, exclude /usr/bin since it's not a real path.
19698    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19700      # a path prefixed by /cygdrive for fixpath to work.
19701      new_path="$CYGWIN_ROOT_PATH$input_path"
19702    fi
19703  fi
19704
19705  # remove trailing .exe if any
19706  new_path="${new_path/%.exe/}"
19707
19708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19709
19710  # First separate the path from the arguments. This will split at the first
19711  # space.
19712  complete="$CXX"
19713  path="${complete%% *}"
19714  tmp="$complete EOL"
19715  arguments="${tmp#* }"
19716
19717  # Input might be given as Windows format, start by converting to
19718  # unix format.
19719  new_path="$path"
19720
19721  windows_path="$new_path"
19722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19723    unix_path=`$CYGPATH -u "$windows_path"`
19724    new_path="$unix_path"
19725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19727    new_path="$unix_path"
19728  fi
19729
19730
19731  # Now try to locate executable using which
19732  new_path=`$WHICH "$new_path" 2> /dev/null`
19733
19734  if test "x$new_path" = x; then
19735    # Oops. Which didn't find the executable.
19736    # The splitting of arguments from the executable at a space might have been incorrect,
19737    # since paths with space are more likely in Windows. Give it another try with the whole
19738    # argument.
19739    path="$complete"
19740    arguments="EOL"
19741    new_path="$path"
19742
19743  windows_path="$new_path"
19744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19745    unix_path=`$CYGPATH -u "$windows_path"`
19746    new_path="$unix_path"
19747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19749    new_path="$unix_path"
19750  fi
19751
19752
19753    new_path=`$WHICH "$new_path" 2> /dev/null`
19754
19755    if test "x$new_path" = x; then
19756      # It's still not found. Now this is an unrecoverable error.
19757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19758$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19759      has_space=`$ECHO "$complete" | $GREP " "`
19760      if test "x$has_space" != x; then
19761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19763      fi
19764      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19765    fi
19766  fi
19767
19768  # Now new_path has a complete unix path to the binary
19769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19770    # Keep paths in /bin as-is, but remove trailing .exe if any
19771    new_path="${new_path/%.exe/}"
19772    # Do not save /bin paths to all_fixpath_prefixes!
19773  else
19774    # Not in mixed or Windows style, start by that.
19775    new_path=`cmd //c echo $new_path`
19776
19777  input_path="$new_path"
19778  # Check if we need to convert this using DOS-style short mode. If the path
19779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19780  # take no chances and rewrite it.
19781  # Note: m4 eats our [], so we need to use [ and ] instead.
19782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19783  if test "x$has_forbidden_chars" != x; then
19784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19786  fi
19787
19788    # Output is in $new_path
19789
19790  windows_path="$new_path"
19791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19792    unix_path=`$CYGPATH -u "$windows_path"`
19793    new_path="$unix_path"
19794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19796    new_path="$unix_path"
19797  fi
19798
19799    # remove trailing .exe if any
19800    new_path="${new_path/%.exe/}"
19801
19802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19804  fi
19805
19806  else
19807    # We're on a posix platform. Hooray! :)
19808    # First separate the path from the arguments. This will split at the first
19809    # space.
19810    complete="$CXX"
19811    path="${complete%% *}"
19812    tmp="$complete EOL"
19813    arguments="${tmp#* }"
19814
19815    # Cannot rely on the command "which" here since it doesn't always work.
19816    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19817    if test -z "$is_absolute_path"; then
19818      # Path to executable is not absolute. Find it.
19819      IFS_save="$IFS"
19820      IFS=:
19821      for p in $PATH; do
19822        if test -f "$p/$path" && test -x "$p/$path"; then
19823          new_path="$p/$path"
19824          break
19825        fi
19826      done
19827      IFS="$IFS_save"
19828    else
19829      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
19830$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
19831      new_path="$path"
19832    fi
19833
19834    if test "x$new_path" = x; then
19835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19836$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19837        has_space=`$ECHO "$complete" | $GREP " "`
19838        if test "x$has_space" != x; then
19839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19841        fi
19842        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19843      fi
19844  fi
19845
19846      # Now join together the path and the arguments once again
19847      if test "x$arguments" != xEOL; then
19848        new_complete="$new_path ${arguments% *}"
19849      else
19850        new_complete="$new_path"
19851      fi
19852
19853  if test "x$complete" != "x$new_complete"; then
19854      CXX="$new_complete"
19855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19856$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19857    fi
19858
19859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19860$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19861  TEST_COMPILER="$CXX"
19862
19863    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19864        # Follow a chain of symbolic links. Use readlink
19865        # where it exists, else fall back to horribly
19866        # complicated shell code.
19867        if test "x$READLINK_TESTED" != yes; then
19868            # On MacOSX there is a readlink tool with a different
19869            # purpose than the GNU readlink tool. Check the found readlink.
19870            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19871            if test "x$ISGNU" = x; then
19872                 # A readlink that we do not know how to use.
19873                 # Are there other non-GNU readlinks out there?
19874                 READLINK_TESTED=yes
19875                 READLINK=
19876            fi
19877        fi
19878
19879        if test "x$READLINK" != x; then
19880            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19881        else
19882            # Save the current directory for restoring afterwards
19883            STARTDIR=$PWD
19884            COUNTER=0
19885            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19886            sym_link_file=`$BASENAME $TEST_COMPILER`
19887            # Use the system pwd and not the shell builtin to resolve directory symlinks
19888            cd $sym_link_dir
19889            cd `$THEPWDCMD`
19890            sym_link_dir=`$THEPWDCMD`
19891            # Resolve file symlinks
19892            while test $COUNTER -lt 20; do
19893                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19894                if test "x$ISLINK" == x; then
19895                    # This is not a symbolic link! We are done!
19896                    break
19897                fi
19898                # Again resolve directory symlinks since the target of the just found
19899                # link could be in a different directory
19900                cd `$DIRNAME $ISLINK`
19901                sym_link_dir=`$THEPWDCMD`
19902                sym_link_file=`$BASENAME $ISLINK`
19903                let COUNTER=COUNTER+1
19904            done
19905            cd $STARTDIR
19906            TEST_COMPILER=$sym_link_dir/$sym_link_file
19907        fi
19908    fi
19909
19910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19911$as_echo "$TEST_COMPILER" >&6; }
19912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19913$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19914
19915  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19916  if test "x$COMPILER_BASENAME" = "xccache"; then
19917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19918$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19919    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19920    # We want to control ccache invocation ourselves, so ignore this cc and try
19921    # searching again.
19922
19923    # Remove the path to the fake ccache cc from the PATH
19924    RETRY_COMPILER_SAVED_PATH="$PATH"
19925    COMPILER_DIRNAME=`$DIRNAME $CXX`
19926    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19927
19928    # Try again looking for our compiler
19929    if test -n "$ac_tool_prefix"; then
19930  for ac_prog in $COMPILER_CHECK_LIST
19931  do
19932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19935$as_echo_n "checking for $ac_word... " >&6; }
19936if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19937  $as_echo_n "(cached) " >&6
19938else
19939  if test -n "$PROPER_COMPILER_CXX"; then
19940  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19941else
19942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19943for as_dir in $PATH
19944do
19945  IFS=$as_save_IFS
19946  test -z "$as_dir" && as_dir=.
19947    for ac_exec_ext in '' $ac_executable_extensions; do
19948  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19949    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19951    break 2
19952  fi
19953done
19954  done
19955IFS=$as_save_IFS
19956
19957fi
19958fi
19959PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19960if test -n "$PROPER_COMPILER_CXX"; then
19961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19962$as_echo "$PROPER_COMPILER_CXX" >&6; }
19963else
19964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19965$as_echo "no" >&6; }
19966fi
19967
19968
19969    test -n "$PROPER_COMPILER_CXX" && break
19970  done
19971fi
19972if test -z "$PROPER_COMPILER_CXX"; then
19973  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19974  for ac_prog in $COMPILER_CHECK_LIST
19975do
19976  # Extract the first word of "$ac_prog", so it can be a program name with args.
19977set dummy $ac_prog; ac_word=$2
19978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19979$as_echo_n "checking for $ac_word... " >&6; }
19980if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19981  $as_echo_n "(cached) " >&6
19982else
19983  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19984  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19985else
19986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19987for as_dir in $PATH
19988do
19989  IFS=$as_save_IFS
19990  test -z "$as_dir" && as_dir=.
19991    for ac_exec_ext in '' $ac_executable_extensions; do
19992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19993    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19995    break 2
19996  fi
19997done
19998  done
19999IFS=$as_save_IFS
20000
20001fi
20002fi
20003ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20004if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20006$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20007else
20008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20009$as_echo "no" >&6; }
20010fi
20011
20012
20013  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20014done
20015
20016  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20017    PROPER_COMPILER_CXX=""
20018  else
20019    case $cross_compiling:$ac_tool_warned in
20020yes:)
20021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20023ac_tool_warned=yes ;;
20024esac
20025    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20026  fi
20027fi
20028
20029
20030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031
20032  # First separate the path from the arguments. This will split at the first
20033  # space.
20034  complete="$PROPER_COMPILER_CXX"
20035  path="${complete%% *}"
20036  tmp="$complete EOL"
20037  arguments="${tmp#* }"
20038
20039  # Input might be given as Windows format, start by converting to
20040  # unix format.
20041  new_path=`$CYGPATH -u "$path"`
20042
20043  # Now try to locate executable using which
20044  new_path=`$WHICH "$new_path" 2> /dev/null`
20045  # bat and cmd files are not always considered executable in cygwin causing which
20046  # to not find them
20047  if test "x$new_path" = x \
20048           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20049           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20050    new_path=`$CYGPATH -u "$path"`
20051  fi
20052  if test "x$new_path" = x; then
20053    # Oops. Which didn't find the executable.
20054    # The splitting of arguments from the executable at a space might have been incorrect,
20055    # since paths with space are more likely in Windows. Give it another try with the whole
20056    # argument.
20057    path="$complete"
20058    arguments="EOL"
20059    new_path=`$CYGPATH -u "$path"`
20060    new_path=`$WHICH "$new_path" 2> /dev/null`
20061    # bat and cmd files are not always considered executable in cygwin causing which
20062    # to not find them
20063    if test "x$new_path" = x \
20064             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20065             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20066      new_path=`$CYGPATH -u "$path"`
20067    fi
20068    if test "x$new_path" = x; then
20069      # It's still not found. Now this is an unrecoverable error.
20070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20071$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20072      has_space=`$ECHO "$complete" | $GREP " "`
20073      if test "x$has_space" != x; then
20074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20076      fi
20077      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20078    fi
20079  fi
20080
20081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20084  # "foo.exe" is OK but "foo" is an error.
20085  #
20086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20087  # It is also a way to make sure we got the proper file name for the real test later on.
20088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20089  if test "x$test_shortpath" = x; then
20090    # Short path failed, file does not exist as specified.
20091    # Try adding .exe or .cmd
20092    if test -f "${new_path}.exe"; then
20093       input_to_shortpath="${new_path}.exe"
20094    elif test -f "${new_path}.cmd"; then
20095       input_to_shortpath="${new_path}.cmd"
20096    else
20097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20098$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20101      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20102    fi
20103  else
20104    input_to_shortpath="$new_path"
20105  fi
20106
20107  # Call helper function which possibly converts this using DOS-style short mode.
20108  # If so, the updated path is stored in $new_path.
20109  new_path="$input_to_shortpath"
20110
20111  input_path="$input_to_shortpath"
20112  # Check if we need to convert this using DOS-style short mode. If the path
20113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20114  # take no chances and rewrite it.
20115  # Note: m4 eats our [], so we need to use [ and ] instead.
20116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20117  if test "x$has_forbidden_chars" != x; then
20118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20122      # Going to short mode and back again did indeed matter. Since short mode is
20123      # case insensitive, let's make it lowercase to improve readability.
20124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20125      # Now convert it back to Unix-stile (cygpath)
20126      input_path=`$CYGPATH -u "$shortmode_path"`
20127      new_path="$input_path"
20128    fi
20129  fi
20130
20131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20132  if test "x$test_cygdrive_prefix" = x; then
20133    # As a simple fix, exclude /usr/bin since it's not a real path.
20134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20136      # a path prefixed by /cygdrive for fixpath to work.
20137      new_path="$CYGWIN_ROOT_PATH$input_path"
20138    fi
20139  fi
20140
20141  # remove trailing .exe if any
20142  new_path="${new_path/%.exe/}"
20143
20144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20145
20146  # First separate the path from the arguments. This will split at the first
20147  # space.
20148  complete="$PROPER_COMPILER_CXX"
20149  path="${complete%% *}"
20150  tmp="$complete EOL"
20151  arguments="${tmp#* }"
20152
20153  # Input might be given as Windows format, start by converting to
20154  # unix format.
20155  new_path="$path"
20156
20157  windows_path="$new_path"
20158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20159    unix_path=`$CYGPATH -u "$windows_path"`
20160    new_path="$unix_path"
20161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20163    new_path="$unix_path"
20164  fi
20165
20166
20167  # Now try to locate executable using which
20168  new_path=`$WHICH "$new_path" 2> /dev/null`
20169
20170  if test "x$new_path" = x; then
20171    # Oops. Which didn't find the executable.
20172    # The splitting of arguments from the executable at a space might have been incorrect,
20173    # since paths with space are more likely in Windows. Give it another try with the whole
20174    # argument.
20175    path="$complete"
20176    arguments="EOL"
20177    new_path="$path"
20178
20179  windows_path="$new_path"
20180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20181    unix_path=`$CYGPATH -u "$windows_path"`
20182    new_path="$unix_path"
20183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20185    new_path="$unix_path"
20186  fi
20187
20188
20189    new_path=`$WHICH "$new_path" 2> /dev/null`
20190
20191    if test "x$new_path" = x; then
20192      # It's still not found. Now this is an unrecoverable error.
20193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20194$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20195      has_space=`$ECHO "$complete" | $GREP " "`
20196      if test "x$has_space" != x; then
20197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20199      fi
20200      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20201    fi
20202  fi
20203
20204  # Now new_path has a complete unix path to the binary
20205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20206    # Keep paths in /bin as-is, but remove trailing .exe if any
20207    new_path="${new_path/%.exe/}"
20208    # Do not save /bin paths to all_fixpath_prefixes!
20209  else
20210    # Not in mixed or Windows style, start by that.
20211    new_path=`cmd //c echo $new_path`
20212
20213  input_path="$new_path"
20214  # Check if we need to convert this using DOS-style short mode. If the path
20215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20216  # take no chances and rewrite it.
20217  # Note: m4 eats our [], so we need to use [ and ] instead.
20218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20219  if test "x$has_forbidden_chars" != x; then
20220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20222  fi
20223
20224    # Output is in $new_path
20225
20226  windows_path="$new_path"
20227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20228    unix_path=`$CYGPATH -u "$windows_path"`
20229    new_path="$unix_path"
20230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20232    new_path="$unix_path"
20233  fi
20234
20235    # remove trailing .exe if any
20236    new_path="${new_path/%.exe/}"
20237
20238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20240  fi
20241
20242  else
20243    # We're on a posix platform. Hooray! :)
20244    # First separate the path from the arguments. This will split at the first
20245    # space.
20246    complete="$PROPER_COMPILER_CXX"
20247    path="${complete%% *}"
20248    tmp="$complete EOL"
20249    arguments="${tmp#* }"
20250
20251    # Cannot rely on the command "which" here since it doesn't always work.
20252    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20253    if test -z "$is_absolute_path"; then
20254      # Path to executable is not absolute. Find it.
20255      IFS_save="$IFS"
20256      IFS=:
20257      for p in $PATH; do
20258        if test -f "$p/$path" && test -x "$p/$path"; then
20259          new_path="$p/$path"
20260          break
20261        fi
20262      done
20263      IFS="$IFS_save"
20264    else
20265      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20266$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20267      new_path="$path"
20268    fi
20269
20270    if test "x$new_path" = x; then
20271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20272$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20273        has_space=`$ECHO "$complete" | $GREP " "`
20274        if test "x$has_space" != x; then
20275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20277        fi
20278        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20279      fi
20280  fi
20281
20282      # Now join together the path and the arguments once again
20283      if test "x$arguments" != xEOL; then
20284        new_complete="$new_path ${arguments% *}"
20285      else
20286        new_complete="$new_path"
20287      fi
20288
20289  if test "x$complete" != "x$new_complete"; then
20290      PROPER_COMPILER_CXX="$new_complete"
20291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20292$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20293    fi
20294
20295    PATH="$RETRY_COMPILER_SAVED_PATH"
20296
20297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20298$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20299
20300    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20301        # Follow a chain of symbolic links. Use readlink
20302        # where it exists, else fall back to horribly
20303        # complicated shell code.
20304        if test "x$READLINK_TESTED" != yes; then
20305            # On MacOSX there is a readlink tool with a different
20306            # purpose than the GNU readlink tool. Check the found readlink.
20307            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20308            if test "x$ISGNU" = x; then
20309                 # A readlink that we do not know how to use.
20310                 # Are there other non-GNU readlinks out there?
20311                 READLINK_TESTED=yes
20312                 READLINK=
20313            fi
20314        fi
20315
20316        if test "x$READLINK" != x; then
20317            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20318        else
20319            # Save the current directory for restoring afterwards
20320            STARTDIR=$PWD
20321            COUNTER=0
20322            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20323            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20324            # Use the system pwd and not the shell builtin to resolve directory symlinks
20325            cd $sym_link_dir
20326            cd `$THEPWDCMD`
20327            sym_link_dir=`$THEPWDCMD`
20328            # Resolve file symlinks
20329            while test $COUNTER -lt 20; do
20330                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20331                if test "x$ISLINK" == x; then
20332                    # This is not a symbolic link! We are done!
20333                    break
20334                fi
20335                # Again resolve directory symlinks since the target of the just found
20336                # link could be in a different directory
20337                cd `$DIRNAME $ISLINK`
20338                sym_link_dir=`$THEPWDCMD`
20339                sym_link_file=`$BASENAME $ISLINK`
20340                let COUNTER=COUNTER+1
20341            done
20342            cd $STARTDIR
20343            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20344        fi
20345    fi
20346
20347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20348$as_echo "$PROPER_COMPILER_CXX" >&6; }
20349    CXX="$PROPER_COMPILER_CXX"
20350  else
20351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20352$as_echo "no, keeping CXX" >&6; }
20353    CXX="$TEST_COMPILER"
20354  fi
20355
20356  COMPILER=$CXX
20357  COMPILER_NAME=$COMPILER_NAME
20358
20359  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20360    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20361    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20362    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20363    if test $? -ne 0; then
20364      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20365
20366      { $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
20367$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20368      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20369$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20370      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20371    else
20372      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20373      COMPILER_VENDOR="Sun Studio"
20374    fi
20375  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20376    # First line typically looks something like:
20377    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20378    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20379    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20380    COMPILER_VENDOR="Microsoft CL.EXE"
20381    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20382    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20383      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20384        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20385      fi
20386    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20387      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20388        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20389      fi
20390    fi
20391  else
20392    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20393    # Check that this is likely to be GCC.
20394    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20395    if test $? -ne 0; then
20396      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20397$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20398      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20399$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20400      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20401    fi
20402
20403    # First line typically looks something like:
20404    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20405    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20406    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20407  fi
20408  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20409  CXX_VERSION="$COMPILER_VERSION"
20410  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20411  CXX_VENDOR="$COMPILER_VENDOR"
20412
20413  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20414$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20415
20416
20417# Now that we have resolved CXX ourself, let autoconf have it's go at it
20418ac_ext=cpp
20419ac_cpp='$CXXCPP $CPPFLAGS'
20420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20423if test -z "$CXX"; then
20424  if test -n "$CCC"; then
20425    CXX=$CCC
20426  else
20427    if test -n "$ac_tool_prefix"; then
20428  for ac_prog in $CXX
20429  do
20430    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20431set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20433$as_echo_n "checking for $ac_word... " >&6; }
20434if test "${ac_cv_prog_CXX+set}" = set; then :
20435  $as_echo_n "(cached) " >&6
20436else
20437  if test -n "$CXX"; then
20438  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20439else
20440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20441for as_dir in $PATH
20442do
20443  IFS=$as_save_IFS
20444  test -z "$as_dir" && as_dir=.
20445    for ac_exec_ext in '' $ac_executable_extensions; do
20446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20447    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20449    break 2
20450  fi
20451done
20452  done
20453IFS=$as_save_IFS
20454
20455fi
20456fi
20457CXX=$ac_cv_prog_CXX
20458if test -n "$CXX"; then
20459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20460$as_echo "$CXX" >&6; }
20461else
20462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20463$as_echo "no" >&6; }
20464fi
20465
20466
20467    test -n "$CXX" && break
20468  done
20469fi
20470if test -z "$CXX"; then
20471  ac_ct_CXX=$CXX
20472  for ac_prog in $CXX
20473do
20474  # Extract the first word of "$ac_prog", so it can be a program name with args.
20475set dummy $ac_prog; ac_word=$2
20476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20477$as_echo_n "checking for $ac_word... " >&6; }
20478if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20479  $as_echo_n "(cached) " >&6
20480else
20481  if test -n "$ac_ct_CXX"; then
20482  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20483else
20484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20485for as_dir in $PATH
20486do
20487  IFS=$as_save_IFS
20488  test -z "$as_dir" && as_dir=.
20489    for ac_exec_ext in '' $ac_executable_extensions; do
20490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20491    ac_cv_prog_ac_ct_CXX="$ac_prog"
20492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20493    break 2
20494  fi
20495done
20496  done
20497IFS=$as_save_IFS
20498
20499fi
20500fi
20501ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20502if test -n "$ac_ct_CXX"; then
20503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20504$as_echo "$ac_ct_CXX" >&6; }
20505else
20506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20507$as_echo "no" >&6; }
20508fi
20509
20510
20511  test -n "$ac_ct_CXX" && break
20512done
20513
20514  if test "x$ac_ct_CXX" = x; then
20515    CXX="g++"
20516  else
20517    case $cross_compiling:$ac_tool_warned in
20518yes:)
20519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20521ac_tool_warned=yes ;;
20522esac
20523    CXX=$ac_ct_CXX
20524  fi
20525fi
20526
20527  fi
20528fi
20529# Provide some information about the compiler.
20530$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20531set X $ac_compile
20532ac_compiler=$2
20533for ac_option in --version -v -V -qversion; do
20534  { { ac_try="$ac_compiler $ac_option >&5"
20535case "(($ac_try" in
20536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20537  *) ac_try_echo=$ac_try;;
20538esac
20539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20540$as_echo "$ac_try_echo"; } >&5
20541  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20542  ac_status=$?
20543  if test -s conftest.err; then
20544    sed '10a\
20545... rest of stderr output deleted ...
20546         10q' conftest.err >conftest.er1
20547    cat conftest.er1 >&5
20548  fi
20549  rm -f conftest.er1 conftest.err
20550  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20551  test $ac_status = 0; }
20552done
20553
20554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20555$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20556if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20557  $as_echo_n "(cached) " >&6
20558else
20559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20560/* end confdefs.h.  */
20561
20562int
20563main ()
20564{
20565#ifndef __GNUC__
20566       choke me
20567#endif
20568
20569  ;
20570  return 0;
20571}
20572_ACEOF
20573if ac_fn_cxx_try_compile "$LINENO"; then :
20574  ac_compiler_gnu=yes
20575else
20576  ac_compiler_gnu=no
20577fi
20578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20579ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20580
20581fi
20582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20583$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20584if test $ac_compiler_gnu = yes; then
20585  GXX=yes
20586else
20587  GXX=
20588fi
20589ac_test_CXXFLAGS=${CXXFLAGS+set}
20590ac_save_CXXFLAGS=$CXXFLAGS
20591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20592$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20593if test "${ac_cv_prog_cxx_g+set}" = set; then :
20594  $as_echo_n "(cached) " >&6
20595else
20596  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20597   ac_cxx_werror_flag=yes
20598   ac_cv_prog_cxx_g=no
20599   CXXFLAGS="-g"
20600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20601/* end confdefs.h.  */
20602
20603int
20604main ()
20605{
20606
20607  ;
20608  return 0;
20609}
20610_ACEOF
20611if ac_fn_cxx_try_compile "$LINENO"; then :
20612  ac_cv_prog_cxx_g=yes
20613else
20614  CXXFLAGS=""
20615      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20616/* end confdefs.h.  */
20617
20618int
20619main ()
20620{
20621
20622  ;
20623  return 0;
20624}
20625_ACEOF
20626if ac_fn_cxx_try_compile "$LINENO"; then :
20627
20628else
20629  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20630	 CXXFLAGS="-g"
20631	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20632/* end confdefs.h.  */
20633
20634int
20635main ()
20636{
20637
20638  ;
20639  return 0;
20640}
20641_ACEOF
20642if ac_fn_cxx_try_compile "$LINENO"; then :
20643  ac_cv_prog_cxx_g=yes
20644fi
20645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20646fi
20647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20648fi
20649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20650   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20651fi
20652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20653$as_echo "$ac_cv_prog_cxx_g" >&6; }
20654if test "$ac_test_CXXFLAGS" = set; then
20655  CXXFLAGS=$ac_save_CXXFLAGS
20656elif test $ac_cv_prog_cxx_g = yes; then
20657  if test "$GXX" = yes; then
20658    CXXFLAGS="-g -O2"
20659  else
20660    CXXFLAGS="-g"
20661  fi
20662else
20663  if test "$GXX" = yes; then
20664    CXXFLAGS="-O2"
20665  else
20666    CXXFLAGS=
20667  fi
20668fi
20669ac_ext=cpp
20670ac_cpp='$CXXCPP $CPPFLAGS'
20671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20674
20675
20676### Locate other tools
20677
20678if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20679    ac_ext=m
20680ac_cpp='$OBJCPP $CPPFLAGS'
20681ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20682ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20683ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20684if test -n "$ac_tool_prefix"; then
20685  for ac_prog in gcc objcc objc cc CC
20686  do
20687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20690$as_echo_n "checking for $ac_word... " >&6; }
20691if test "${ac_cv_prog_OBJC+set}" = set; then :
20692  $as_echo_n "(cached) " >&6
20693else
20694  if test -n "$OBJC"; then
20695  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20696else
20697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20698for as_dir in $PATH
20699do
20700  IFS=$as_save_IFS
20701  test -z "$as_dir" && as_dir=.
20702    for ac_exec_ext in '' $ac_executable_extensions; do
20703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20704    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20706    break 2
20707  fi
20708done
20709  done
20710IFS=$as_save_IFS
20711
20712fi
20713fi
20714OBJC=$ac_cv_prog_OBJC
20715if test -n "$OBJC"; then
20716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20717$as_echo "$OBJC" >&6; }
20718else
20719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20720$as_echo "no" >&6; }
20721fi
20722
20723
20724    test -n "$OBJC" && break
20725  done
20726fi
20727if test -z "$OBJC"; then
20728  ac_ct_OBJC=$OBJC
20729  for ac_prog in gcc objcc objc cc CC
20730do
20731  # Extract the first word of "$ac_prog", so it can be a program name with args.
20732set dummy $ac_prog; ac_word=$2
20733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20734$as_echo_n "checking for $ac_word... " >&6; }
20735if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20736  $as_echo_n "(cached) " >&6
20737else
20738  if test -n "$ac_ct_OBJC"; then
20739  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20740else
20741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20742for as_dir in $PATH
20743do
20744  IFS=$as_save_IFS
20745  test -z "$as_dir" && as_dir=.
20746    for ac_exec_ext in '' $ac_executable_extensions; do
20747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20748    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20750    break 2
20751  fi
20752done
20753  done
20754IFS=$as_save_IFS
20755
20756fi
20757fi
20758ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20759if test -n "$ac_ct_OBJC"; then
20760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20761$as_echo "$ac_ct_OBJC" >&6; }
20762else
20763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20764$as_echo "no" >&6; }
20765fi
20766
20767
20768  test -n "$ac_ct_OBJC" && break
20769done
20770
20771  if test "x$ac_ct_OBJC" = x; then
20772    OBJC="gcc"
20773  else
20774    case $cross_compiling:$ac_tool_warned in
20775yes:)
20776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20778ac_tool_warned=yes ;;
20779esac
20780    OBJC=$ac_ct_OBJC
20781  fi
20782fi
20783
20784# Provide some information about the compiler.
20785$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20786set X $ac_compile
20787ac_compiler=$2
20788for ac_option in --version -v -V -qversion; do
20789  { { ac_try="$ac_compiler $ac_option >&5"
20790case "(($ac_try" in
20791  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20792  *) ac_try_echo=$ac_try;;
20793esac
20794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20795$as_echo "$ac_try_echo"; } >&5
20796  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20797  ac_status=$?
20798  if test -s conftest.err; then
20799    sed '10a\
20800... rest of stderr output deleted ...
20801         10q' conftest.err >conftest.er1
20802    cat conftest.er1 >&5
20803  fi
20804  rm -f conftest.er1 conftest.err
20805  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20806  test $ac_status = 0; }
20807done
20808
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20810$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20811if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20812  $as_echo_n "(cached) " >&6
20813else
20814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20815/* end confdefs.h.  */
20816
20817int
20818main ()
20819{
20820#ifndef __GNUC__
20821       choke me
20822#endif
20823
20824  ;
20825  return 0;
20826}
20827_ACEOF
20828if ac_fn_objc_try_compile "$LINENO"; then :
20829  ac_compiler_gnu=yes
20830else
20831  ac_compiler_gnu=no
20832fi
20833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20834ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20835
20836fi
20837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20838$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20839if test $ac_compiler_gnu = yes; then
20840  GOBJC=yes
20841else
20842  GOBJC=
20843fi
20844ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20845ac_save_OBJCFLAGS=$OBJCFLAGS
20846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20847$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20848if test "${ac_cv_prog_objc_g+set}" = set; then :
20849  $as_echo_n "(cached) " >&6
20850else
20851  ac_save_objc_werror_flag=$ac_objc_werror_flag
20852   ac_objc_werror_flag=yes
20853   ac_cv_prog_objc_g=no
20854   OBJCFLAGS="-g"
20855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20856/* end confdefs.h.  */
20857
20858int
20859main ()
20860{
20861
20862  ;
20863  return 0;
20864}
20865_ACEOF
20866if ac_fn_objc_try_compile "$LINENO"; then :
20867  ac_cv_prog_objc_g=yes
20868else
20869  OBJCFLAGS=""
20870      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20871/* end confdefs.h.  */
20872
20873int
20874main ()
20875{
20876
20877  ;
20878  return 0;
20879}
20880_ACEOF
20881if ac_fn_objc_try_compile "$LINENO"; then :
20882
20883else
20884  ac_objc_werror_flag=$ac_save_objc_werror_flag
20885	 OBJCFLAGS="-g"
20886	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20887/* end confdefs.h.  */
20888
20889int
20890main ()
20891{
20892
20893  ;
20894  return 0;
20895}
20896_ACEOF
20897if ac_fn_objc_try_compile "$LINENO"; then :
20898  ac_cv_prog_objc_g=yes
20899fi
20900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20901fi
20902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20903fi
20904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20905   ac_objc_werror_flag=$ac_save_objc_werror_flag
20906fi
20907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20908$as_echo "$ac_cv_prog_objc_g" >&6; }
20909if test "$ac_test_OBJCFLAGS" = set; then
20910  OBJCFLAGS=$ac_save_OBJCFLAGS
20911elif test $ac_cv_prog_objc_g = yes; then
20912  if test "$GOBJC" = yes; then
20913    OBJCFLAGS="-g -O2"
20914  else
20915    OBJCFLAGS="-g"
20916  fi
20917else
20918  if test "$GOBJC" = yes; then
20919    OBJCFLAGS="-O2"
20920  else
20921    OBJCFLAGS=
20922  fi
20923fi
20924ac_ext=cpp
20925ac_cpp='$CXXCPP $CPPFLAGS'
20926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20929
20930
20931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20932
20933  # First separate the path from the arguments. This will split at the first
20934  # space.
20935  complete="$OBJC"
20936  path="${complete%% *}"
20937  tmp="$complete EOL"
20938  arguments="${tmp#* }"
20939
20940  # Input might be given as Windows format, start by converting to
20941  # unix format.
20942  new_path=`$CYGPATH -u "$path"`
20943
20944  # Now try to locate executable using which
20945  new_path=`$WHICH "$new_path" 2> /dev/null`
20946  # bat and cmd files are not always considered executable in cygwin causing which
20947  # to not find them
20948  if test "x$new_path" = x \
20949           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20950           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20951    new_path=`$CYGPATH -u "$path"`
20952  fi
20953  if test "x$new_path" = x; then
20954    # Oops. Which didn't find the executable.
20955    # The splitting of arguments from the executable at a space might have been incorrect,
20956    # since paths with space are more likely in Windows. Give it another try with the whole
20957    # argument.
20958    path="$complete"
20959    arguments="EOL"
20960    new_path=`$CYGPATH -u "$path"`
20961    new_path=`$WHICH "$new_path" 2> /dev/null`
20962    # bat and cmd files are not always considered executable in cygwin causing which
20963    # to not find them
20964    if test "x$new_path" = x \
20965             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20966             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20967      new_path=`$CYGPATH -u "$path"`
20968    fi
20969    if test "x$new_path" = x; then
20970      # It's still not found. Now this is an unrecoverable error.
20971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20972$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20973      has_space=`$ECHO "$complete" | $GREP " "`
20974      if test "x$has_space" != x; then
20975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20977      fi
20978      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20979    fi
20980  fi
20981
20982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20985  # "foo.exe" is OK but "foo" is an error.
20986  #
20987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20988  # It is also a way to make sure we got the proper file name for the real test later on.
20989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20990  if test "x$test_shortpath" = x; then
20991    # Short path failed, file does not exist as specified.
20992    # Try adding .exe or .cmd
20993    if test -f "${new_path}.exe"; then
20994       input_to_shortpath="${new_path}.exe"
20995    elif test -f "${new_path}.cmd"; then
20996       input_to_shortpath="${new_path}.cmd"
20997    else
20998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20999$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21002      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21003    fi
21004  else
21005    input_to_shortpath="$new_path"
21006  fi
21007
21008  # Call helper function which possibly converts this using DOS-style short mode.
21009  # If so, the updated path is stored in $new_path.
21010  new_path="$input_to_shortpath"
21011
21012  input_path="$input_to_shortpath"
21013  # Check if we need to convert this using DOS-style short mode. If the path
21014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21015  # take no chances and rewrite it.
21016  # Note: m4 eats our [], so we need to use [ and ] instead.
21017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21018  if test "x$has_forbidden_chars" != x; then
21019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21023      # Going to short mode and back again did indeed matter. Since short mode is
21024      # case insensitive, let's make it lowercase to improve readability.
21025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21026      # Now convert it back to Unix-stile (cygpath)
21027      input_path=`$CYGPATH -u "$shortmode_path"`
21028      new_path="$input_path"
21029    fi
21030  fi
21031
21032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21033  if test "x$test_cygdrive_prefix" = x; then
21034    # As a simple fix, exclude /usr/bin since it's not a real path.
21035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21037      # a path prefixed by /cygdrive for fixpath to work.
21038      new_path="$CYGWIN_ROOT_PATH$input_path"
21039    fi
21040  fi
21041
21042  # remove trailing .exe if any
21043  new_path="${new_path/%.exe/}"
21044
21045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21046
21047  # First separate the path from the arguments. This will split at the first
21048  # space.
21049  complete="$OBJC"
21050  path="${complete%% *}"
21051  tmp="$complete EOL"
21052  arguments="${tmp#* }"
21053
21054  # Input might be given as Windows format, start by converting to
21055  # unix format.
21056  new_path="$path"
21057
21058  windows_path="$new_path"
21059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21060    unix_path=`$CYGPATH -u "$windows_path"`
21061    new_path="$unix_path"
21062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21064    new_path="$unix_path"
21065  fi
21066
21067
21068  # Now try to locate executable using which
21069  new_path=`$WHICH "$new_path" 2> /dev/null`
21070
21071  if test "x$new_path" = x; then
21072    # Oops. Which didn't find the executable.
21073    # The splitting of arguments from the executable at a space might have been incorrect,
21074    # since paths with space are more likely in Windows. Give it another try with the whole
21075    # argument.
21076    path="$complete"
21077    arguments="EOL"
21078    new_path="$path"
21079
21080  windows_path="$new_path"
21081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21082    unix_path=`$CYGPATH -u "$windows_path"`
21083    new_path="$unix_path"
21084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21086    new_path="$unix_path"
21087  fi
21088
21089
21090    new_path=`$WHICH "$new_path" 2> /dev/null`
21091
21092    if test "x$new_path" = x; then
21093      # It's still not found. Now this is an unrecoverable error.
21094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21095$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21096      has_space=`$ECHO "$complete" | $GREP " "`
21097      if test "x$has_space" != x; then
21098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21100      fi
21101      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21102    fi
21103  fi
21104
21105  # Now new_path has a complete unix path to the binary
21106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21107    # Keep paths in /bin as-is, but remove trailing .exe if any
21108    new_path="${new_path/%.exe/}"
21109    # Do not save /bin paths to all_fixpath_prefixes!
21110  else
21111    # Not in mixed or Windows style, start by that.
21112    new_path=`cmd //c echo $new_path`
21113
21114  input_path="$new_path"
21115  # Check if we need to convert this using DOS-style short mode. If the path
21116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21117  # take no chances and rewrite it.
21118  # Note: m4 eats our [], so we need to use [ and ] instead.
21119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21120  if test "x$has_forbidden_chars" != x; then
21121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21123  fi
21124
21125    # Output is in $new_path
21126
21127  windows_path="$new_path"
21128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21129    unix_path=`$CYGPATH -u "$windows_path"`
21130    new_path="$unix_path"
21131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21133    new_path="$unix_path"
21134  fi
21135
21136    # remove trailing .exe if any
21137    new_path="${new_path/%.exe/}"
21138
21139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21141  fi
21142
21143  else
21144    # We're on a posix platform. Hooray! :)
21145    # First separate the path from the arguments. This will split at the first
21146    # space.
21147    complete="$OBJC"
21148    path="${complete%% *}"
21149    tmp="$complete EOL"
21150    arguments="${tmp#* }"
21151
21152    # Cannot rely on the command "which" here since it doesn't always work.
21153    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21154    if test -z "$is_absolute_path"; then
21155      # Path to executable is not absolute. Find it.
21156      IFS_save="$IFS"
21157      IFS=:
21158      for p in $PATH; do
21159        if test -f "$p/$path" && test -x "$p/$path"; then
21160          new_path="$p/$path"
21161          break
21162        fi
21163      done
21164      IFS="$IFS_save"
21165    else
21166      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21167$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21168      new_path="$path"
21169    fi
21170
21171    if test "x$new_path" = x; then
21172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21173$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21174        has_space=`$ECHO "$complete" | $GREP " "`
21175        if test "x$has_space" != x; then
21176          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21178        fi
21179        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21180      fi
21181  fi
21182
21183      # Now join together the path and the arguments once again
21184      if test "x$arguments" != xEOL; then
21185        new_complete="$new_path ${arguments% *}"
21186      else
21187        new_complete="$new_path"
21188      fi
21189
21190  if test "x$complete" != "x$new_complete"; then
21191      OBJC="$new_complete"
21192      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21193$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21194    fi
21195
21196else
21197    OBJC=
21198fi
21199
21200# Restore the flags to the user specified values.
21201# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21202CFLAGS="$ORG_CFLAGS"
21203CXXFLAGS="$ORG_CXXFLAGS"
21204OBJCFLAGS="$ORG_OBJCFLAGS"
21205
21206LD="$CC"
21207LDEXE="$CC"
21208LDCXX="$CXX"
21209LDEXECXX="$CXX"
21210
21211# LDEXE is the linker to use, when creating executables.
21212
21213# Linking C++ libraries.
21214
21215# Linking C++ executables.
21216
21217
21218if test "x$OPENJDK_TARGET_OS" != xwindows; then
21219    if test -n "$ac_tool_prefix"; then
21220  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21221set dummy ${ac_tool_prefix}ar; ac_word=$2
21222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21223$as_echo_n "checking for $ac_word... " >&6; }
21224if test "${ac_cv_prog_AR+set}" = set; then :
21225  $as_echo_n "(cached) " >&6
21226else
21227  if test -n "$AR"; then
21228  ac_cv_prog_AR="$AR" # Let the user override the test.
21229else
21230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21231for as_dir in $PATH
21232do
21233  IFS=$as_save_IFS
21234  test -z "$as_dir" && as_dir=.
21235    for ac_exec_ext in '' $ac_executable_extensions; do
21236  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21237    ac_cv_prog_AR="${ac_tool_prefix}ar"
21238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21239    break 2
21240  fi
21241done
21242  done
21243IFS=$as_save_IFS
21244
21245fi
21246fi
21247AR=$ac_cv_prog_AR
21248if test -n "$AR"; then
21249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21250$as_echo "$AR" >&6; }
21251else
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21253$as_echo "no" >&6; }
21254fi
21255
21256
21257fi
21258if test -z "$ac_cv_prog_AR"; then
21259  ac_ct_AR=$AR
21260  # Extract the first word of "ar", so it can be a program name with args.
21261set dummy ar; ac_word=$2
21262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21263$as_echo_n "checking for $ac_word... " >&6; }
21264if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21265  $as_echo_n "(cached) " >&6
21266else
21267  if test -n "$ac_ct_AR"; then
21268  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21269else
21270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21271for as_dir in $PATH
21272do
21273  IFS=$as_save_IFS
21274  test -z "$as_dir" && as_dir=.
21275    for ac_exec_ext in '' $ac_executable_extensions; do
21276  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21277    ac_cv_prog_ac_ct_AR="ar"
21278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21279    break 2
21280  fi
21281done
21282  done
21283IFS=$as_save_IFS
21284
21285fi
21286fi
21287ac_ct_AR=$ac_cv_prog_ac_ct_AR
21288if test -n "$ac_ct_AR"; then
21289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21290$as_echo "$ac_ct_AR" >&6; }
21291else
21292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21293$as_echo "no" >&6; }
21294fi
21295
21296  if test "x$ac_ct_AR" = x; then
21297    AR=""
21298  else
21299    case $cross_compiling:$ac_tool_warned in
21300yes:)
21301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21303ac_tool_warned=yes ;;
21304esac
21305    AR=$ac_ct_AR
21306  fi
21307else
21308  AR="$ac_cv_prog_AR"
21309fi
21310
21311
21312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313
21314  # First separate the path from the arguments. This will split at the first
21315  # space.
21316  complete="$AR"
21317  path="${complete%% *}"
21318  tmp="$complete EOL"
21319  arguments="${tmp#* }"
21320
21321  # Input might be given as Windows format, start by converting to
21322  # unix format.
21323  new_path=`$CYGPATH -u "$path"`
21324
21325  # Now try to locate executable using which
21326  new_path=`$WHICH "$new_path" 2> /dev/null`
21327  # bat and cmd files are not always considered executable in cygwin causing which
21328  # to not find them
21329  if test "x$new_path" = x \
21330           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21331           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21332    new_path=`$CYGPATH -u "$path"`
21333  fi
21334  if test "x$new_path" = x; then
21335    # Oops. Which didn't find the executable.
21336    # The splitting of arguments from the executable at a space might have been incorrect,
21337    # since paths with space are more likely in Windows. Give it another try with the whole
21338    # argument.
21339    path="$complete"
21340    arguments="EOL"
21341    new_path=`$CYGPATH -u "$path"`
21342    new_path=`$WHICH "$new_path" 2> /dev/null`
21343    # bat and cmd files are not always considered executable in cygwin causing which
21344    # to not find them
21345    if test "x$new_path" = x \
21346             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21347             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21348      new_path=`$CYGPATH -u "$path"`
21349    fi
21350    if test "x$new_path" = x; then
21351      # It's still not found. Now this is an unrecoverable error.
21352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21353$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21354      has_space=`$ECHO "$complete" | $GREP " "`
21355      if test "x$has_space" != x; then
21356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21358      fi
21359      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21360    fi
21361  fi
21362
21363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21366  # "foo.exe" is OK but "foo" is an error.
21367  #
21368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21369  # It is also a way to make sure we got the proper file name for the real test later on.
21370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21371  if test "x$test_shortpath" = x; then
21372    # Short path failed, file does not exist as specified.
21373    # Try adding .exe or .cmd
21374    if test -f "${new_path}.exe"; then
21375       input_to_shortpath="${new_path}.exe"
21376    elif test -f "${new_path}.cmd"; then
21377       input_to_shortpath="${new_path}.cmd"
21378    else
21379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21380$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21381      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21382$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21383      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21384    fi
21385  else
21386    input_to_shortpath="$new_path"
21387  fi
21388
21389  # Call helper function which possibly converts this using DOS-style short mode.
21390  # If so, the updated path is stored in $new_path.
21391  new_path="$input_to_shortpath"
21392
21393  input_path="$input_to_shortpath"
21394  # Check if we need to convert this using DOS-style short mode. If the path
21395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21396  # take no chances and rewrite it.
21397  # Note: m4 eats our [], so we need to use [ and ] instead.
21398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21399  if test "x$has_forbidden_chars" != x; then
21400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21404      # Going to short mode and back again did indeed matter. Since short mode is
21405      # case insensitive, let's make it lowercase to improve readability.
21406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21407      # Now convert it back to Unix-stile (cygpath)
21408      input_path=`$CYGPATH -u "$shortmode_path"`
21409      new_path="$input_path"
21410    fi
21411  fi
21412
21413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21414  if test "x$test_cygdrive_prefix" = x; then
21415    # As a simple fix, exclude /usr/bin since it's not a real path.
21416    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21418      # a path prefixed by /cygdrive for fixpath to work.
21419      new_path="$CYGWIN_ROOT_PATH$input_path"
21420    fi
21421  fi
21422
21423  # remove trailing .exe if any
21424  new_path="${new_path/%.exe/}"
21425
21426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21427
21428  # First separate the path from the arguments. This will split at the first
21429  # space.
21430  complete="$AR"
21431  path="${complete%% *}"
21432  tmp="$complete EOL"
21433  arguments="${tmp#* }"
21434
21435  # Input might be given as Windows format, start by converting to
21436  # unix format.
21437  new_path="$path"
21438
21439  windows_path="$new_path"
21440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21441    unix_path=`$CYGPATH -u "$windows_path"`
21442    new_path="$unix_path"
21443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21445    new_path="$unix_path"
21446  fi
21447
21448
21449  # Now try to locate executable using which
21450  new_path=`$WHICH "$new_path" 2> /dev/null`
21451
21452  if test "x$new_path" = x; then
21453    # Oops. Which didn't find the executable.
21454    # The splitting of arguments from the executable at a space might have been incorrect,
21455    # since paths with space are more likely in Windows. Give it another try with the whole
21456    # argument.
21457    path="$complete"
21458    arguments="EOL"
21459    new_path="$path"
21460
21461  windows_path="$new_path"
21462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21463    unix_path=`$CYGPATH -u "$windows_path"`
21464    new_path="$unix_path"
21465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21467    new_path="$unix_path"
21468  fi
21469
21470
21471    new_path=`$WHICH "$new_path" 2> /dev/null`
21472
21473    if test "x$new_path" = x; then
21474      # It's still not found. Now this is an unrecoverable error.
21475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21476$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21477      has_space=`$ECHO "$complete" | $GREP " "`
21478      if test "x$has_space" != x; then
21479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21481      fi
21482      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21483    fi
21484  fi
21485
21486  # Now new_path has a complete unix path to the binary
21487  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21488    # Keep paths in /bin as-is, but remove trailing .exe if any
21489    new_path="${new_path/%.exe/}"
21490    # Do not save /bin paths to all_fixpath_prefixes!
21491  else
21492    # Not in mixed or Windows style, start by that.
21493    new_path=`cmd //c echo $new_path`
21494
21495  input_path="$new_path"
21496  # Check if we need to convert this using DOS-style short mode. If the path
21497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21498  # take no chances and rewrite it.
21499  # Note: m4 eats our [], so we need to use [ and ] instead.
21500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21501  if test "x$has_forbidden_chars" != x; then
21502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21504  fi
21505
21506    # Output is in $new_path
21507
21508  windows_path="$new_path"
21509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21510    unix_path=`$CYGPATH -u "$windows_path"`
21511    new_path="$unix_path"
21512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21514    new_path="$unix_path"
21515  fi
21516
21517    # remove trailing .exe if any
21518    new_path="${new_path/%.exe/}"
21519
21520    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21521    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21522  fi
21523
21524  else
21525    # We're on a posix platform. Hooray! :)
21526    # First separate the path from the arguments. This will split at the first
21527    # space.
21528    complete="$AR"
21529    path="${complete%% *}"
21530    tmp="$complete EOL"
21531    arguments="${tmp#* }"
21532
21533    # Cannot rely on the command "which" here since it doesn't always work.
21534    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21535    if test -z "$is_absolute_path"; then
21536      # Path to executable is not absolute. Find it.
21537      IFS_save="$IFS"
21538      IFS=:
21539      for p in $PATH; do
21540        if test -f "$p/$path" && test -x "$p/$path"; then
21541          new_path="$p/$path"
21542          break
21543        fi
21544      done
21545      IFS="$IFS_save"
21546    else
21547      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21548$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21549      new_path="$path"
21550    fi
21551
21552    if test "x$new_path" = x; then
21553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21554$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21555        has_space=`$ECHO "$complete" | $GREP " "`
21556        if test "x$has_space" != x; then
21557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21559        fi
21560        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21561      fi
21562  fi
21563
21564      # Now join together the path and the arguments once again
21565      if test "x$arguments" != xEOL; then
21566        new_complete="$new_path ${arguments% *}"
21567      else
21568        new_complete="$new_path"
21569      fi
21570
21571  if test "x$complete" != "x$new_complete"; then
21572      AR="$new_complete"
21573      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21574$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21575    fi
21576
21577fi
21578if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21579    ARFLAGS="-r"
21580else
21581    ARFLAGS=""
21582fi
21583
21584
21585# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21586HOTSPOT_CXX="$CXX"
21587HOTSPOT_LD="$LD"
21588
21589
21590
21591COMPILER_NAME=gcc
21592COMPILER_TYPE=CC
21593if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21594
21595    # For now, assume that we are always compiling using cl.exe.
21596    CC_OUT_OPTION=-Fo
21597    EXE_OUT_OPTION=-out:
21598    LD_OUT_OPTION=-out:
21599    AR_OUT_OPTION=-out:
21600    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21601    # program for something completely different.
21602    # Extract the first word of "link", so it can be a program name with args.
21603set dummy link; ac_word=$2
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21605$as_echo_n "checking for $ac_word... " >&6; }
21606if test "${ac_cv_prog_WINLD+set}" = set; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  if test -n "$WINLD"; then
21610  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21611else
21612  ac_prog_rejected=no
21613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21614for as_dir in $PATH
21615do
21616  IFS=$as_save_IFS
21617  test -z "$as_dir" && as_dir=.
21618    for ac_exec_ext in '' $ac_executable_extensions; do
21619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21620    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21621       ac_prog_rejected=yes
21622       continue
21623     fi
21624    ac_cv_prog_WINLD="link"
21625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21626    break 2
21627  fi
21628done
21629  done
21630IFS=$as_save_IFS
21631
21632if test $ac_prog_rejected = yes; then
21633  # We found a bogon in the path, so make sure we never use it.
21634  set dummy $ac_cv_prog_WINLD
21635  shift
21636  if test $# != 0; then
21637    # We chose a different compiler from the bogus one.
21638    # However, it has the same basename, so the bogon will be chosen
21639    # first if we set WINLD to just the basename; use the full file name.
21640    shift
21641    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21642  fi
21643fi
21644fi
21645fi
21646WINLD=$ac_cv_prog_WINLD
21647if test -n "$WINLD"; then
21648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21649$as_echo "$WINLD" >&6; }
21650else
21651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21652$as_echo "no" >&6; }
21653fi
21654
21655
21656    # Since we must ignore the first found link, WINLD will contain
21657    # the full path to the link.exe program.
21658
21659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21660
21661  # First separate the path from the arguments. This will split at the first
21662  # space.
21663  complete="$WINLD"
21664  path="${complete%% *}"
21665  tmp="$complete EOL"
21666  arguments="${tmp#* }"
21667
21668  # Input might be given as Windows format, start by converting to
21669  # unix format.
21670  new_path=`$CYGPATH -u "$path"`
21671
21672  # Now try to locate executable using which
21673  new_path=`$WHICH "$new_path" 2> /dev/null`
21674  # bat and cmd files are not always considered executable in cygwin causing which
21675  # to not find them
21676  if test "x$new_path" = x \
21677           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21678           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21679    new_path=`$CYGPATH -u "$path"`
21680  fi
21681  if test "x$new_path" = x; then
21682    # Oops. Which didn't find the executable.
21683    # The splitting of arguments from the executable at a space might have been incorrect,
21684    # since paths with space are more likely in Windows. Give it another try with the whole
21685    # argument.
21686    path="$complete"
21687    arguments="EOL"
21688    new_path=`$CYGPATH -u "$path"`
21689    new_path=`$WHICH "$new_path" 2> /dev/null`
21690    # bat and cmd files are not always considered executable in cygwin causing which
21691    # to not find them
21692    if test "x$new_path" = x \
21693             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21694             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21695      new_path=`$CYGPATH -u "$path"`
21696    fi
21697    if test "x$new_path" = x; then
21698      # It's still not found. Now this is an unrecoverable error.
21699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21700$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21701      has_space=`$ECHO "$complete" | $GREP " "`
21702      if test "x$has_space" != x; then
21703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21705      fi
21706      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21707    fi
21708  fi
21709
21710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21713  # "foo.exe" is OK but "foo" is an error.
21714  #
21715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21716  # It is also a way to make sure we got the proper file name for the real test later on.
21717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21718  if test "x$test_shortpath" = x; then
21719    # Short path failed, file does not exist as specified.
21720    # Try adding .exe or .cmd
21721    if test -f "${new_path}.exe"; then
21722       input_to_shortpath="${new_path}.exe"
21723    elif test -f "${new_path}.cmd"; then
21724       input_to_shortpath="${new_path}.cmd"
21725    else
21726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21727$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21730      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21731    fi
21732  else
21733    input_to_shortpath="$new_path"
21734  fi
21735
21736  # Call helper function which possibly converts this using DOS-style short mode.
21737  # If so, the updated path is stored in $new_path.
21738  new_path="$input_to_shortpath"
21739
21740  input_path="$input_to_shortpath"
21741  # Check if we need to convert this using DOS-style short mode. If the path
21742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21743  # take no chances and rewrite it.
21744  # Note: m4 eats our [], so we need to use [ and ] instead.
21745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21746  if test "x$has_forbidden_chars" != x; then
21747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21751      # Going to short mode and back again did indeed matter. Since short mode is
21752      # case insensitive, let's make it lowercase to improve readability.
21753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21754      # Now convert it back to Unix-stile (cygpath)
21755      input_path=`$CYGPATH -u "$shortmode_path"`
21756      new_path="$input_path"
21757    fi
21758  fi
21759
21760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21761  if test "x$test_cygdrive_prefix" = x; then
21762    # As a simple fix, exclude /usr/bin since it's not a real path.
21763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21765      # a path prefixed by /cygdrive for fixpath to work.
21766      new_path="$CYGWIN_ROOT_PATH$input_path"
21767    fi
21768  fi
21769
21770  # remove trailing .exe if any
21771  new_path="${new_path/%.exe/}"
21772
21773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21774
21775  # First separate the path from the arguments. This will split at the first
21776  # space.
21777  complete="$WINLD"
21778  path="${complete%% *}"
21779  tmp="$complete EOL"
21780  arguments="${tmp#* }"
21781
21782  # Input might be given as Windows format, start by converting to
21783  # unix format.
21784  new_path="$path"
21785
21786  windows_path="$new_path"
21787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21788    unix_path=`$CYGPATH -u "$windows_path"`
21789    new_path="$unix_path"
21790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21792    new_path="$unix_path"
21793  fi
21794
21795
21796  # Now try to locate executable using which
21797  new_path=`$WHICH "$new_path" 2> /dev/null`
21798
21799  if test "x$new_path" = x; then
21800    # Oops. Which didn't find the executable.
21801    # The splitting of arguments from the executable at a space might have been incorrect,
21802    # since paths with space are more likely in Windows. Give it another try with the whole
21803    # argument.
21804    path="$complete"
21805    arguments="EOL"
21806    new_path="$path"
21807
21808  windows_path="$new_path"
21809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21810    unix_path=`$CYGPATH -u "$windows_path"`
21811    new_path="$unix_path"
21812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21814    new_path="$unix_path"
21815  fi
21816
21817
21818    new_path=`$WHICH "$new_path" 2> /dev/null`
21819
21820    if test "x$new_path" = x; then
21821      # It's still not found. Now this is an unrecoverable error.
21822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21823$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21824      has_space=`$ECHO "$complete" | $GREP " "`
21825      if test "x$has_space" != x; then
21826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21828      fi
21829      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21830    fi
21831  fi
21832
21833  # Now new_path has a complete unix path to the binary
21834  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21835    # Keep paths in /bin as-is, but remove trailing .exe if any
21836    new_path="${new_path/%.exe/}"
21837    # Do not save /bin paths to all_fixpath_prefixes!
21838  else
21839    # Not in mixed or Windows style, start by that.
21840    new_path=`cmd //c echo $new_path`
21841
21842  input_path="$new_path"
21843  # Check if we need to convert this using DOS-style short mode. If the path
21844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21845  # take no chances and rewrite it.
21846  # Note: m4 eats our [], so we need to use [ and ] instead.
21847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21848  if test "x$has_forbidden_chars" != x; then
21849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21851  fi
21852
21853    # Output is in $new_path
21854
21855  windows_path="$new_path"
21856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21857    unix_path=`$CYGPATH -u "$windows_path"`
21858    new_path="$unix_path"
21859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21861    new_path="$unix_path"
21862  fi
21863
21864    # remove trailing .exe if any
21865    new_path="${new_path/%.exe/}"
21866
21867    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21868    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21869  fi
21870
21871  else
21872    # We're on a posix platform. Hooray! :)
21873    # First separate the path from the arguments. This will split at the first
21874    # space.
21875    complete="$WINLD"
21876    path="${complete%% *}"
21877    tmp="$complete EOL"
21878    arguments="${tmp#* }"
21879
21880    # Cannot rely on the command "which" here since it doesn't always work.
21881    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21882    if test -z "$is_absolute_path"; then
21883      # Path to executable is not absolute. Find it.
21884      IFS_save="$IFS"
21885      IFS=:
21886      for p in $PATH; do
21887        if test -f "$p/$path" && test -x "$p/$path"; then
21888          new_path="$p/$path"
21889          break
21890        fi
21891      done
21892      IFS="$IFS_save"
21893    else
21894      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
21895$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
21896      new_path="$path"
21897    fi
21898
21899    if test "x$new_path" = x; then
21900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21901$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21902        has_space=`$ECHO "$complete" | $GREP " "`
21903        if test "x$has_space" != x; then
21904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21906        fi
21907        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21908      fi
21909  fi
21910
21911      # Now join together the path and the arguments once again
21912      if test "x$arguments" != xEOL; then
21913        new_complete="$new_path ${arguments% *}"
21914      else
21915        new_complete="$new_path"
21916      fi
21917
21918  if test "x$complete" != "x$new_complete"; then
21919      WINLD="$new_complete"
21920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21921$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21922    fi
21923
21924    printf "Windows linker was found at $WINLD\n"
21925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21926$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21927    "$WINLD" --version > /dev/null
21928    if test $? -eq 0 ; then
21929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21930$as_echo "no" >&6; }
21931      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21932    else
21933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21934$as_echo "yes" >&6; }
21935    fi
21936    LD="$WINLD"
21937    LDEXE="$WINLD"
21938    LDCXX="$WINLD"
21939    LDEXECXX="$WINLD"
21940
21941    # Extract the first word of "mt", so it can be a program name with args.
21942set dummy mt; ac_word=$2
21943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21944$as_echo_n "checking for $ac_word... " >&6; }
21945if test "${ac_cv_prog_MT+set}" = set; then :
21946  $as_echo_n "(cached) " >&6
21947else
21948  if test -n "$MT"; then
21949  ac_cv_prog_MT="$MT" # Let the user override the test.
21950else
21951  ac_prog_rejected=no
21952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21953for as_dir in $PATH
21954do
21955  IFS=$as_save_IFS
21956  test -z "$as_dir" && as_dir=.
21957    for ac_exec_ext in '' $ac_executable_extensions; do
21958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21959    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21960       ac_prog_rejected=yes
21961       continue
21962     fi
21963    ac_cv_prog_MT="mt"
21964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21965    break 2
21966  fi
21967done
21968  done
21969IFS=$as_save_IFS
21970
21971if test $ac_prog_rejected = yes; then
21972  # We found a bogon in the path, so make sure we never use it.
21973  set dummy $ac_cv_prog_MT
21974  shift
21975  if test $# != 0; then
21976    # We chose a different compiler from the bogus one.
21977    # However, it has the same basename, so the bogon will be chosen
21978    # first if we set MT to just the basename; use the full file name.
21979    shift
21980    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21981  fi
21982fi
21983fi
21984fi
21985MT=$ac_cv_prog_MT
21986if test -n "$MT"; then
21987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21988$as_echo "$MT" >&6; }
21989else
21990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21991$as_echo "no" >&6; }
21992fi
21993
21994
21995
21996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21997
21998  # First separate the path from the arguments. This will split at the first
21999  # space.
22000  complete="$MT"
22001  path="${complete%% *}"
22002  tmp="$complete EOL"
22003  arguments="${tmp#* }"
22004
22005  # Input might be given as Windows format, start by converting to
22006  # unix format.
22007  new_path=`$CYGPATH -u "$path"`
22008
22009  # Now try to locate executable using which
22010  new_path=`$WHICH "$new_path" 2> /dev/null`
22011  # bat and cmd files are not always considered executable in cygwin causing which
22012  # to not find them
22013  if test "x$new_path" = x \
22014           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22015           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22016    new_path=`$CYGPATH -u "$path"`
22017  fi
22018  if test "x$new_path" = x; then
22019    # Oops. Which didn't find the executable.
22020    # The splitting of arguments from the executable at a space might have been incorrect,
22021    # since paths with space are more likely in Windows. Give it another try with the whole
22022    # argument.
22023    path="$complete"
22024    arguments="EOL"
22025    new_path=`$CYGPATH -u "$path"`
22026    new_path=`$WHICH "$new_path" 2> /dev/null`
22027    # bat and cmd files are not always considered executable in cygwin causing which
22028    # to not find them
22029    if test "x$new_path" = x \
22030             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22031             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22032      new_path=`$CYGPATH -u "$path"`
22033    fi
22034    if test "x$new_path" = x; then
22035      # It's still not found. Now this is an unrecoverable error.
22036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22037$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22038      has_space=`$ECHO "$complete" | $GREP " "`
22039      if test "x$has_space" != x; then
22040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22042      fi
22043      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22044    fi
22045  fi
22046
22047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22050  # "foo.exe" is OK but "foo" is an error.
22051  #
22052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22053  # It is also a way to make sure we got the proper file name for the real test later on.
22054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22055  if test "x$test_shortpath" = x; then
22056    # Short path failed, file does not exist as specified.
22057    # Try adding .exe or .cmd
22058    if test -f "${new_path}.exe"; then
22059       input_to_shortpath="${new_path}.exe"
22060    elif test -f "${new_path}.cmd"; then
22061       input_to_shortpath="${new_path}.cmd"
22062    else
22063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22064$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22067      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22068    fi
22069  else
22070    input_to_shortpath="$new_path"
22071  fi
22072
22073  # Call helper function which possibly converts this using DOS-style short mode.
22074  # If so, the updated path is stored in $new_path.
22075  new_path="$input_to_shortpath"
22076
22077  input_path="$input_to_shortpath"
22078  # Check if we need to convert this using DOS-style short mode. If the path
22079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22080  # take no chances and rewrite it.
22081  # Note: m4 eats our [], so we need to use [ and ] instead.
22082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22083  if test "x$has_forbidden_chars" != x; then
22084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22088      # Going to short mode and back again did indeed matter. Since short mode is
22089      # case insensitive, let's make it lowercase to improve readability.
22090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22091      # Now convert it back to Unix-stile (cygpath)
22092      input_path=`$CYGPATH -u "$shortmode_path"`
22093      new_path="$input_path"
22094    fi
22095  fi
22096
22097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22098  if test "x$test_cygdrive_prefix" = x; then
22099    # As a simple fix, exclude /usr/bin since it's not a real path.
22100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22102      # a path prefixed by /cygdrive for fixpath to work.
22103      new_path="$CYGWIN_ROOT_PATH$input_path"
22104    fi
22105  fi
22106
22107  # remove trailing .exe if any
22108  new_path="${new_path/%.exe/}"
22109
22110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22111
22112  # First separate the path from the arguments. This will split at the first
22113  # space.
22114  complete="$MT"
22115  path="${complete%% *}"
22116  tmp="$complete EOL"
22117  arguments="${tmp#* }"
22118
22119  # Input might be given as Windows format, start by converting to
22120  # unix format.
22121  new_path="$path"
22122
22123  windows_path="$new_path"
22124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22125    unix_path=`$CYGPATH -u "$windows_path"`
22126    new_path="$unix_path"
22127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22129    new_path="$unix_path"
22130  fi
22131
22132
22133  # Now try to locate executable using which
22134  new_path=`$WHICH "$new_path" 2> /dev/null`
22135
22136  if test "x$new_path" = x; then
22137    # Oops. Which didn't find the executable.
22138    # The splitting of arguments from the executable at a space might have been incorrect,
22139    # since paths with space are more likely in Windows. Give it another try with the whole
22140    # argument.
22141    path="$complete"
22142    arguments="EOL"
22143    new_path="$path"
22144
22145  windows_path="$new_path"
22146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22147    unix_path=`$CYGPATH -u "$windows_path"`
22148    new_path="$unix_path"
22149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22151    new_path="$unix_path"
22152  fi
22153
22154
22155    new_path=`$WHICH "$new_path" 2> /dev/null`
22156
22157    if test "x$new_path" = x; then
22158      # It's still not found. Now this is an unrecoverable error.
22159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22160$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22161      has_space=`$ECHO "$complete" | $GREP " "`
22162      if test "x$has_space" != x; then
22163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22165      fi
22166      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22167    fi
22168  fi
22169
22170  # Now new_path has a complete unix path to the binary
22171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22172    # Keep paths in /bin as-is, but remove trailing .exe if any
22173    new_path="${new_path/%.exe/}"
22174    # Do not save /bin paths to all_fixpath_prefixes!
22175  else
22176    # Not in mixed or Windows style, start by that.
22177    new_path=`cmd //c echo $new_path`
22178
22179  input_path="$new_path"
22180  # Check if we need to convert this using DOS-style short mode. If the path
22181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22182  # take no chances and rewrite it.
22183  # Note: m4 eats our [], so we need to use [ and ] instead.
22184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22185  if test "x$has_forbidden_chars" != x; then
22186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22188  fi
22189
22190    # Output is in $new_path
22191
22192  windows_path="$new_path"
22193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22194    unix_path=`$CYGPATH -u "$windows_path"`
22195    new_path="$unix_path"
22196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22198    new_path="$unix_path"
22199  fi
22200
22201    # remove trailing .exe if any
22202    new_path="${new_path/%.exe/}"
22203
22204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22206  fi
22207
22208  else
22209    # We're on a posix platform. Hooray! :)
22210    # First separate the path from the arguments. This will split at the first
22211    # space.
22212    complete="$MT"
22213    path="${complete%% *}"
22214    tmp="$complete EOL"
22215    arguments="${tmp#* }"
22216
22217    # Cannot rely on the command "which" here since it doesn't always work.
22218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22219    if test -z "$is_absolute_path"; then
22220      # Path to executable is not absolute. Find it.
22221      IFS_save="$IFS"
22222      IFS=:
22223      for p in $PATH; do
22224        if test -f "$p/$path" && test -x "$p/$path"; then
22225          new_path="$p/$path"
22226          break
22227        fi
22228      done
22229      IFS="$IFS_save"
22230    else
22231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22232$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22233      new_path="$path"
22234    fi
22235
22236    if test "x$new_path" = x; then
22237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22238$as_echo "$as_me: The path of MT, 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}: This might be caused by spaces in the path, which is not allowed." >&5
22242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22243        fi
22244        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22245      fi
22246  fi
22247
22248      # Now join together the path and the arguments once again
22249      if test "x$arguments" != xEOL; then
22250        new_complete="$new_path ${arguments% *}"
22251      else
22252        new_complete="$new_path"
22253      fi
22254
22255  if test "x$complete" != "x$new_complete"; then
22256      MT="$new_complete"
22257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22258$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22259    fi
22260
22261    # The resource compiler
22262    # Extract the first word of "rc", so it can be a program name with args.
22263set dummy rc; ac_word=$2
22264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22265$as_echo_n "checking for $ac_word... " >&6; }
22266if test "${ac_cv_prog_RC+set}" = set; then :
22267  $as_echo_n "(cached) " >&6
22268else
22269  if test -n "$RC"; then
22270  ac_cv_prog_RC="$RC" # Let the user override the test.
22271else
22272  ac_prog_rejected=no
22273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22274for as_dir in $PATH
22275do
22276  IFS=$as_save_IFS
22277  test -z "$as_dir" && as_dir=.
22278    for ac_exec_ext in '' $ac_executable_extensions; do
22279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22280    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22281       ac_prog_rejected=yes
22282       continue
22283     fi
22284    ac_cv_prog_RC="rc"
22285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22286    break 2
22287  fi
22288done
22289  done
22290IFS=$as_save_IFS
22291
22292if test $ac_prog_rejected = yes; then
22293  # We found a bogon in the path, so make sure we never use it.
22294  set dummy $ac_cv_prog_RC
22295  shift
22296  if test $# != 0; then
22297    # We chose a different compiler from the bogus one.
22298    # However, it has the same basename, so the bogon will be chosen
22299    # first if we set RC to just the basename; use the full file name.
22300    shift
22301    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22302  fi
22303fi
22304fi
22305fi
22306RC=$ac_cv_prog_RC
22307if test -n "$RC"; then
22308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22309$as_echo "$RC" >&6; }
22310else
22311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22312$as_echo "no" >&6; }
22313fi
22314
22315
22316
22317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22318
22319  # First separate the path from the arguments. This will split at the first
22320  # space.
22321  complete="$RC"
22322  path="${complete%% *}"
22323  tmp="$complete EOL"
22324  arguments="${tmp#* }"
22325
22326  # Input might be given as Windows format, start by converting to
22327  # unix format.
22328  new_path=`$CYGPATH -u "$path"`
22329
22330  # Now try to locate executable using which
22331  new_path=`$WHICH "$new_path" 2> /dev/null`
22332  # bat and cmd files are not always considered executable in cygwin causing which
22333  # to not find them
22334  if test "x$new_path" = x \
22335           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22336           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22337    new_path=`$CYGPATH -u "$path"`
22338  fi
22339  if test "x$new_path" = x; then
22340    # Oops. Which didn't find the executable.
22341    # The splitting of arguments from the executable at a space might have been incorrect,
22342    # since paths with space are more likely in Windows. Give it another try with the whole
22343    # argument.
22344    path="$complete"
22345    arguments="EOL"
22346    new_path=`$CYGPATH -u "$path"`
22347    new_path=`$WHICH "$new_path" 2> /dev/null`
22348    # bat and cmd files are not always considered executable in cygwin causing which
22349    # to not find them
22350    if test "x$new_path" = x \
22351             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22352             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22353      new_path=`$CYGPATH -u "$path"`
22354    fi
22355    if test "x$new_path" = x; then
22356      # It's still not found. Now this is an unrecoverable error.
22357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22358$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22359      has_space=`$ECHO "$complete" | $GREP " "`
22360      if test "x$has_space" != x; then
22361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22363      fi
22364      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22365    fi
22366  fi
22367
22368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22371  # "foo.exe" is OK but "foo" is an error.
22372  #
22373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22374  # It is also a way to make sure we got the proper file name for the real test later on.
22375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22376  if test "x$test_shortpath" = x; then
22377    # Short path failed, file does not exist as specified.
22378    # Try adding .exe or .cmd
22379    if test -f "${new_path}.exe"; then
22380       input_to_shortpath="${new_path}.exe"
22381    elif test -f "${new_path}.cmd"; then
22382       input_to_shortpath="${new_path}.cmd"
22383    else
22384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22385$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22388      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22389    fi
22390  else
22391    input_to_shortpath="$new_path"
22392  fi
22393
22394  # Call helper function which possibly converts this using DOS-style short mode.
22395  # If so, the updated path is stored in $new_path.
22396  new_path="$input_to_shortpath"
22397
22398  input_path="$input_to_shortpath"
22399  # Check if we need to convert this using DOS-style short mode. If the path
22400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22401  # take no chances and rewrite it.
22402  # Note: m4 eats our [], so we need to use [ and ] instead.
22403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22404  if test "x$has_forbidden_chars" != x; then
22405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22409      # Going to short mode and back again did indeed matter. Since short mode is
22410      # case insensitive, let's make it lowercase to improve readability.
22411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22412      # Now convert it back to Unix-stile (cygpath)
22413      input_path=`$CYGPATH -u "$shortmode_path"`
22414      new_path="$input_path"
22415    fi
22416  fi
22417
22418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22419  if test "x$test_cygdrive_prefix" = x; then
22420    # As a simple fix, exclude /usr/bin since it's not a real path.
22421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22423      # a path prefixed by /cygdrive for fixpath to work.
22424      new_path="$CYGWIN_ROOT_PATH$input_path"
22425    fi
22426  fi
22427
22428  # remove trailing .exe if any
22429  new_path="${new_path/%.exe/}"
22430
22431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22432
22433  # First separate the path from the arguments. This will split at the first
22434  # space.
22435  complete="$RC"
22436  path="${complete%% *}"
22437  tmp="$complete EOL"
22438  arguments="${tmp#* }"
22439
22440  # Input might be given as Windows format, start by converting to
22441  # unix format.
22442  new_path="$path"
22443
22444  windows_path="$new_path"
22445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22446    unix_path=`$CYGPATH -u "$windows_path"`
22447    new_path="$unix_path"
22448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22450    new_path="$unix_path"
22451  fi
22452
22453
22454  # Now try to locate executable using which
22455  new_path=`$WHICH "$new_path" 2> /dev/null`
22456
22457  if test "x$new_path" = x; then
22458    # Oops. Which didn't find the executable.
22459    # The splitting of arguments from the executable at a space might have been incorrect,
22460    # since paths with space are more likely in Windows. Give it another try with the whole
22461    # argument.
22462    path="$complete"
22463    arguments="EOL"
22464    new_path="$path"
22465
22466  windows_path="$new_path"
22467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22468    unix_path=`$CYGPATH -u "$windows_path"`
22469    new_path="$unix_path"
22470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22472    new_path="$unix_path"
22473  fi
22474
22475
22476    new_path=`$WHICH "$new_path" 2> /dev/null`
22477
22478    if test "x$new_path" = x; then
22479      # It's still not found. Now this is an unrecoverable error.
22480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22481$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22482      has_space=`$ECHO "$complete" | $GREP " "`
22483      if test "x$has_space" != x; then
22484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22486      fi
22487      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22488    fi
22489  fi
22490
22491  # Now new_path has a complete unix path to the binary
22492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22493    # Keep paths in /bin as-is, but remove trailing .exe if any
22494    new_path="${new_path/%.exe/}"
22495    # Do not save /bin paths to all_fixpath_prefixes!
22496  else
22497    # Not in mixed or Windows style, start by that.
22498    new_path=`cmd //c echo $new_path`
22499
22500  input_path="$new_path"
22501  # Check if we need to convert this using DOS-style short mode. If the path
22502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22503  # take no chances and rewrite it.
22504  # Note: m4 eats our [], so we need to use [ and ] instead.
22505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22506  if test "x$has_forbidden_chars" != x; then
22507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22509  fi
22510
22511    # Output is in $new_path
22512
22513  windows_path="$new_path"
22514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22515    unix_path=`$CYGPATH -u "$windows_path"`
22516    new_path="$unix_path"
22517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22519    new_path="$unix_path"
22520  fi
22521
22522    # remove trailing .exe if any
22523    new_path="${new_path/%.exe/}"
22524
22525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22527  fi
22528
22529  else
22530    # We're on a posix platform. Hooray! :)
22531    # First separate the path from the arguments. This will split at the first
22532    # space.
22533    complete="$RC"
22534    path="${complete%% *}"
22535    tmp="$complete EOL"
22536    arguments="${tmp#* }"
22537
22538    # Cannot rely on the command "which" here since it doesn't always work.
22539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22540    if test -z "$is_absolute_path"; then
22541      # Path to executable is not absolute. Find it.
22542      IFS_save="$IFS"
22543      IFS=:
22544      for p in $PATH; do
22545        if test -f "$p/$path" && test -x "$p/$path"; then
22546          new_path="$p/$path"
22547          break
22548        fi
22549      done
22550      IFS="$IFS_save"
22551    else
22552      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22553$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22554      new_path="$path"
22555    fi
22556
22557    if test "x$new_path" = x; then
22558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22559$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22560        has_space=`$ECHO "$complete" | $GREP " "`
22561        if test "x$has_space" != x; then
22562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22564        fi
22565        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22566      fi
22567  fi
22568
22569      # Now join together the path and the arguments once again
22570      if test "x$arguments" != xEOL; then
22571        new_complete="$new_path ${arguments% *}"
22572      else
22573        new_complete="$new_path"
22574      fi
22575
22576  if test "x$complete" != "x$new_complete"; then
22577      RC="$new_complete"
22578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22579$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22580    fi
22581
22582
22583    # For hotspot, we need these in Windows mixed path,
22584    # so rewrite them all. Need added .exe suffix.
22585    HOTSPOT_CXX="$CXX.exe"
22586    HOTSPOT_LD="$LD.exe"
22587    HOTSPOT_MT="$MT.exe"
22588    HOTSPOT_RC="$RC.exe"
22589
22590  unix_path="$HOTSPOT_CXX"
22591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22592    windows_path=`$CYGPATH -m "$unix_path"`
22593    HOTSPOT_CXX="$windows_path"
22594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22595    windows_path=`cmd //c echo $unix_path`
22596    HOTSPOT_CXX="$windows_path"
22597  fi
22598
22599
22600  unix_path="$HOTSPOT_LD"
22601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22602    windows_path=`$CYGPATH -m "$unix_path"`
22603    HOTSPOT_LD="$windows_path"
22604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22605    windows_path=`cmd //c echo $unix_path`
22606    HOTSPOT_LD="$windows_path"
22607  fi
22608
22609
22610  unix_path="$HOTSPOT_MT"
22611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22612    windows_path=`$CYGPATH -m "$unix_path"`
22613    HOTSPOT_MT="$windows_path"
22614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22615    windows_path=`cmd //c echo $unix_path`
22616    HOTSPOT_MT="$windows_path"
22617  fi
22618
22619
22620  unix_path="$HOTSPOT_RC"
22621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22622    windows_path=`$CYGPATH -m "$unix_path"`
22623    HOTSPOT_RC="$windows_path"
22624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22625    windows_path=`cmd //c echo $unix_path`
22626    HOTSPOT_RC="$windows_path"
22627  fi
22628
22629
22630
22631
22632    RC_FLAGS="-nologo -l 0x409 -r"
22633    if test "x$VARIANT" = xOPT; then :
22634
22635        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22636
22637fi
22638    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22639    if test "x$JDK_UPDATE_VERSION" = x; then :
22640
22641        JDK_UPDATE_VERSION_NOTNULL=0
22642
22643fi
22644    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22645    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22646    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22647    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22648    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22649    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22650    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22651
22652    # lib.exe is used to create static libraries.
22653    # Extract the first word of "lib", so it can be a program name with args.
22654set dummy lib; ac_word=$2
22655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22656$as_echo_n "checking for $ac_word... " >&6; }
22657if test "${ac_cv_prog_WINAR+set}" = set; then :
22658  $as_echo_n "(cached) " >&6
22659else
22660  if test -n "$WINAR"; then
22661  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22662else
22663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22664for as_dir in $PATH
22665do
22666  IFS=$as_save_IFS
22667  test -z "$as_dir" && as_dir=.
22668    for ac_exec_ext in '' $ac_executable_extensions; do
22669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22670    ac_cv_prog_WINAR="lib"
22671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22672    break 2
22673  fi
22674done
22675  done
22676IFS=$as_save_IFS
22677
22678fi
22679fi
22680WINAR=$ac_cv_prog_WINAR
22681if test -n "$WINAR"; then
22682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22683$as_echo "$WINAR" >&6; }
22684else
22685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22686$as_echo "no" >&6; }
22687fi
22688
22689
22690
22691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22692
22693  # First separate the path from the arguments. This will split at the first
22694  # space.
22695  complete="$WINAR"
22696  path="${complete%% *}"
22697  tmp="$complete EOL"
22698  arguments="${tmp#* }"
22699
22700  # Input might be given as Windows format, start by converting to
22701  # unix format.
22702  new_path=`$CYGPATH -u "$path"`
22703
22704  # Now try to locate executable using which
22705  new_path=`$WHICH "$new_path" 2> /dev/null`
22706  # bat and cmd files are not always considered executable in cygwin causing which
22707  # to not find them
22708  if test "x$new_path" = x \
22709           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22710           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22711    new_path=`$CYGPATH -u "$path"`
22712  fi
22713  if test "x$new_path" = x; then
22714    # Oops. Which didn't find the executable.
22715    # The splitting of arguments from the executable at a space might have been incorrect,
22716    # since paths with space are more likely in Windows. Give it another try with the whole
22717    # argument.
22718    path="$complete"
22719    arguments="EOL"
22720    new_path=`$CYGPATH -u "$path"`
22721    new_path=`$WHICH "$new_path" 2> /dev/null`
22722    # bat and cmd files are not always considered executable in cygwin causing which
22723    # to not find them
22724    if test "x$new_path" = x \
22725             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22726             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22727      new_path=`$CYGPATH -u "$path"`
22728    fi
22729    if test "x$new_path" = x; then
22730      # It's still not found. Now this is an unrecoverable error.
22731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22732$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22733      has_space=`$ECHO "$complete" | $GREP " "`
22734      if test "x$has_space" != x; then
22735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22737      fi
22738      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22739    fi
22740  fi
22741
22742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22745  # "foo.exe" is OK but "foo" is an error.
22746  #
22747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22748  # It is also a way to make sure we got the proper file name for the real test later on.
22749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22750  if test "x$test_shortpath" = x; then
22751    # Short path failed, file does not exist as specified.
22752    # Try adding .exe or .cmd
22753    if test -f "${new_path}.exe"; then
22754       input_to_shortpath="${new_path}.exe"
22755    elif test -f "${new_path}.cmd"; then
22756       input_to_shortpath="${new_path}.cmd"
22757    else
22758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22759$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22762      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22763    fi
22764  else
22765    input_to_shortpath="$new_path"
22766  fi
22767
22768  # Call helper function which possibly converts this using DOS-style short mode.
22769  # If so, the updated path is stored in $new_path.
22770  new_path="$input_to_shortpath"
22771
22772  input_path="$input_to_shortpath"
22773  # Check if we need to convert this using DOS-style short mode. If the path
22774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22775  # take no chances and rewrite it.
22776  # Note: m4 eats our [], so we need to use [ and ] instead.
22777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22778  if test "x$has_forbidden_chars" != x; then
22779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22783      # Going to short mode and back again did indeed matter. Since short mode is
22784      # case insensitive, let's make it lowercase to improve readability.
22785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22786      # Now convert it back to Unix-stile (cygpath)
22787      input_path=`$CYGPATH -u "$shortmode_path"`
22788      new_path="$input_path"
22789    fi
22790  fi
22791
22792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22793  if test "x$test_cygdrive_prefix" = x; then
22794    # As a simple fix, exclude /usr/bin since it's not a real path.
22795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22797      # a path prefixed by /cygdrive for fixpath to work.
22798      new_path="$CYGWIN_ROOT_PATH$input_path"
22799    fi
22800  fi
22801
22802  # remove trailing .exe if any
22803  new_path="${new_path/%.exe/}"
22804
22805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22806
22807  # First separate the path from the arguments. This will split at the first
22808  # space.
22809  complete="$WINAR"
22810  path="${complete%% *}"
22811  tmp="$complete EOL"
22812  arguments="${tmp#* }"
22813
22814  # Input might be given as Windows format, start by converting to
22815  # unix format.
22816  new_path="$path"
22817
22818  windows_path="$new_path"
22819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22820    unix_path=`$CYGPATH -u "$windows_path"`
22821    new_path="$unix_path"
22822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22824    new_path="$unix_path"
22825  fi
22826
22827
22828  # Now try to locate executable using which
22829  new_path=`$WHICH "$new_path" 2> /dev/null`
22830
22831  if test "x$new_path" = x; then
22832    # Oops. Which didn't find the executable.
22833    # The splitting of arguments from the executable at a space might have been incorrect,
22834    # since paths with space are more likely in Windows. Give it another try with the whole
22835    # argument.
22836    path="$complete"
22837    arguments="EOL"
22838    new_path="$path"
22839
22840  windows_path="$new_path"
22841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22842    unix_path=`$CYGPATH -u "$windows_path"`
22843    new_path="$unix_path"
22844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22846    new_path="$unix_path"
22847  fi
22848
22849
22850    new_path=`$WHICH "$new_path" 2> /dev/null`
22851
22852    if test "x$new_path" = x; then
22853      # It's still not found. Now this is an unrecoverable error.
22854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22855$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22856      has_space=`$ECHO "$complete" | $GREP " "`
22857      if test "x$has_space" != x; then
22858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22860      fi
22861      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22862    fi
22863  fi
22864
22865  # Now new_path has a complete unix path to the binary
22866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22867    # Keep paths in /bin as-is, but remove trailing .exe if any
22868    new_path="${new_path/%.exe/}"
22869    # Do not save /bin paths to all_fixpath_prefixes!
22870  else
22871    # Not in mixed or Windows style, start by that.
22872    new_path=`cmd //c echo $new_path`
22873
22874  input_path="$new_path"
22875  # Check if we need to convert this using DOS-style short mode. If the path
22876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22877  # take no chances and rewrite it.
22878  # Note: m4 eats our [], so we need to use [ and ] instead.
22879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22880  if test "x$has_forbidden_chars" != x; then
22881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22883  fi
22884
22885    # Output is in $new_path
22886
22887  windows_path="$new_path"
22888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22889    unix_path=`$CYGPATH -u "$windows_path"`
22890    new_path="$unix_path"
22891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22893    new_path="$unix_path"
22894  fi
22895
22896    # remove trailing .exe if any
22897    new_path="${new_path/%.exe/}"
22898
22899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22901  fi
22902
22903  else
22904    # We're on a posix platform. Hooray! :)
22905    # First separate the path from the arguments. This will split at the first
22906    # space.
22907    complete="$WINAR"
22908    path="${complete%% *}"
22909    tmp="$complete EOL"
22910    arguments="${tmp#* }"
22911
22912    # Cannot rely on the command "which" here since it doesn't always work.
22913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22914    if test -z "$is_absolute_path"; then
22915      # Path to executable is not absolute. Find it.
22916      IFS_save="$IFS"
22917      IFS=:
22918      for p in $PATH; do
22919        if test -f "$p/$path" && test -x "$p/$path"; then
22920          new_path="$p/$path"
22921          break
22922        fi
22923      done
22924      IFS="$IFS_save"
22925    else
22926      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
22927$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
22928      new_path="$path"
22929    fi
22930
22931    if test "x$new_path" = x; then
22932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22933$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22934        has_space=`$ECHO "$complete" | $GREP " "`
22935        if test "x$has_space" != x; then
22936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22938        fi
22939        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22940      fi
22941  fi
22942
22943      # Now join together the path and the arguments once again
22944      if test "x$arguments" != xEOL; then
22945        new_complete="$new_path ${arguments% *}"
22946      else
22947        new_complete="$new_path"
22948      fi
22949
22950  if test "x$complete" != "x$new_complete"; then
22951      WINAR="$new_complete"
22952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22953$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22954    fi
22955
22956    AR="$WINAR"
22957    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22958
22959    # Extract the first word of "dumpbin", so it can be a program name with args.
22960set dummy dumpbin; ac_word=$2
22961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22962$as_echo_n "checking for $ac_word... " >&6; }
22963if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22964  $as_echo_n "(cached) " >&6
22965else
22966  if test -n "$DUMPBIN"; then
22967  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22968else
22969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22970for as_dir in $PATH
22971do
22972  IFS=$as_save_IFS
22973  test -z "$as_dir" && as_dir=.
22974    for ac_exec_ext in '' $ac_executable_extensions; do
22975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22976    ac_cv_prog_DUMPBIN="dumpbin"
22977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22978    break 2
22979  fi
22980done
22981  done
22982IFS=$as_save_IFS
22983
22984fi
22985fi
22986DUMPBIN=$ac_cv_prog_DUMPBIN
22987if test -n "$DUMPBIN"; then
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22989$as_echo "$DUMPBIN" >&6; }
22990else
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22992$as_echo "no" >&6; }
22993fi
22994
22995
22996
22997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22998
22999  # First separate the path from the arguments. This will split at the first
23000  # space.
23001  complete="$DUMPBIN"
23002  path="${complete%% *}"
23003  tmp="$complete EOL"
23004  arguments="${tmp#* }"
23005
23006  # Input might be given as Windows format, start by converting to
23007  # unix format.
23008  new_path=`$CYGPATH -u "$path"`
23009
23010  # Now try to locate executable using which
23011  new_path=`$WHICH "$new_path" 2> /dev/null`
23012  # bat and cmd files are not always considered executable in cygwin causing which
23013  # to not find them
23014  if test "x$new_path" = x \
23015           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23016           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23017    new_path=`$CYGPATH -u "$path"`
23018  fi
23019  if test "x$new_path" = x; then
23020    # Oops. Which didn't find the executable.
23021    # The splitting of arguments from the executable at a space might have been incorrect,
23022    # since paths with space are more likely in Windows. Give it another try with the whole
23023    # argument.
23024    path="$complete"
23025    arguments="EOL"
23026    new_path=`$CYGPATH -u "$path"`
23027    new_path=`$WHICH "$new_path" 2> /dev/null`
23028    # bat and cmd files are not always considered executable in cygwin causing which
23029    # to not find them
23030    if test "x$new_path" = x \
23031             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23032             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23033      new_path=`$CYGPATH -u "$path"`
23034    fi
23035    if test "x$new_path" = x; then
23036      # It's still not found. Now this is an unrecoverable error.
23037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23038$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23039      has_space=`$ECHO "$complete" | $GREP " "`
23040      if test "x$has_space" != x; then
23041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23043      fi
23044      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23045    fi
23046  fi
23047
23048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23051  # "foo.exe" is OK but "foo" is an error.
23052  #
23053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23054  # It is also a way to make sure we got the proper file name for the real test later on.
23055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23056  if test "x$test_shortpath" = x; then
23057    # Short path failed, file does not exist as specified.
23058    # Try adding .exe or .cmd
23059    if test -f "${new_path}.exe"; then
23060       input_to_shortpath="${new_path}.exe"
23061    elif test -f "${new_path}.cmd"; then
23062       input_to_shortpath="${new_path}.cmd"
23063    else
23064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23065$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23068      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23069    fi
23070  else
23071    input_to_shortpath="$new_path"
23072  fi
23073
23074  # Call helper function which possibly converts this using DOS-style short mode.
23075  # If so, the updated path is stored in $new_path.
23076  new_path="$input_to_shortpath"
23077
23078  input_path="$input_to_shortpath"
23079  # Check if we need to convert this using DOS-style short mode. If the path
23080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23081  # take no chances and rewrite it.
23082  # Note: m4 eats our [], so we need to use [ and ] instead.
23083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23084  if test "x$has_forbidden_chars" != x; then
23085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23089      # Going to short mode and back again did indeed matter. Since short mode is
23090      # case insensitive, let's make it lowercase to improve readability.
23091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23092      # Now convert it back to Unix-stile (cygpath)
23093      input_path=`$CYGPATH -u "$shortmode_path"`
23094      new_path="$input_path"
23095    fi
23096  fi
23097
23098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23099  if test "x$test_cygdrive_prefix" = x; then
23100    # As a simple fix, exclude /usr/bin since it's not a real path.
23101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23103      # a path prefixed by /cygdrive for fixpath to work.
23104      new_path="$CYGWIN_ROOT_PATH$input_path"
23105    fi
23106  fi
23107
23108  # remove trailing .exe if any
23109  new_path="${new_path/%.exe/}"
23110
23111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23112
23113  # First separate the path from the arguments. This will split at the first
23114  # space.
23115  complete="$DUMPBIN"
23116  path="${complete%% *}"
23117  tmp="$complete EOL"
23118  arguments="${tmp#* }"
23119
23120  # Input might be given as Windows format, start by converting to
23121  # unix format.
23122  new_path="$path"
23123
23124  windows_path="$new_path"
23125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23126    unix_path=`$CYGPATH -u "$windows_path"`
23127    new_path="$unix_path"
23128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23130    new_path="$unix_path"
23131  fi
23132
23133
23134  # Now try to locate executable using which
23135  new_path=`$WHICH "$new_path" 2> /dev/null`
23136
23137  if test "x$new_path" = x; then
23138    # Oops. Which didn't find the executable.
23139    # The splitting of arguments from the executable at a space might have been incorrect,
23140    # since paths with space are more likely in Windows. Give it another try with the whole
23141    # argument.
23142    path="$complete"
23143    arguments="EOL"
23144    new_path="$path"
23145
23146  windows_path="$new_path"
23147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23148    unix_path=`$CYGPATH -u "$windows_path"`
23149    new_path="$unix_path"
23150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23152    new_path="$unix_path"
23153  fi
23154
23155
23156    new_path=`$WHICH "$new_path" 2> /dev/null`
23157
23158    if test "x$new_path" = x; then
23159      # It's still not found. Now this is an unrecoverable error.
23160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23161$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23162      has_space=`$ECHO "$complete" | $GREP " "`
23163      if test "x$has_space" != x; then
23164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23166      fi
23167      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23168    fi
23169  fi
23170
23171  # Now new_path has a complete unix path to the binary
23172  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23173    # Keep paths in /bin as-is, but remove trailing .exe if any
23174    new_path="${new_path/%.exe/}"
23175    # Do not save /bin paths to all_fixpath_prefixes!
23176  else
23177    # Not in mixed or Windows style, start by that.
23178    new_path=`cmd //c echo $new_path`
23179
23180  input_path="$new_path"
23181  # Check if we need to convert this using DOS-style short mode. If the path
23182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23183  # take no chances and rewrite it.
23184  # Note: m4 eats our [], so we need to use [ and ] instead.
23185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23186  if test "x$has_forbidden_chars" != x; then
23187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23189  fi
23190
23191    # Output is in $new_path
23192
23193  windows_path="$new_path"
23194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23195    unix_path=`$CYGPATH -u "$windows_path"`
23196    new_path="$unix_path"
23197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23199    new_path="$unix_path"
23200  fi
23201
23202    # remove trailing .exe if any
23203    new_path="${new_path/%.exe/}"
23204
23205    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23206    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23207  fi
23208
23209  else
23210    # We're on a posix platform. Hooray! :)
23211    # First separate the path from the arguments. This will split at the first
23212    # space.
23213    complete="$DUMPBIN"
23214    path="${complete%% *}"
23215    tmp="$complete EOL"
23216    arguments="${tmp#* }"
23217
23218    # Cannot rely on the command "which" here since it doesn't always work.
23219    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23220    if test -z "$is_absolute_path"; then
23221      # Path to executable is not absolute. Find it.
23222      IFS_save="$IFS"
23223      IFS=:
23224      for p in $PATH; do
23225        if test -f "$p/$path" && test -x "$p/$path"; then
23226          new_path="$p/$path"
23227          break
23228        fi
23229      done
23230      IFS="$IFS_save"
23231    else
23232      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23233$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23234      new_path="$path"
23235    fi
23236
23237    if test "x$new_path" = x; then
23238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23239$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23240        has_space=`$ECHO "$complete" | $GREP " "`
23241        if test "x$has_space" != x; then
23242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23244        fi
23245        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23246      fi
23247  fi
23248
23249      # Now join together the path and the arguments once again
23250      if test "x$arguments" != xEOL; then
23251        new_complete="$new_path ${arguments% *}"
23252      else
23253        new_complete="$new_path"
23254      fi
23255
23256  if test "x$complete" != "x$new_complete"; then
23257      DUMPBIN="$new_complete"
23258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23259$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23260    fi
23261
23262
23263    COMPILER_TYPE=CL
23264    CCXXFLAGS="$CCXXFLAGS -nologo"
23265
23266fi
23267
23268
23269
23270ac_ext=c
23271ac_cpp='$CPP $CPPFLAGS'
23272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23274ac_compiler_gnu=$ac_cv_c_compiler_gnu
23275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23276$as_echo_n "checking how to run the C preprocessor... " >&6; }
23277# On Suns, sometimes $CPP names a directory.
23278if test -n "$CPP" && test -d "$CPP"; then
23279  CPP=
23280fi
23281if test -z "$CPP"; then
23282  if test "${ac_cv_prog_CPP+set}" = set; then :
23283  $as_echo_n "(cached) " >&6
23284else
23285      # Double quotes because CPP needs to be expanded
23286    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23287    do
23288      ac_preproc_ok=false
23289for ac_c_preproc_warn_flag in '' yes
23290do
23291  # Use a header file that comes with gcc, so configuring glibc
23292  # with a fresh cross-compiler works.
23293  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23294  # <limits.h> exists even on freestanding compilers.
23295  # On the NeXT, cc -E runs the code through the compiler's parser,
23296  # not just through cpp. "Syntax error" is here to catch this case.
23297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23298/* end confdefs.h.  */
23299#ifdef __STDC__
23300# include <limits.h>
23301#else
23302# include <assert.h>
23303#endif
23304		     Syntax error
23305_ACEOF
23306if ac_fn_c_try_cpp "$LINENO"; then :
23307
23308else
23309  # Broken: fails on valid input.
23310continue
23311fi
23312rm -f conftest.err conftest.i conftest.$ac_ext
23313
23314  # OK, works on sane cases.  Now check whether nonexistent headers
23315  # can be detected and how.
23316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23317/* end confdefs.h.  */
23318#include <ac_nonexistent.h>
23319_ACEOF
23320if ac_fn_c_try_cpp "$LINENO"; then :
23321  # Broken: success on invalid input.
23322continue
23323else
23324  # Passes both tests.
23325ac_preproc_ok=:
23326break
23327fi
23328rm -f conftest.err conftest.i conftest.$ac_ext
23329
23330done
23331# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23332rm -f conftest.i conftest.err conftest.$ac_ext
23333if $ac_preproc_ok; then :
23334  break
23335fi
23336
23337    done
23338    ac_cv_prog_CPP=$CPP
23339
23340fi
23341  CPP=$ac_cv_prog_CPP
23342else
23343  ac_cv_prog_CPP=$CPP
23344fi
23345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23346$as_echo "$CPP" >&6; }
23347ac_preproc_ok=false
23348for ac_c_preproc_warn_flag in '' yes
23349do
23350  # Use a header file that comes with gcc, so configuring glibc
23351  # with a fresh cross-compiler works.
23352  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23353  # <limits.h> exists even on freestanding compilers.
23354  # On the NeXT, cc -E runs the code through the compiler's parser,
23355  # not just through cpp. "Syntax error" is here to catch this case.
23356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23357/* end confdefs.h.  */
23358#ifdef __STDC__
23359# include <limits.h>
23360#else
23361# include <assert.h>
23362#endif
23363		     Syntax error
23364_ACEOF
23365if ac_fn_c_try_cpp "$LINENO"; then :
23366
23367else
23368  # Broken: fails on valid input.
23369continue
23370fi
23371rm -f conftest.err conftest.i conftest.$ac_ext
23372
23373  # OK, works on sane cases.  Now check whether nonexistent headers
23374  # can be detected and how.
23375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23376/* end confdefs.h.  */
23377#include <ac_nonexistent.h>
23378_ACEOF
23379if ac_fn_c_try_cpp "$LINENO"; then :
23380  # Broken: success on invalid input.
23381continue
23382else
23383  # Passes both tests.
23384ac_preproc_ok=:
23385break
23386fi
23387rm -f conftest.err conftest.i conftest.$ac_ext
23388
23389done
23390# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23391rm -f conftest.i conftest.err conftest.$ac_ext
23392if $ac_preproc_ok; then :
23393
23394else
23395  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23397as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23398See \`config.log' for more details" "$LINENO" 5 ; }
23399fi
23400
23401ac_ext=cpp
23402ac_cpp='$CXXCPP $CPPFLAGS'
23403ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23404ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23405ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23406
23407
23408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23409
23410  # First separate the path from the arguments. This will split at the first
23411  # space.
23412  complete="$CPP"
23413  path="${complete%% *}"
23414  tmp="$complete EOL"
23415  arguments="${tmp#* }"
23416
23417  # Input might be given as Windows format, start by converting to
23418  # unix format.
23419  new_path=`$CYGPATH -u "$path"`
23420
23421  # Now try to locate executable using which
23422  new_path=`$WHICH "$new_path" 2> /dev/null`
23423  # bat and cmd files are not always considered executable in cygwin causing which
23424  # to not find them
23425  if test "x$new_path" = x \
23426           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23427           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23428    new_path=`$CYGPATH -u "$path"`
23429  fi
23430  if test "x$new_path" = x; then
23431    # Oops. Which didn't find the executable.
23432    # The splitting of arguments from the executable at a space might have been incorrect,
23433    # since paths with space are more likely in Windows. Give it another try with the whole
23434    # argument.
23435    path="$complete"
23436    arguments="EOL"
23437    new_path=`$CYGPATH -u "$path"`
23438    new_path=`$WHICH "$new_path" 2> /dev/null`
23439    # bat and cmd files are not always considered executable in cygwin causing which
23440    # to not find them
23441    if test "x$new_path" = x \
23442             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23443             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23444      new_path=`$CYGPATH -u "$path"`
23445    fi
23446    if test "x$new_path" = x; then
23447      # It's still not found. Now this is an unrecoverable error.
23448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23449$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23450      has_space=`$ECHO "$complete" | $GREP " "`
23451      if test "x$has_space" != x; then
23452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23454      fi
23455      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23456    fi
23457  fi
23458
23459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23462  # "foo.exe" is OK but "foo" is an error.
23463  #
23464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23465  # It is also a way to make sure we got the proper file name for the real test later on.
23466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23467  if test "x$test_shortpath" = x; then
23468    # Short path failed, file does not exist as specified.
23469    # Try adding .exe or .cmd
23470    if test -f "${new_path}.exe"; then
23471       input_to_shortpath="${new_path}.exe"
23472    elif test -f "${new_path}.cmd"; then
23473       input_to_shortpath="${new_path}.cmd"
23474    else
23475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23476$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23479      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23480    fi
23481  else
23482    input_to_shortpath="$new_path"
23483  fi
23484
23485  # Call helper function which possibly converts this using DOS-style short mode.
23486  # If so, the updated path is stored in $new_path.
23487  new_path="$input_to_shortpath"
23488
23489  input_path="$input_to_shortpath"
23490  # Check if we need to convert this using DOS-style short mode. If the path
23491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23492  # take no chances and rewrite it.
23493  # Note: m4 eats our [], so we need to use [ and ] instead.
23494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23495  if test "x$has_forbidden_chars" != x; then
23496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23500      # Going to short mode and back again did indeed matter. Since short mode is
23501      # case insensitive, let's make it lowercase to improve readability.
23502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23503      # Now convert it back to Unix-stile (cygpath)
23504      input_path=`$CYGPATH -u "$shortmode_path"`
23505      new_path="$input_path"
23506    fi
23507  fi
23508
23509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23510  if test "x$test_cygdrive_prefix" = x; then
23511    # As a simple fix, exclude /usr/bin since it's not a real path.
23512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23514      # a path prefixed by /cygdrive for fixpath to work.
23515      new_path="$CYGWIN_ROOT_PATH$input_path"
23516    fi
23517  fi
23518
23519  # remove trailing .exe if any
23520  new_path="${new_path/%.exe/}"
23521
23522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23523
23524  # First separate the path from the arguments. This will split at the first
23525  # space.
23526  complete="$CPP"
23527  path="${complete%% *}"
23528  tmp="$complete EOL"
23529  arguments="${tmp#* }"
23530
23531  # Input might be given as Windows format, start by converting to
23532  # unix format.
23533  new_path="$path"
23534
23535  windows_path="$new_path"
23536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23537    unix_path=`$CYGPATH -u "$windows_path"`
23538    new_path="$unix_path"
23539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23541    new_path="$unix_path"
23542  fi
23543
23544
23545  # Now try to locate executable using which
23546  new_path=`$WHICH "$new_path" 2> /dev/null`
23547
23548  if test "x$new_path" = x; then
23549    # Oops. Which didn't find the executable.
23550    # The splitting of arguments from the executable at a space might have been incorrect,
23551    # since paths with space are more likely in Windows. Give it another try with the whole
23552    # argument.
23553    path="$complete"
23554    arguments="EOL"
23555    new_path="$path"
23556
23557  windows_path="$new_path"
23558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23559    unix_path=`$CYGPATH -u "$windows_path"`
23560    new_path="$unix_path"
23561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23563    new_path="$unix_path"
23564  fi
23565
23566
23567    new_path=`$WHICH "$new_path" 2> /dev/null`
23568
23569    if test "x$new_path" = x; then
23570      # It's still not found. Now this is an unrecoverable error.
23571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23572$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23573      has_space=`$ECHO "$complete" | $GREP " "`
23574      if test "x$has_space" != x; then
23575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23577      fi
23578      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23579    fi
23580  fi
23581
23582  # Now new_path has a complete unix path to the binary
23583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23584    # Keep paths in /bin as-is, but remove trailing .exe if any
23585    new_path="${new_path/%.exe/}"
23586    # Do not save /bin paths to all_fixpath_prefixes!
23587  else
23588    # Not in mixed or Windows style, start by that.
23589    new_path=`cmd //c echo $new_path`
23590
23591  input_path="$new_path"
23592  # Check if we need to convert this using DOS-style short mode. If the path
23593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23594  # take no chances and rewrite it.
23595  # Note: m4 eats our [], so we need to use [ and ] instead.
23596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23597  if test "x$has_forbidden_chars" != x; then
23598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23600  fi
23601
23602    # Output is in $new_path
23603
23604  windows_path="$new_path"
23605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23606    unix_path=`$CYGPATH -u "$windows_path"`
23607    new_path="$unix_path"
23608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23610    new_path="$unix_path"
23611  fi
23612
23613    # remove trailing .exe if any
23614    new_path="${new_path/%.exe/}"
23615
23616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23618  fi
23619
23620  else
23621    # We're on a posix platform. Hooray! :)
23622    # First separate the path from the arguments. This will split at the first
23623    # space.
23624    complete="$CPP"
23625    path="${complete%% *}"
23626    tmp="$complete EOL"
23627    arguments="${tmp#* }"
23628
23629    # Cannot rely on the command "which" here since it doesn't always work.
23630    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23631    if test -z "$is_absolute_path"; then
23632      # Path to executable is not absolute. Find it.
23633      IFS_save="$IFS"
23634      IFS=:
23635      for p in $PATH; do
23636        if test -f "$p/$path" && test -x "$p/$path"; then
23637          new_path="$p/$path"
23638          break
23639        fi
23640      done
23641      IFS="$IFS_save"
23642    else
23643      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23644$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23645      new_path="$path"
23646    fi
23647
23648    if test "x$new_path" = x; then
23649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23650$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23651        has_space=`$ECHO "$complete" | $GREP " "`
23652        if test "x$has_space" != x; then
23653          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23654$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23655        fi
23656        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23657      fi
23658  fi
23659
23660      # Now join together the path and the arguments once again
23661      if test "x$arguments" != xEOL; then
23662        new_complete="$new_path ${arguments% *}"
23663      else
23664        new_complete="$new_path"
23665      fi
23666
23667  if test "x$complete" != "x$new_complete"; then
23668      CPP="$new_complete"
23669      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23670$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23671    fi
23672
23673
23674ac_ext=cpp
23675ac_cpp='$CXXCPP $CPPFLAGS'
23676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23680$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23681if test -z "$CXXCPP"; then
23682  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23683  $as_echo_n "(cached) " >&6
23684else
23685      # Double quotes because CXXCPP needs to be expanded
23686    for CXXCPP in "$CXX -E" "/lib/cpp"
23687    do
23688      ac_preproc_ok=false
23689for ac_cxx_preproc_warn_flag in '' yes
23690do
23691  # Use a header file that comes with gcc, so configuring glibc
23692  # with a fresh cross-compiler works.
23693  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23694  # <limits.h> exists even on freestanding compilers.
23695  # On the NeXT, cc -E runs the code through the compiler's parser,
23696  # not just through cpp. "Syntax error" is here to catch this case.
23697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23698/* end confdefs.h.  */
23699#ifdef __STDC__
23700# include <limits.h>
23701#else
23702# include <assert.h>
23703#endif
23704		     Syntax error
23705_ACEOF
23706if ac_fn_cxx_try_cpp "$LINENO"; then :
23707
23708else
23709  # Broken: fails on valid input.
23710continue
23711fi
23712rm -f conftest.err conftest.i conftest.$ac_ext
23713
23714  # OK, works on sane cases.  Now check whether nonexistent headers
23715  # can be detected and how.
23716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23717/* end confdefs.h.  */
23718#include <ac_nonexistent.h>
23719_ACEOF
23720if ac_fn_cxx_try_cpp "$LINENO"; then :
23721  # Broken: success on invalid input.
23722continue
23723else
23724  # Passes both tests.
23725ac_preproc_ok=:
23726break
23727fi
23728rm -f conftest.err conftest.i conftest.$ac_ext
23729
23730done
23731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23732rm -f conftest.i conftest.err conftest.$ac_ext
23733if $ac_preproc_ok; then :
23734  break
23735fi
23736
23737    done
23738    ac_cv_prog_CXXCPP=$CXXCPP
23739
23740fi
23741  CXXCPP=$ac_cv_prog_CXXCPP
23742else
23743  ac_cv_prog_CXXCPP=$CXXCPP
23744fi
23745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23746$as_echo "$CXXCPP" >&6; }
23747ac_preproc_ok=false
23748for ac_cxx_preproc_warn_flag in '' yes
23749do
23750  # Use a header file that comes with gcc, so configuring glibc
23751  # with a fresh cross-compiler works.
23752  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23753  # <limits.h> exists even on freestanding compilers.
23754  # On the NeXT, cc -E runs the code through the compiler's parser,
23755  # not just through cpp. "Syntax error" is here to catch this case.
23756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23757/* end confdefs.h.  */
23758#ifdef __STDC__
23759# include <limits.h>
23760#else
23761# include <assert.h>
23762#endif
23763		     Syntax error
23764_ACEOF
23765if ac_fn_cxx_try_cpp "$LINENO"; then :
23766
23767else
23768  # Broken: fails on valid input.
23769continue
23770fi
23771rm -f conftest.err conftest.i conftest.$ac_ext
23772
23773  # OK, works on sane cases.  Now check whether nonexistent headers
23774  # can be detected and how.
23775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23776/* end confdefs.h.  */
23777#include <ac_nonexistent.h>
23778_ACEOF
23779if ac_fn_cxx_try_cpp "$LINENO"; then :
23780  # Broken: success on invalid input.
23781continue
23782else
23783  # Passes both tests.
23784ac_preproc_ok=:
23785break
23786fi
23787rm -f conftest.err conftest.i conftest.$ac_ext
23788
23789done
23790# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23791rm -f conftest.i conftest.err conftest.$ac_ext
23792if $ac_preproc_ok; then :
23793
23794else
23795  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23797as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23798See \`config.log' for more details" "$LINENO" 5 ; }
23799fi
23800
23801ac_ext=cpp
23802ac_cpp='$CXXCPP $CPPFLAGS'
23803ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23804ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23805ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23806
23807
23808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23809
23810  # First separate the path from the arguments. This will split at the first
23811  # space.
23812  complete="$CXXCPP"
23813  path="${complete%% *}"
23814  tmp="$complete EOL"
23815  arguments="${tmp#* }"
23816
23817  # Input might be given as Windows format, start by converting to
23818  # unix format.
23819  new_path=`$CYGPATH -u "$path"`
23820
23821  # Now try to locate executable using which
23822  new_path=`$WHICH "$new_path" 2> /dev/null`
23823  # bat and cmd files are not always considered executable in cygwin causing which
23824  # to not find them
23825  if test "x$new_path" = x \
23826           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23827           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23828    new_path=`$CYGPATH -u "$path"`
23829  fi
23830  if test "x$new_path" = x; then
23831    # Oops. Which didn't find the executable.
23832    # The splitting of arguments from the executable at a space might have been incorrect,
23833    # since paths with space are more likely in Windows. Give it another try with the whole
23834    # argument.
23835    path="$complete"
23836    arguments="EOL"
23837    new_path=`$CYGPATH -u "$path"`
23838    new_path=`$WHICH "$new_path" 2> /dev/null`
23839    # bat and cmd files are not always considered executable in cygwin causing which
23840    # to not find them
23841    if test "x$new_path" = x \
23842             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23843             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23844      new_path=`$CYGPATH -u "$path"`
23845    fi
23846    if test "x$new_path" = x; then
23847      # It's still not found. Now this is an unrecoverable error.
23848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23849$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23850      has_space=`$ECHO "$complete" | $GREP " "`
23851      if test "x$has_space" != x; then
23852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23854      fi
23855      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23856    fi
23857  fi
23858
23859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23862  # "foo.exe" is OK but "foo" is an error.
23863  #
23864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23865  # It is also a way to make sure we got the proper file name for the real test later on.
23866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23867  if test "x$test_shortpath" = x; then
23868    # Short path failed, file does not exist as specified.
23869    # Try adding .exe or .cmd
23870    if test -f "${new_path}.exe"; then
23871       input_to_shortpath="${new_path}.exe"
23872    elif test -f "${new_path}.cmd"; then
23873       input_to_shortpath="${new_path}.cmd"
23874    else
23875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23876$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23879      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23880    fi
23881  else
23882    input_to_shortpath="$new_path"
23883  fi
23884
23885  # Call helper function which possibly converts this using DOS-style short mode.
23886  # If so, the updated path is stored in $new_path.
23887  new_path="$input_to_shortpath"
23888
23889  input_path="$input_to_shortpath"
23890  # Check if we need to convert this using DOS-style short mode. If the path
23891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23892  # take no chances and rewrite it.
23893  # Note: m4 eats our [], so we need to use [ and ] instead.
23894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23895  if test "x$has_forbidden_chars" != x; then
23896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23900      # Going to short mode and back again did indeed matter. Since short mode is
23901      # case insensitive, let's make it lowercase to improve readability.
23902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23903      # Now convert it back to Unix-stile (cygpath)
23904      input_path=`$CYGPATH -u "$shortmode_path"`
23905      new_path="$input_path"
23906    fi
23907  fi
23908
23909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23910  if test "x$test_cygdrive_prefix" = x; then
23911    # As a simple fix, exclude /usr/bin since it's not a real path.
23912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23914      # a path prefixed by /cygdrive for fixpath to work.
23915      new_path="$CYGWIN_ROOT_PATH$input_path"
23916    fi
23917  fi
23918
23919  # remove trailing .exe if any
23920  new_path="${new_path/%.exe/}"
23921
23922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23923
23924  # First separate the path from the arguments. This will split at the first
23925  # space.
23926  complete="$CXXCPP"
23927  path="${complete%% *}"
23928  tmp="$complete EOL"
23929  arguments="${tmp#* }"
23930
23931  # Input might be given as Windows format, start by converting to
23932  # unix format.
23933  new_path="$path"
23934
23935  windows_path="$new_path"
23936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23937    unix_path=`$CYGPATH -u "$windows_path"`
23938    new_path="$unix_path"
23939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23941    new_path="$unix_path"
23942  fi
23943
23944
23945  # Now try to locate executable using which
23946  new_path=`$WHICH "$new_path" 2> /dev/null`
23947
23948  if test "x$new_path" = x; then
23949    # Oops. Which didn't find the executable.
23950    # The splitting of arguments from the executable at a space might have been incorrect,
23951    # since paths with space are more likely in Windows. Give it another try with the whole
23952    # argument.
23953    path="$complete"
23954    arguments="EOL"
23955    new_path="$path"
23956
23957  windows_path="$new_path"
23958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23959    unix_path=`$CYGPATH -u "$windows_path"`
23960    new_path="$unix_path"
23961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23963    new_path="$unix_path"
23964  fi
23965
23966
23967    new_path=`$WHICH "$new_path" 2> /dev/null`
23968
23969    if test "x$new_path" = x; then
23970      # It's still not found. Now this is an unrecoverable error.
23971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23972$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23973      has_space=`$ECHO "$complete" | $GREP " "`
23974      if test "x$has_space" != x; then
23975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23977      fi
23978      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23979    fi
23980  fi
23981
23982  # Now new_path has a complete unix path to the binary
23983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23984    # Keep paths in /bin as-is, but remove trailing .exe if any
23985    new_path="${new_path/%.exe/}"
23986    # Do not save /bin paths to all_fixpath_prefixes!
23987  else
23988    # Not in mixed or Windows style, start by that.
23989    new_path=`cmd //c echo $new_path`
23990
23991  input_path="$new_path"
23992  # Check if we need to convert this using DOS-style short mode. If the path
23993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23994  # take no chances and rewrite it.
23995  # Note: m4 eats our [], so we need to use [ and ] instead.
23996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23997  if test "x$has_forbidden_chars" != x; then
23998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24000  fi
24001
24002    # Output is in $new_path
24003
24004  windows_path="$new_path"
24005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24006    unix_path=`$CYGPATH -u "$windows_path"`
24007    new_path="$unix_path"
24008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24010    new_path="$unix_path"
24011  fi
24012
24013    # remove trailing .exe if any
24014    new_path="${new_path/%.exe/}"
24015
24016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24018  fi
24019
24020  else
24021    # We're on a posix platform. Hooray! :)
24022    # First separate the path from the arguments. This will split at the first
24023    # space.
24024    complete="$CXXCPP"
24025    path="${complete%% *}"
24026    tmp="$complete EOL"
24027    arguments="${tmp#* }"
24028
24029    # Cannot rely on the command "which" here since it doesn't always work.
24030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24031    if test -z "$is_absolute_path"; then
24032      # Path to executable is not absolute. Find it.
24033      IFS_save="$IFS"
24034      IFS=:
24035      for p in $PATH; do
24036        if test -f "$p/$path" && test -x "$p/$path"; then
24037          new_path="$p/$path"
24038          break
24039        fi
24040      done
24041      IFS="$IFS_save"
24042    else
24043      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24044$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24045      new_path="$path"
24046    fi
24047
24048    if test "x$new_path" = x; then
24049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24050$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24051        has_space=`$ECHO "$complete" | $GREP " "`
24052        if test "x$has_space" != x; then
24053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24055        fi
24056        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24057      fi
24058  fi
24059
24060      # Now join together the path and the arguments once again
24061      if test "x$arguments" != xEOL; then
24062        new_complete="$new_path ${arguments% *}"
24063      else
24064        new_complete="$new_path"
24065      fi
24066
24067  if test "x$complete" != "x$new_complete"; then
24068      CXXCPP="$new_complete"
24069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24070$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24071    fi
24072
24073
24074if test "x$COMPILE_TYPE" != "xcross"; then
24075    # If we are not cross compiling, use the same compilers for
24076    # building the build platform executables. The cross-compilation
24077    # case needed to be done earlier, but this can only be done after
24078    # the native tools have been localized.
24079    BUILD_CC="$CC"
24080    BUILD_CXX="$CXX"
24081    BUILD_LD="$LD"
24082fi
24083
24084# for solaris we really need solaris tools, and not gnu equivalent
24085#   these seems to normally reside in /usr/ccs/bin so add that to path before
24086#   starting to probe
24087#
24088#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24089#         so that it can be overriden --with-tools-dir
24090if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24091    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24092fi
24093
24094# Find the right assembler.
24095if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24096    # Extract the first word of "as", so it can be a program name with args.
24097set dummy as; ac_word=$2
24098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24099$as_echo_n "checking for $ac_word... " >&6; }
24100if test "${ac_cv_path_AS+set}" = set; then :
24101  $as_echo_n "(cached) " >&6
24102else
24103  case $AS in
24104  [\\/]* | ?:[\\/]*)
24105  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24106  ;;
24107  *)
24108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24109for as_dir in $PATH
24110do
24111  IFS=$as_save_IFS
24112  test -z "$as_dir" && as_dir=.
24113    for ac_exec_ext in '' $ac_executable_extensions; do
24114  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24115    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24117    break 2
24118  fi
24119done
24120  done
24121IFS=$as_save_IFS
24122
24123  ;;
24124esac
24125fi
24126AS=$ac_cv_path_AS
24127if test -n "$AS"; then
24128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24129$as_echo "$AS" >&6; }
24130else
24131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24132$as_echo "no" >&6; }
24133fi
24134
24135
24136
24137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24138
24139  # First separate the path from the arguments. This will split at the first
24140  # space.
24141  complete="$AS"
24142  path="${complete%% *}"
24143  tmp="$complete EOL"
24144  arguments="${tmp#* }"
24145
24146  # Input might be given as Windows format, start by converting to
24147  # unix format.
24148  new_path=`$CYGPATH -u "$path"`
24149
24150  # Now try to locate executable using which
24151  new_path=`$WHICH "$new_path" 2> /dev/null`
24152  # bat and cmd files are not always considered executable in cygwin causing which
24153  # to not find them
24154  if test "x$new_path" = x \
24155           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24156           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24157    new_path=`$CYGPATH -u "$path"`
24158  fi
24159  if test "x$new_path" = x; then
24160    # Oops. Which didn't find the executable.
24161    # The splitting of arguments from the executable at a space might have been incorrect,
24162    # since paths with space are more likely in Windows. Give it another try with the whole
24163    # argument.
24164    path="$complete"
24165    arguments="EOL"
24166    new_path=`$CYGPATH -u "$path"`
24167    new_path=`$WHICH "$new_path" 2> /dev/null`
24168    # bat and cmd files are not always considered executable in cygwin causing which
24169    # to not find them
24170    if test "x$new_path" = x \
24171             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24172             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24173      new_path=`$CYGPATH -u "$path"`
24174    fi
24175    if test "x$new_path" = x; then
24176      # It's still not found. Now this is an unrecoverable error.
24177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24178$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24179      has_space=`$ECHO "$complete" | $GREP " "`
24180      if test "x$has_space" != x; then
24181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24183      fi
24184      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24185    fi
24186  fi
24187
24188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24191  # "foo.exe" is OK but "foo" is an error.
24192  #
24193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24194  # It is also a way to make sure we got the proper file name for the real test later on.
24195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24196  if test "x$test_shortpath" = x; then
24197    # Short path failed, file does not exist as specified.
24198    # Try adding .exe or .cmd
24199    if test -f "${new_path}.exe"; then
24200       input_to_shortpath="${new_path}.exe"
24201    elif test -f "${new_path}.cmd"; then
24202       input_to_shortpath="${new_path}.cmd"
24203    else
24204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24205$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24208      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24209    fi
24210  else
24211    input_to_shortpath="$new_path"
24212  fi
24213
24214  # Call helper function which possibly converts this using DOS-style short mode.
24215  # If so, the updated path is stored in $new_path.
24216  new_path="$input_to_shortpath"
24217
24218  input_path="$input_to_shortpath"
24219  # Check if we need to convert this using DOS-style short mode. If the path
24220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24221  # take no chances and rewrite it.
24222  # Note: m4 eats our [], so we need to use [ and ] instead.
24223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24224  if test "x$has_forbidden_chars" != x; then
24225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24229      # Going to short mode and back again did indeed matter. Since short mode is
24230      # case insensitive, let's make it lowercase to improve readability.
24231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24232      # Now convert it back to Unix-stile (cygpath)
24233      input_path=`$CYGPATH -u "$shortmode_path"`
24234      new_path="$input_path"
24235    fi
24236  fi
24237
24238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24239  if test "x$test_cygdrive_prefix" = x; then
24240    # As a simple fix, exclude /usr/bin since it's not a real path.
24241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24243      # a path prefixed by /cygdrive for fixpath to work.
24244      new_path="$CYGWIN_ROOT_PATH$input_path"
24245    fi
24246  fi
24247
24248  # remove trailing .exe if any
24249  new_path="${new_path/%.exe/}"
24250
24251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24252
24253  # First separate the path from the arguments. This will split at the first
24254  # space.
24255  complete="$AS"
24256  path="${complete%% *}"
24257  tmp="$complete EOL"
24258  arguments="${tmp#* }"
24259
24260  # Input might be given as Windows format, start by converting to
24261  # unix format.
24262  new_path="$path"
24263
24264  windows_path="$new_path"
24265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24266    unix_path=`$CYGPATH -u "$windows_path"`
24267    new_path="$unix_path"
24268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24270    new_path="$unix_path"
24271  fi
24272
24273
24274  # Now try to locate executable using which
24275  new_path=`$WHICH "$new_path" 2> /dev/null`
24276
24277  if test "x$new_path" = x; then
24278    # Oops. Which didn't find the executable.
24279    # The splitting of arguments from the executable at a space might have been incorrect,
24280    # since paths with space are more likely in Windows. Give it another try with the whole
24281    # argument.
24282    path="$complete"
24283    arguments="EOL"
24284    new_path="$path"
24285
24286  windows_path="$new_path"
24287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24288    unix_path=`$CYGPATH -u "$windows_path"`
24289    new_path="$unix_path"
24290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24292    new_path="$unix_path"
24293  fi
24294
24295
24296    new_path=`$WHICH "$new_path" 2> /dev/null`
24297
24298    if test "x$new_path" = x; then
24299      # It's still not found. Now this is an unrecoverable error.
24300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24301$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24302      has_space=`$ECHO "$complete" | $GREP " "`
24303      if test "x$has_space" != x; then
24304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24306      fi
24307      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24308    fi
24309  fi
24310
24311  # Now new_path has a complete unix path to the binary
24312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24313    # Keep paths in /bin as-is, but remove trailing .exe if any
24314    new_path="${new_path/%.exe/}"
24315    # Do not save /bin paths to all_fixpath_prefixes!
24316  else
24317    # Not in mixed or Windows style, start by that.
24318    new_path=`cmd //c echo $new_path`
24319
24320  input_path="$new_path"
24321  # Check if we need to convert this using DOS-style short mode. If the path
24322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24323  # take no chances and rewrite it.
24324  # Note: m4 eats our [], so we need to use [ and ] instead.
24325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24326  if test "x$has_forbidden_chars" != x; then
24327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24329  fi
24330
24331    # Output is in $new_path
24332
24333  windows_path="$new_path"
24334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24335    unix_path=`$CYGPATH -u "$windows_path"`
24336    new_path="$unix_path"
24337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24339    new_path="$unix_path"
24340  fi
24341
24342    # remove trailing .exe if any
24343    new_path="${new_path/%.exe/}"
24344
24345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24347  fi
24348
24349  else
24350    # We're on a posix platform. Hooray! :)
24351    # First separate the path from the arguments. This will split at the first
24352    # space.
24353    complete="$AS"
24354    path="${complete%% *}"
24355    tmp="$complete EOL"
24356    arguments="${tmp#* }"
24357
24358    # Cannot rely on the command "which" here since it doesn't always work.
24359    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24360    if test -z "$is_absolute_path"; then
24361      # Path to executable is not absolute. Find it.
24362      IFS_save="$IFS"
24363      IFS=:
24364      for p in $PATH; do
24365        if test -f "$p/$path" && test -x "$p/$path"; then
24366          new_path="$p/$path"
24367          break
24368        fi
24369      done
24370      IFS="$IFS_save"
24371    else
24372      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24373$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24374      new_path="$path"
24375    fi
24376
24377    if test "x$new_path" = x; then
24378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24379$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24380        has_space=`$ECHO "$complete" | $GREP " "`
24381        if test "x$has_space" != x; then
24382          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24383$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24384        fi
24385        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24386      fi
24387  fi
24388
24389      # Now join together the path and the arguments once again
24390      if test "x$arguments" != xEOL; then
24391        new_complete="$new_path ${arguments% *}"
24392      else
24393        new_complete="$new_path"
24394      fi
24395
24396  if test "x$complete" != "x$new_complete"; then
24397      AS="$new_complete"
24398      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24399$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24400    fi
24401
24402else
24403    AS="$CC -c"
24404fi
24405
24406
24407if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24408    for ac_prog in gnm nm
24409do
24410  # Extract the first word of "$ac_prog", so it can be a program name with args.
24411set dummy $ac_prog; ac_word=$2
24412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24413$as_echo_n "checking for $ac_word... " >&6; }
24414if test "${ac_cv_path_NM+set}" = set; then :
24415  $as_echo_n "(cached) " >&6
24416else
24417  case $NM in
24418  [\\/]* | ?:[\\/]*)
24419  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24420  ;;
24421  *)
24422  as_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_path_NM="$as_dir/$ac_word$ac_exec_ext"
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
24437  ;;
24438esac
24439fi
24440NM=$ac_cv_path_NM
24441if test -n "$NM"; then
24442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24443$as_echo "$NM" >&6; }
24444else
24445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24446$as_echo "no" >&6; }
24447fi
24448
24449
24450  test -n "$NM" && break
24451done
24452
24453
24454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24455
24456  # First separate the path from the arguments. This will split at the first
24457  # space.
24458  complete="$NM"
24459  path="${complete%% *}"
24460  tmp="$complete EOL"
24461  arguments="${tmp#* }"
24462
24463  # Input might be given as Windows format, start by converting to
24464  # unix format.
24465  new_path=`$CYGPATH -u "$path"`
24466
24467  # Now try to locate executable using which
24468  new_path=`$WHICH "$new_path" 2> /dev/null`
24469  # bat and cmd files are not always considered executable in cygwin causing which
24470  # to not find them
24471  if test "x$new_path" = x \
24472           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24473           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24474    new_path=`$CYGPATH -u "$path"`
24475  fi
24476  if test "x$new_path" = x; then
24477    # Oops. Which didn't find the executable.
24478    # The splitting of arguments from the executable at a space might have been incorrect,
24479    # since paths with space are more likely in Windows. Give it another try with the whole
24480    # argument.
24481    path="$complete"
24482    arguments="EOL"
24483    new_path=`$CYGPATH -u "$path"`
24484    new_path=`$WHICH "$new_path" 2> /dev/null`
24485    # bat and cmd files are not always considered executable in cygwin causing which
24486    # to not find them
24487    if test "x$new_path" = x \
24488             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24489             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24490      new_path=`$CYGPATH -u "$path"`
24491    fi
24492    if test "x$new_path" = x; then
24493      # It's still not found. Now this is an unrecoverable error.
24494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24495$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24496      has_space=`$ECHO "$complete" | $GREP " "`
24497      if test "x$has_space" != x; then
24498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24500      fi
24501      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24502    fi
24503  fi
24504
24505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24508  # "foo.exe" is OK but "foo" is an error.
24509  #
24510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24511  # It is also a way to make sure we got the proper file name for the real test later on.
24512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24513  if test "x$test_shortpath" = x; then
24514    # Short path failed, file does not exist as specified.
24515    # Try adding .exe or .cmd
24516    if test -f "${new_path}.exe"; then
24517       input_to_shortpath="${new_path}.exe"
24518    elif test -f "${new_path}.cmd"; then
24519       input_to_shortpath="${new_path}.cmd"
24520    else
24521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24522$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24525      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24526    fi
24527  else
24528    input_to_shortpath="$new_path"
24529  fi
24530
24531  # Call helper function which possibly converts this using DOS-style short mode.
24532  # If so, the updated path is stored in $new_path.
24533  new_path="$input_to_shortpath"
24534
24535  input_path="$input_to_shortpath"
24536  # Check if we need to convert this using DOS-style short mode. If the path
24537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24538  # take no chances and rewrite it.
24539  # Note: m4 eats our [], so we need to use [ and ] instead.
24540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24541  if test "x$has_forbidden_chars" != x; then
24542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24546      # Going to short mode and back again did indeed matter. Since short mode is
24547      # case insensitive, let's make it lowercase to improve readability.
24548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24549      # Now convert it back to Unix-stile (cygpath)
24550      input_path=`$CYGPATH -u "$shortmode_path"`
24551      new_path="$input_path"
24552    fi
24553  fi
24554
24555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24556  if test "x$test_cygdrive_prefix" = x; then
24557    # As a simple fix, exclude /usr/bin since it's not a real path.
24558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24560      # a path prefixed by /cygdrive for fixpath to work.
24561      new_path="$CYGWIN_ROOT_PATH$input_path"
24562    fi
24563  fi
24564
24565  # remove trailing .exe if any
24566  new_path="${new_path/%.exe/}"
24567
24568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24569
24570  # First separate the path from the arguments. This will split at the first
24571  # space.
24572  complete="$NM"
24573  path="${complete%% *}"
24574  tmp="$complete EOL"
24575  arguments="${tmp#* }"
24576
24577  # Input might be given as Windows format, start by converting to
24578  # unix format.
24579  new_path="$path"
24580
24581  windows_path="$new_path"
24582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24583    unix_path=`$CYGPATH -u "$windows_path"`
24584    new_path="$unix_path"
24585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24587    new_path="$unix_path"
24588  fi
24589
24590
24591  # Now try to locate executable using which
24592  new_path=`$WHICH "$new_path" 2> /dev/null`
24593
24594  if test "x$new_path" = x; then
24595    # Oops. Which didn't find the executable.
24596    # The splitting of arguments from the executable at a space might have been incorrect,
24597    # since paths with space are more likely in Windows. Give it another try with the whole
24598    # argument.
24599    path="$complete"
24600    arguments="EOL"
24601    new_path="$path"
24602
24603  windows_path="$new_path"
24604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24605    unix_path=`$CYGPATH -u "$windows_path"`
24606    new_path="$unix_path"
24607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24609    new_path="$unix_path"
24610  fi
24611
24612
24613    new_path=`$WHICH "$new_path" 2> /dev/null`
24614
24615    if test "x$new_path" = x; then
24616      # It's still not found. Now this is an unrecoverable error.
24617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24618$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24619      has_space=`$ECHO "$complete" | $GREP " "`
24620      if test "x$has_space" != x; then
24621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24623      fi
24624      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24625    fi
24626  fi
24627
24628  # Now new_path has a complete unix path to the binary
24629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24630    # Keep paths in /bin as-is, but remove trailing .exe if any
24631    new_path="${new_path/%.exe/}"
24632    # Do not save /bin paths to all_fixpath_prefixes!
24633  else
24634    # Not in mixed or Windows style, start by that.
24635    new_path=`cmd //c echo $new_path`
24636
24637  input_path="$new_path"
24638  # Check if we need to convert this using DOS-style short mode. If the path
24639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24640  # take no chances and rewrite it.
24641  # Note: m4 eats our [], so we need to use [ and ] instead.
24642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24643  if test "x$has_forbidden_chars" != x; then
24644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24646  fi
24647
24648    # Output is in $new_path
24649
24650  windows_path="$new_path"
24651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24652    unix_path=`$CYGPATH -u "$windows_path"`
24653    new_path="$unix_path"
24654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24656    new_path="$unix_path"
24657  fi
24658
24659    # remove trailing .exe if any
24660    new_path="${new_path/%.exe/}"
24661
24662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24664  fi
24665
24666  else
24667    # We're on a posix platform. Hooray! :)
24668    # First separate the path from the arguments. This will split at the first
24669    # space.
24670    complete="$NM"
24671    path="${complete%% *}"
24672    tmp="$complete EOL"
24673    arguments="${tmp#* }"
24674
24675    # Cannot rely on the command "which" here since it doesn't always work.
24676    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24677    if test -z "$is_absolute_path"; then
24678      # Path to executable is not absolute. Find it.
24679      IFS_save="$IFS"
24680      IFS=:
24681      for p in $PATH; do
24682        if test -f "$p/$path" && test -x "$p/$path"; then
24683          new_path="$p/$path"
24684          break
24685        fi
24686      done
24687      IFS="$IFS_save"
24688    else
24689      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24690$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24691      new_path="$path"
24692    fi
24693
24694    if test "x$new_path" = x; then
24695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24696$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24697        has_space=`$ECHO "$complete" | $GREP " "`
24698        if test "x$has_space" != x; then
24699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24701        fi
24702        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24703      fi
24704  fi
24705
24706      # Now join together the path and the arguments once again
24707      if test "x$arguments" != xEOL; then
24708        new_complete="$new_path ${arguments% *}"
24709      else
24710        new_complete="$new_path"
24711      fi
24712
24713  if test "x$complete" != "x$new_complete"; then
24714      NM="$new_complete"
24715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24716$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24717    fi
24718
24719    # Extract the first word of "strip", so it can be a program name with args.
24720set dummy strip; ac_word=$2
24721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24722$as_echo_n "checking for $ac_word... " >&6; }
24723if test "${ac_cv_path_STRIP+set}" = set; then :
24724  $as_echo_n "(cached) " >&6
24725else
24726  case $STRIP in
24727  [\\/]* | ?:[\\/]*)
24728  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24729  ;;
24730  *)
24731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24732for as_dir in $PATH
24733do
24734  IFS=$as_save_IFS
24735  test -z "$as_dir" && as_dir=.
24736    for ac_exec_ext in '' $ac_executable_extensions; do
24737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24738    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24740    break 2
24741  fi
24742done
24743  done
24744IFS=$as_save_IFS
24745
24746  ;;
24747esac
24748fi
24749STRIP=$ac_cv_path_STRIP
24750if test -n "$STRIP"; then
24751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24752$as_echo "$STRIP" >&6; }
24753else
24754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24755$as_echo "no" >&6; }
24756fi
24757
24758
24759
24760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24761
24762  # First separate the path from the arguments. This will split at the first
24763  # space.
24764  complete="$STRIP"
24765  path="${complete%% *}"
24766  tmp="$complete EOL"
24767  arguments="${tmp#* }"
24768
24769  # Input might be given as Windows format, start by converting to
24770  # unix format.
24771  new_path=`$CYGPATH -u "$path"`
24772
24773  # Now try to locate executable using which
24774  new_path=`$WHICH "$new_path" 2> /dev/null`
24775  # bat and cmd files are not always considered executable in cygwin causing which
24776  # to not find them
24777  if test "x$new_path" = x \
24778           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24779           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24780    new_path=`$CYGPATH -u "$path"`
24781  fi
24782  if test "x$new_path" = x; then
24783    # Oops. Which didn't find the executable.
24784    # The splitting of arguments from the executable at a space might have been incorrect,
24785    # since paths with space are more likely in Windows. Give it another try with the whole
24786    # argument.
24787    path="$complete"
24788    arguments="EOL"
24789    new_path=`$CYGPATH -u "$path"`
24790    new_path=`$WHICH "$new_path" 2> /dev/null`
24791    # bat and cmd files are not always considered executable in cygwin causing which
24792    # to not find them
24793    if test "x$new_path" = x \
24794             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24795             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24796      new_path=`$CYGPATH -u "$path"`
24797    fi
24798    if test "x$new_path" = x; then
24799      # It's still not found. Now this is an unrecoverable error.
24800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24801$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24802      has_space=`$ECHO "$complete" | $GREP " "`
24803      if test "x$has_space" != x; then
24804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24806      fi
24807      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24808    fi
24809  fi
24810
24811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24814  # "foo.exe" is OK but "foo" is an error.
24815  #
24816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24817  # It is also a way to make sure we got the proper file name for the real test later on.
24818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24819  if test "x$test_shortpath" = x; then
24820    # Short path failed, file does not exist as specified.
24821    # Try adding .exe or .cmd
24822    if test -f "${new_path}.exe"; then
24823       input_to_shortpath="${new_path}.exe"
24824    elif test -f "${new_path}.cmd"; then
24825       input_to_shortpath="${new_path}.cmd"
24826    else
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24828$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24831      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24832    fi
24833  else
24834    input_to_shortpath="$new_path"
24835  fi
24836
24837  # Call helper function which possibly converts this using DOS-style short mode.
24838  # If so, the updated path is stored in $new_path.
24839  new_path="$input_to_shortpath"
24840
24841  input_path="$input_to_shortpath"
24842  # Check if we need to convert this using DOS-style short mode. If the path
24843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24844  # take no chances and rewrite it.
24845  # Note: m4 eats our [], so we need to use [ and ] instead.
24846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24847  if test "x$has_forbidden_chars" != x; then
24848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24852      # Going to short mode and back again did indeed matter. Since short mode is
24853      # case insensitive, let's make it lowercase to improve readability.
24854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24855      # Now convert it back to Unix-stile (cygpath)
24856      input_path=`$CYGPATH -u "$shortmode_path"`
24857      new_path="$input_path"
24858    fi
24859  fi
24860
24861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24862  if test "x$test_cygdrive_prefix" = x; then
24863    # As a simple fix, exclude /usr/bin since it's not a real path.
24864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24866      # a path prefixed by /cygdrive for fixpath to work.
24867      new_path="$CYGWIN_ROOT_PATH$input_path"
24868    fi
24869  fi
24870
24871  # remove trailing .exe if any
24872  new_path="${new_path/%.exe/}"
24873
24874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24875
24876  # First separate the path from the arguments. This will split at the first
24877  # space.
24878  complete="$STRIP"
24879  path="${complete%% *}"
24880  tmp="$complete EOL"
24881  arguments="${tmp#* }"
24882
24883  # Input might be given as Windows format, start by converting to
24884  # unix format.
24885  new_path="$path"
24886
24887  windows_path="$new_path"
24888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24889    unix_path=`$CYGPATH -u "$windows_path"`
24890    new_path="$unix_path"
24891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24893    new_path="$unix_path"
24894  fi
24895
24896
24897  # Now try to locate executable using which
24898  new_path=`$WHICH "$new_path" 2> /dev/null`
24899
24900  if test "x$new_path" = x; then
24901    # Oops. Which didn't find the executable.
24902    # The splitting of arguments from the executable at a space might have been incorrect,
24903    # since paths with space are more likely in Windows. Give it another try with the whole
24904    # argument.
24905    path="$complete"
24906    arguments="EOL"
24907    new_path="$path"
24908
24909  windows_path="$new_path"
24910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24911    unix_path=`$CYGPATH -u "$windows_path"`
24912    new_path="$unix_path"
24913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24915    new_path="$unix_path"
24916  fi
24917
24918
24919    new_path=`$WHICH "$new_path" 2> /dev/null`
24920
24921    if test "x$new_path" = x; then
24922      # It's still not found. Now this is an unrecoverable error.
24923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24924$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24925      has_space=`$ECHO "$complete" | $GREP " "`
24926      if test "x$has_space" != x; then
24927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24929      fi
24930      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24931    fi
24932  fi
24933
24934  # Now new_path has a complete unix path to the binary
24935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24936    # Keep paths in /bin as-is, but remove trailing .exe if any
24937    new_path="${new_path/%.exe/}"
24938    # Do not save /bin paths to all_fixpath_prefixes!
24939  else
24940    # Not in mixed or Windows style, start by that.
24941    new_path=`cmd //c echo $new_path`
24942
24943  input_path="$new_path"
24944  # Check if we need to convert this using DOS-style short mode. If the path
24945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24946  # take no chances and rewrite it.
24947  # Note: m4 eats our [], so we need to use [ and ] instead.
24948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24949  if test "x$has_forbidden_chars" != x; then
24950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24952  fi
24953
24954    # Output is in $new_path
24955
24956  windows_path="$new_path"
24957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24958    unix_path=`$CYGPATH -u "$windows_path"`
24959    new_path="$unix_path"
24960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24962    new_path="$unix_path"
24963  fi
24964
24965    # remove trailing .exe if any
24966    new_path="${new_path/%.exe/}"
24967
24968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24970  fi
24971
24972  else
24973    # We're on a posix platform. Hooray! :)
24974    # First separate the path from the arguments. This will split at the first
24975    # space.
24976    complete="$STRIP"
24977    path="${complete%% *}"
24978    tmp="$complete EOL"
24979    arguments="${tmp#* }"
24980
24981    # Cannot rely on the command "which" here since it doesn't always work.
24982    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24983    if test -z "$is_absolute_path"; then
24984      # Path to executable is not absolute. Find it.
24985      IFS_save="$IFS"
24986      IFS=:
24987      for p in $PATH; do
24988        if test -f "$p/$path" && test -x "$p/$path"; then
24989          new_path="$p/$path"
24990          break
24991        fi
24992      done
24993      IFS="$IFS_save"
24994    else
24995      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
24996$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
24997      new_path="$path"
24998    fi
24999
25000    if test "x$new_path" = x; then
25001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25002$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25003        has_space=`$ECHO "$complete" | $GREP " "`
25004        if test "x$has_space" != x; then
25005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25007        fi
25008        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25009      fi
25010  fi
25011
25012      # Now join together the path and the arguments once again
25013      if test "x$arguments" != xEOL; then
25014        new_complete="$new_path ${arguments% *}"
25015      else
25016        new_complete="$new_path"
25017      fi
25018
25019  if test "x$complete" != "x$new_complete"; then
25020      STRIP="$new_complete"
25021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25022$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25023    fi
25024
25025    # Extract the first word of "mcs", so it can be a program name with args.
25026set dummy mcs; ac_word=$2
25027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25028$as_echo_n "checking for $ac_word... " >&6; }
25029if test "${ac_cv_path_MCS+set}" = set; then :
25030  $as_echo_n "(cached) " >&6
25031else
25032  case $MCS in
25033  [\\/]* | ?:[\\/]*)
25034  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25035  ;;
25036  *)
25037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25038for as_dir in $PATH
25039do
25040  IFS=$as_save_IFS
25041  test -z "$as_dir" && as_dir=.
25042    for ac_exec_ext in '' $ac_executable_extensions; do
25043  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25044    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25046    break 2
25047  fi
25048done
25049  done
25050IFS=$as_save_IFS
25051
25052  ;;
25053esac
25054fi
25055MCS=$ac_cv_path_MCS
25056if test -n "$MCS"; then
25057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25058$as_echo "$MCS" >&6; }
25059else
25060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25061$as_echo "no" >&6; }
25062fi
25063
25064
25065
25066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25067
25068  # First separate the path from the arguments. This will split at the first
25069  # space.
25070  complete="$MCS"
25071  path="${complete%% *}"
25072  tmp="$complete EOL"
25073  arguments="${tmp#* }"
25074
25075  # Input might be given as Windows format, start by converting to
25076  # unix format.
25077  new_path=`$CYGPATH -u "$path"`
25078
25079  # Now try to locate executable using which
25080  new_path=`$WHICH "$new_path" 2> /dev/null`
25081  # bat and cmd files are not always considered executable in cygwin causing which
25082  # to not find them
25083  if test "x$new_path" = x \
25084           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25085           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25086    new_path=`$CYGPATH -u "$path"`
25087  fi
25088  if test "x$new_path" = x; then
25089    # Oops. Which didn't find the executable.
25090    # The splitting of arguments from the executable at a space might have been incorrect,
25091    # since paths with space are more likely in Windows. Give it another try with the whole
25092    # argument.
25093    path="$complete"
25094    arguments="EOL"
25095    new_path=`$CYGPATH -u "$path"`
25096    new_path=`$WHICH "$new_path" 2> /dev/null`
25097    # bat and cmd files are not always considered executable in cygwin causing which
25098    # to not find them
25099    if test "x$new_path" = x \
25100             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25101             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25102      new_path=`$CYGPATH -u "$path"`
25103    fi
25104    if test "x$new_path" = x; then
25105      # It's still not found. Now this is an unrecoverable error.
25106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25107$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25108      has_space=`$ECHO "$complete" | $GREP " "`
25109      if test "x$has_space" != x; then
25110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25112      fi
25113      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25114    fi
25115  fi
25116
25117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25120  # "foo.exe" is OK but "foo" is an error.
25121  #
25122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25123  # It is also a way to make sure we got the proper file name for the real test later on.
25124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25125  if test "x$test_shortpath" = x; then
25126    # Short path failed, file does not exist as specified.
25127    # Try adding .exe or .cmd
25128    if test -f "${new_path}.exe"; then
25129       input_to_shortpath="${new_path}.exe"
25130    elif test -f "${new_path}.cmd"; then
25131       input_to_shortpath="${new_path}.cmd"
25132    else
25133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25134$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25137      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25138    fi
25139  else
25140    input_to_shortpath="$new_path"
25141  fi
25142
25143  # Call helper function which possibly converts this using DOS-style short mode.
25144  # If so, the updated path is stored in $new_path.
25145  new_path="$input_to_shortpath"
25146
25147  input_path="$input_to_shortpath"
25148  # Check if we need to convert this using DOS-style short mode. If the path
25149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25150  # take no chances and rewrite it.
25151  # Note: m4 eats our [], so we need to use [ and ] instead.
25152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25153  if test "x$has_forbidden_chars" != x; then
25154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25158      # Going to short mode and back again did indeed matter. Since short mode is
25159      # case insensitive, let's make it lowercase to improve readability.
25160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25161      # Now convert it back to Unix-stile (cygpath)
25162      input_path=`$CYGPATH -u "$shortmode_path"`
25163      new_path="$input_path"
25164    fi
25165  fi
25166
25167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25168  if test "x$test_cygdrive_prefix" = x; then
25169    # As a simple fix, exclude /usr/bin since it's not a real path.
25170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25172      # a path prefixed by /cygdrive for fixpath to work.
25173      new_path="$CYGWIN_ROOT_PATH$input_path"
25174    fi
25175  fi
25176
25177  # remove trailing .exe if any
25178  new_path="${new_path/%.exe/}"
25179
25180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25181
25182  # First separate the path from the arguments. This will split at the first
25183  # space.
25184  complete="$MCS"
25185  path="${complete%% *}"
25186  tmp="$complete EOL"
25187  arguments="${tmp#* }"
25188
25189  # Input might be given as Windows format, start by converting to
25190  # unix format.
25191  new_path="$path"
25192
25193  windows_path="$new_path"
25194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25195    unix_path=`$CYGPATH -u "$windows_path"`
25196    new_path="$unix_path"
25197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25199    new_path="$unix_path"
25200  fi
25201
25202
25203  # Now try to locate executable using which
25204  new_path=`$WHICH "$new_path" 2> /dev/null`
25205
25206  if test "x$new_path" = x; then
25207    # Oops. Which didn't find the executable.
25208    # The splitting of arguments from the executable at a space might have been incorrect,
25209    # since paths with space are more likely in Windows. Give it another try with the whole
25210    # argument.
25211    path="$complete"
25212    arguments="EOL"
25213    new_path="$path"
25214
25215  windows_path="$new_path"
25216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25217    unix_path=`$CYGPATH -u "$windows_path"`
25218    new_path="$unix_path"
25219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25221    new_path="$unix_path"
25222  fi
25223
25224
25225    new_path=`$WHICH "$new_path" 2> /dev/null`
25226
25227    if test "x$new_path" = x; then
25228      # It's still not found. Now this is an unrecoverable error.
25229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25230$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25231      has_space=`$ECHO "$complete" | $GREP " "`
25232      if test "x$has_space" != x; then
25233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25235      fi
25236      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25237    fi
25238  fi
25239
25240  # Now new_path has a complete unix path to the binary
25241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25242    # Keep paths in /bin as-is, but remove trailing .exe if any
25243    new_path="${new_path/%.exe/}"
25244    # Do not save /bin paths to all_fixpath_prefixes!
25245  else
25246    # Not in mixed or Windows style, start by that.
25247    new_path=`cmd //c echo $new_path`
25248
25249  input_path="$new_path"
25250  # Check if we need to convert this using DOS-style short mode. If the path
25251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25252  # take no chances and rewrite it.
25253  # Note: m4 eats our [], so we need to use [ and ] instead.
25254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25255  if test "x$has_forbidden_chars" != x; then
25256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25258  fi
25259
25260    # Output is in $new_path
25261
25262  windows_path="$new_path"
25263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25264    unix_path=`$CYGPATH -u "$windows_path"`
25265    new_path="$unix_path"
25266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25268    new_path="$unix_path"
25269  fi
25270
25271    # remove trailing .exe if any
25272    new_path="${new_path/%.exe/}"
25273
25274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25276  fi
25277
25278  else
25279    # We're on a posix platform. Hooray! :)
25280    # First separate the path from the arguments. This will split at the first
25281    # space.
25282    complete="$MCS"
25283    path="${complete%% *}"
25284    tmp="$complete EOL"
25285    arguments="${tmp#* }"
25286
25287    # Cannot rely on the command "which" here since it doesn't always work.
25288    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25289    if test -z "$is_absolute_path"; then
25290      # Path to executable is not absolute. Find it.
25291      IFS_save="$IFS"
25292      IFS=:
25293      for p in $PATH; do
25294        if test -f "$p/$path" && test -x "$p/$path"; then
25295          new_path="$p/$path"
25296          break
25297        fi
25298      done
25299      IFS="$IFS_save"
25300    else
25301      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25302$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25303      new_path="$path"
25304    fi
25305
25306    if test "x$new_path" = x; then
25307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25308$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25309        has_space=`$ECHO "$complete" | $GREP " "`
25310        if test "x$has_space" != x; then
25311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25313        fi
25314        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25315      fi
25316  fi
25317
25318      # Now join together the path and the arguments once again
25319      if test "x$arguments" != xEOL; then
25320        new_complete="$new_path ${arguments% *}"
25321      else
25322        new_complete="$new_path"
25323      fi
25324
25325  if test "x$complete" != "x$new_complete"; then
25326      MCS="$new_complete"
25327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25328$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25329    fi
25330
25331elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25332    if test -n "$ac_tool_prefix"; then
25333  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25334set dummy ${ac_tool_prefix}nm; ac_word=$2
25335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25336$as_echo_n "checking for $ac_word... " >&6; }
25337if test "${ac_cv_prog_NM+set}" = set; then :
25338  $as_echo_n "(cached) " >&6
25339else
25340  if test -n "$NM"; then
25341  ac_cv_prog_NM="$NM" # Let the user override the test.
25342else
25343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25344for as_dir in $PATH
25345do
25346  IFS=$as_save_IFS
25347  test -z "$as_dir" && as_dir=.
25348    for ac_exec_ext in '' $ac_executable_extensions; do
25349  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25350    ac_cv_prog_NM="${ac_tool_prefix}nm"
25351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25352    break 2
25353  fi
25354done
25355  done
25356IFS=$as_save_IFS
25357
25358fi
25359fi
25360NM=$ac_cv_prog_NM
25361if test -n "$NM"; then
25362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25363$as_echo "$NM" >&6; }
25364else
25365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25366$as_echo "no" >&6; }
25367fi
25368
25369
25370fi
25371if test -z "$ac_cv_prog_NM"; then
25372  ac_ct_NM=$NM
25373  # Extract the first word of "nm", so it can be a program name with args.
25374set dummy nm; ac_word=$2
25375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25376$as_echo_n "checking for $ac_word... " >&6; }
25377if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25378  $as_echo_n "(cached) " >&6
25379else
25380  if test -n "$ac_ct_NM"; then
25381  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25382else
25383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25384for as_dir in $PATH
25385do
25386  IFS=$as_save_IFS
25387  test -z "$as_dir" && as_dir=.
25388    for ac_exec_ext in '' $ac_executable_extensions; do
25389  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25390    ac_cv_prog_ac_ct_NM="nm"
25391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25392    break 2
25393  fi
25394done
25395  done
25396IFS=$as_save_IFS
25397
25398fi
25399fi
25400ac_ct_NM=$ac_cv_prog_ac_ct_NM
25401if test -n "$ac_ct_NM"; then
25402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25403$as_echo "$ac_ct_NM" >&6; }
25404else
25405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25406$as_echo "no" >&6; }
25407fi
25408
25409  if test "x$ac_ct_NM" = x; then
25410    NM=""
25411  else
25412    case $cross_compiling:$ac_tool_warned in
25413yes:)
25414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25416ac_tool_warned=yes ;;
25417esac
25418    NM=$ac_ct_NM
25419  fi
25420else
25421  NM="$ac_cv_prog_NM"
25422fi
25423
25424
25425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426
25427  # First separate the path from the arguments. This will split at the first
25428  # space.
25429  complete="$NM"
25430  path="${complete%% *}"
25431  tmp="$complete EOL"
25432  arguments="${tmp#* }"
25433
25434  # Input might be given as Windows format, start by converting to
25435  # unix format.
25436  new_path=`$CYGPATH -u "$path"`
25437
25438  # Now try to locate executable using which
25439  new_path=`$WHICH "$new_path" 2> /dev/null`
25440  # bat and cmd files are not always considered executable in cygwin causing which
25441  # to not find them
25442  if test "x$new_path" = x \
25443           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25444           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25445    new_path=`$CYGPATH -u "$path"`
25446  fi
25447  if test "x$new_path" = x; then
25448    # Oops. Which didn't find the executable.
25449    # The splitting of arguments from the executable at a space might have been incorrect,
25450    # since paths with space are more likely in Windows. Give it another try with the whole
25451    # argument.
25452    path="$complete"
25453    arguments="EOL"
25454    new_path=`$CYGPATH -u "$path"`
25455    new_path=`$WHICH "$new_path" 2> /dev/null`
25456    # bat and cmd files are not always considered executable in cygwin causing which
25457    # to not find them
25458    if test "x$new_path" = x \
25459             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25460             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25461      new_path=`$CYGPATH -u "$path"`
25462    fi
25463    if test "x$new_path" = x; then
25464      # It's still not found. Now this is an unrecoverable error.
25465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25466$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25467      has_space=`$ECHO "$complete" | $GREP " "`
25468      if test "x$has_space" != x; then
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25471      fi
25472      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25473    fi
25474  fi
25475
25476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25479  # "foo.exe" is OK but "foo" is an error.
25480  #
25481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25482  # It is also a way to make sure we got the proper file name for the real test later on.
25483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25484  if test "x$test_shortpath" = x; then
25485    # Short path failed, file does not exist as specified.
25486    # Try adding .exe or .cmd
25487    if test -f "${new_path}.exe"; then
25488       input_to_shortpath="${new_path}.exe"
25489    elif test -f "${new_path}.cmd"; then
25490       input_to_shortpath="${new_path}.cmd"
25491    else
25492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25493$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25496      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25497    fi
25498  else
25499    input_to_shortpath="$new_path"
25500  fi
25501
25502  # Call helper function which possibly converts this using DOS-style short mode.
25503  # If so, the updated path is stored in $new_path.
25504  new_path="$input_to_shortpath"
25505
25506  input_path="$input_to_shortpath"
25507  # Check if we need to convert this using DOS-style short mode. If the path
25508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25509  # take no chances and rewrite it.
25510  # Note: m4 eats our [], so we need to use [ and ] instead.
25511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25512  if test "x$has_forbidden_chars" != x; then
25513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25517      # Going to short mode and back again did indeed matter. Since short mode is
25518      # case insensitive, let's make it lowercase to improve readability.
25519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25520      # Now convert it back to Unix-stile (cygpath)
25521      input_path=`$CYGPATH -u "$shortmode_path"`
25522      new_path="$input_path"
25523    fi
25524  fi
25525
25526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25527  if test "x$test_cygdrive_prefix" = x; then
25528    # As a simple fix, exclude /usr/bin since it's not a real path.
25529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25531      # a path prefixed by /cygdrive for fixpath to work.
25532      new_path="$CYGWIN_ROOT_PATH$input_path"
25533    fi
25534  fi
25535
25536  # remove trailing .exe if any
25537  new_path="${new_path/%.exe/}"
25538
25539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25540
25541  # First separate the path from the arguments. This will split at the first
25542  # space.
25543  complete="$NM"
25544  path="${complete%% *}"
25545  tmp="$complete EOL"
25546  arguments="${tmp#* }"
25547
25548  # Input might be given as Windows format, start by converting to
25549  # unix format.
25550  new_path="$path"
25551
25552  windows_path="$new_path"
25553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25554    unix_path=`$CYGPATH -u "$windows_path"`
25555    new_path="$unix_path"
25556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25558    new_path="$unix_path"
25559  fi
25560
25561
25562  # Now try to locate executable using which
25563  new_path=`$WHICH "$new_path" 2> /dev/null`
25564
25565  if test "x$new_path" = x; then
25566    # Oops. Which didn't find the executable.
25567    # The splitting of arguments from the executable at a space might have been incorrect,
25568    # since paths with space are more likely in Windows. Give it another try with the whole
25569    # argument.
25570    path="$complete"
25571    arguments="EOL"
25572    new_path="$path"
25573
25574  windows_path="$new_path"
25575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25576    unix_path=`$CYGPATH -u "$windows_path"`
25577    new_path="$unix_path"
25578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25580    new_path="$unix_path"
25581  fi
25582
25583
25584    new_path=`$WHICH "$new_path" 2> /dev/null`
25585
25586    if test "x$new_path" = x; then
25587      # It's still not found. Now this is an unrecoverable error.
25588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25589$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25590      has_space=`$ECHO "$complete" | $GREP " "`
25591      if test "x$has_space" != x; then
25592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25594      fi
25595      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25596    fi
25597  fi
25598
25599  # Now new_path has a complete unix path to the binary
25600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25601    # Keep paths in /bin as-is, but remove trailing .exe if any
25602    new_path="${new_path/%.exe/}"
25603    # Do not save /bin paths to all_fixpath_prefixes!
25604  else
25605    # Not in mixed or Windows style, start by that.
25606    new_path=`cmd //c echo $new_path`
25607
25608  input_path="$new_path"
25609  # Check if we need to convert this using DOS-style short mode. If the path
25610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25611  # take no chances and rewrite it.
25612  # Note: m4 eats our [], so we need to use [ and ] instead.
25613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25614  if test "x$has_forbidden_chars" != x; then
25615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25617  fi
25618
25619    # Output is in $new_path
25620
25621  windows_path="$new_path"
25622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25623    unix_path=`$CYGPATH -u "$windows_path"`
25624    new_path="$unix_path"
25625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25627    new_path="$unix_path"
25628  fi
25629
25630    # remove trailing .exe if any
25631    new_path="${new_path/%.exe/}"
25632
25633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25635  fi
25636
25637  else
25638    # We're on a posix platform. Hooray! :)
25639    # First separate the path from the arguments. This will split at the first
25640    # space.
25641    complete="$NM"
25642    path="${complete%% *}"
25643    tmp="$complete EOL"
25644    arguments="${tmp#* }"
25645
25646    # Cannot rely on the command "which" here since it doesn't always work.
25647    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25648    if test -z "$is_absolute_path"; then
25649      # Path to executable is not absolute. Find it.
25650      IFS_save="$IFS"
25651      IFS=:
25652      for p in $PATH; do
25653        if test -f "$p/$path" && test -x "$p/$path"; then
25654          new_path="$p/$path"
25655          break
25656        fi
25657      done
25658      IFS="$IFS_save"
25659    else
25660      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25661$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25662      new_path="$path"
25663    fi
25664
25665    if test "x$new_path" = x; then
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25667$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25668        has_space=`$ECHO "$complete" | $GREP " "`
25669        if test "x$has_space" != x; then
25670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25672        fi
25673        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25674      fi
25675  fi
25676
25677      # Now join together the path and the arguments once again
25678      if test "x$arguments" != xEOL; then
25679        new_complete="$new_path ${arguments% *}"
25680      else
25681        new_complete="$new_path"
25682      fi
25683
25684  if test "x$complete" != "x$new_complete"; then
25685      NM="$new_complete"
25686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25687$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25688    fi
25689
25690    if test -n "$ac_tool_prefix"; then
25691  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25692set dummy ${ac_tool_prefix}strip; ac_word=$2
25693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25694$as_echo_n "checking for $ac_word... " >&6; }
25695if test "${ac_cv_prog_STRIP+set}" = set; then :
25696  $as_echo_n "(cached) " >&6
25697else
25698  if test -n "$STRIP"; then
25699  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25700else
25701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25702for as_dir in $PATH
25703do
25704  IFS=$as_save_IFS
25705  test -z "$as_dir" && as_dir=.
25706    for ac_exec_ext in '' $ac_executable_extensions; do
25707  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25708    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25710    break 2
25711  fi
25712done
25713  done
25714IFS=$as_save_IFS
25715
25716fi
25717fi
25718STRIP=$ac_cv_prog_STRIP
25719if test -n "$STRIP"; then
25720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25721$as_echo "$STRIP" >&6; }
25722else
25723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25724$as_echo "no" >&6; }
25725fi
25726
25727
25728fi
25729if test -z "$ac_cv_prog_STRIP"; then
25730  ac_ct_STRIP=$STRIP
25731  # Extract the first word of "strip", so it can be a program name with args.
25732set dummy strip; 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_prog_ac_ct_STRIP+set}" = set; then :
25736  $as_echo_n "(cached) " >&6
25737else
25738  if test -n "$ac_ct_STRIP"; then
25739  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25740else
25741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25742for as_dir in $PATH
25743do
25744  IFS=$as_save_IFS
25745  test -z "$as_dir" && as_dir=.
25746    for ac_exec_ext in '' $ac_executable_extensions; do
25747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25748    ac_cv_prog_ac_ct_STRIP="strip"
25749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25750    break 2
25751  fi
25752done
25753  done
25754IFS=$as_save_IFS
25755
25756fi
25757fi
25758ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25759if test -n "$ac_ct_STRIP"; then
25760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25761$as_echo "$ac_ct_STRIP" >&6; }
25762else
25763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25764$as_echo "no" >&6; }
25765fi
25766
25767  if test "x$ac_ct_STRIP" = x; then
25768    STRIP=""
25769  else
25770    case $cross_compiling:$ac_tool_warned in
25771yes:)
25772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25774ac_tool_warned=yes ;;
25775esac
25776    STRIP=$ac_ct_STRIP
25777  fi
25778else
25779  STRIP="$ac_cv_prog_STRIP"
25780fi
25781
25782
25783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25784
25785  # First separate the path from the arguments. This will split at the first
25786  # space.
25787  complete="$STRIP"
25788  path="${complete%% *}"
25789  tmp="$complete EOL"
25790  arguments="${tmp#* }"
25791
25792  # Input might be given as Windows format, start by converting to
25793  # unix format.
25794  new_path=`$CYGPATH -u "$path"`
25795
25796  # Now try to locate executable using which
25797  new_path=`$WHICH "$new_path" 2> /dev/null`
25798  # bat and cmd files are not always considered executable in cygwin causing which
25799  # to not find them
25800  if test "x$new_path" = x \
25801           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25802           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25803    new_path=`$CYGPATH -u "$path"`
25804  fi
25805  if test "x$new_path" = x; then
25806    # Oops. Which didn't find the executable.
25807    # The splitting of arguments from the executable at a space might have been incorrect,
25808    # since paths with space are more likely in Windows. Give it another try with the whole
25809    # argument.
25810    path="$complete"
25811    arguments="EOL"
25812    new_path=`$CYGPATH -u "$path"`
25813    new_path=`$WHICH "$new_path" 2> /dev/null`
25814    # bat and cmd files are not always considered executable in cygwin causing which
25815    # to not find them
25816    if test "x$new_path" = x \
25817             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25818             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25819      new_path=`$CYGPATH -u "$path"`
25820    fi
25821    if test "x$new_path" = x; then
25822      # It's still not found. Now this is an unrecoverable error.
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25824$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25825      has_space=`$ECHO "$complete" | $GREP " "`
25826      if test "x$has_space" != x; then
25827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25829      fi
25830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25831    fi
25832  fi
25833
25834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25837  # "foo.exe" is OK but "foo" is an error.
25838  #
25839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25840  # It is also a way to make sure we got the proper file name for the real test later on.
25841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25842  if test "x$test_shortpath" = x; then
25843    # Short path failed, file does not exist as specified.
25844    # Try adding .exe or .cmd
25845    if test -f "${new_path}.exe"; then
25846       input_to_shortpath="${new_path}.exe"
25847    elif test -f "${new_path}.cmd"; then
25848       input_to_shortpath="${new_path}.cmd"
25849    else
25850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25851$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25854      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25855    fi
25856  else
25857    input_to_shortpath="$new_path"
25858  fi
25859
25860  # Call helper function which possibly converts this using DOS-style short mode.
25861  # If so, the updated path is stored in $new_path.
25862  new_path="$input_to_shortpath"
25863
25864  input_path="$input_to_shortpath"
25865  # Check if we need to convert this using DOS-style short mode. If the path
25866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25867  # take no chances and rewrite it.
25868  # Note: m4 eats our [], so we need to use [ and ] instead.
25869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25870  if test "x$has_forbidden_chars" != x; then
25871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25875      # Going to short mode and back again did indeed matter. Since short mode is
25876      # case insensitive, let's make it lowercase to improve readability.
25877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25878      # Now convert it back to Unix-stile (cygpath)
25879      input_path=`$CYGPATH -u "$shortmode_path"`
25880      new_path="$input_path"
25881    fi
25882  fi
25883
25884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25885  if test "x$test_cygdrive_prefix" = x; then
25886    # As a simple fix, exclude /usr/bin since it's not a real path.
25887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25889      # a path prefixed by /cygdrive for fixpath to work.
25890      new_path="$CYGWIN_ROOT_PATH$input_path"
25891    fi
25892  fi
25893
25894  # remove trailing .exe if any
25895  new_path="${new_path/%.exe/}"
25896
25897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25898
25899  # First separate the path from the arguments. This will split at the first
25900  # space.
25901  complete="$STRIP"
25902  path="${complete%% *}"
25903  tmp="$complete EOL"
25904  arguments="${tmp#* }"
25905
25906  # Input might be given as Windows format, start by converting to
25907  # unix format.
25908  new_path="$path"
25909
25910  windows_path="$new_path"
25911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25912    unix_path=`$CYGPATH -u "$windows_path"`
25913    new_path="$unix_path"
25914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25916    new_path="$unix_path"
25917  fi
25918
25919
25920  # Now try to locate executable using which
25921  new_path=`$WHICH "$new_path" 2> /dev/null`
25922
25923  if test "x$new_path" = x; then
25924    # Oops. Which didn't find the executable.
25925    # The splitting of arguments from the executable at a space might have been incorrect,
25926    # since paths with space are more likely in Windows. Give it another try with the whole
25927    # argument.
25928    path="$complete"
25929    arguments="EOL"
25930    new_path="$path"
25931
25932  windows_path="$new_path"
25933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25934    unix_path=`$CYGPATH -u "$windows_path"`
25935    new_path="$unix_path"
25936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25938    new_path="$unix_path"
25939  fi
25940
25941
25942    new_path=`$WHICH "$new_path" 2> /dev/null`
25943
25944    if test "x$new_path" = x; then
25945      # It's still not found. Now this is an unrecoverable error.
25946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25947$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25948      has_space=`$ECHO "$complete" | $GREP " "`
25949      if test "x$has_space" != x; then
25950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25952      fi
25953      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25954    fi
25955  fi
25956
25957  # Now new_path has a complete unix path to the binary
25958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25959    # Keep paths in /bin as-is, but remove trailing .exe if any
25960    new_path="${new_path/%.exe/}"
25961    # Do not save /bin paths to all_fixpath_prefixes!
25962  else
25963    # Not in mixed or Windows style, start by that.
25964    new_path=`cmd //c echo $new_path`
25965
25966  input_path="$new_path"
25967  # Check if we need to convert this using DOS-style short mode. If the path
25968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25969  # take no chances and rewrite it.
25970  # Note: m4 eats our [], so we need to use [ and ] instead.
25971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25972  if test "x$has_forbidden_chars" != x; then
25973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25975  fi
25976
25977    # Output is in $new_path
25978
25979  windows_path="$new_path"
25980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25981    unix_path=`$CYGPATH -u "$windows_path"`
25982    new_path="$unix_path"
25983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25985    new_path="$unix_path"
25986  fi
25987
25988    # remove trailing .exe if any
25989    new_path="${new_path/%.exe/}"
25990
25991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25993  fi
25994
25995  else
25996    # We're on a posix platform. Hooray! :)
25997    # First separate the path from the arguments. This will split at the first
25998    # space.
25999    complete="$STRIP"
26000    path="${complete%% *}"
26001    tmp="$complete EOL"
26002    arguments="${tmp#* }"
26003
26004    # Cannot rely on the command "which" here since it doesn't always work.
26005    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26006    if test -z "$is_absolute_path"; then
26007      # Path to executable is not absolute. Find it.
26008      IFS_save="$IFS"
26009      IFS=:
26010      for p in $PATH; do
26011        if test -f "$p/$path" && test -x "$p/$path"; then
26012          new_path="$p/$path"
26013          break
26014        fi
26015      done
26016      IFS="$IFS_save"
26017    else
26018      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26019$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26020      new_path="$path"
26021    fi
26022
26023    if test "x$new_path" = x; then
26024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26025$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26026        has_space=`$ECHO "$complete" | $GREP " "`
26027        if test "x$has_space" != x; then
26028          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26030        fi
26031        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26032      fi
26033  fi
26034
26035      # Now join together the path and the arguments once again
26036      if test "x$arguments" != xEOL; then
26037        new_complete="$new_path ${arguments% *}"
26038      else
26039        new_complete="$new_path"
26040      fi
26041
26042  if test "x$complete" != "x$new_complete"; then
26043      STRIP="$new_complete"
26044      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26045$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26046    fi
26047
26048fi
26049
26050# objcopy is used for moving debug symbols to separate files when
26051# full debug symbols are enabled.
26052if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26053    if test -n "$ac_tool_prefix"; then
26054  for ac_prog in gobjcopy objcopy
26055  do
26056    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26057set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26059$as_echo_n "checking for $ac_word... " >&6; }
26060if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26061  $as_echo_n "(cached) " >&6
26062else
26063  if test -n "$OBJCOPY"; then
26064  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26065else
26066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26067for as_dir in $PATH
26068do
26069  IFS=$as_save_IFS
26070  test -z "$as_dir" && as_dir=.
26071    for ac_exec_ext in '' $ac_executable_extensions; do
26072  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26073    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26075    break 2
26076  fi
26077done
26078  done
26079IFS=$as_save_IFS
26080
26081fi
26082fi
26083OBJCOPY=$ac_cv_prog_OBJCOPY
26084if test -n "$OBJCOPY"; then
26085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26086$as_echo "$OBJCOPY" >&6; }
26087else
26088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26089$as_echo "no" >&6; }
26090fi
26091
26092
26093    test -n "$OBJCOPY" && break
26094  done
26095fi
26096if test -z "$OBJCOPY"; then
26097  ac_ct_OBJCOPY=$OBJCOPY
26098  for ac_prog in gobjcopy objcopy
26099do
26100  # Extract the first word of "$ac_prog", so it can be a program name with args.
26101set dummy $ac_prog; ac_word=$2
26102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26103$as_echo_n "checking for $ac_word... " >&6; }
26104if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26105  $as_echo_n "(cached) " >&6
26106else
26107  if test -n "$ac_ct_OBJCOPY"; then
26108  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26109else
26110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26111for as_dir in $PATH
26112do
26113  IFS=$as_save_IFS
26114  test -z "$as_dir" && as_dir=.
26115    for ac_exec_ext in '' $ac_executable_extensions; do
26116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26117    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26119    break 2
26120  fi
26121done
26122  done
26123IFS=$as_save_IFS
26124
26125fi
26126fi
26127ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26128if test -n "$ac_ct_OBJCOPY"; then
26129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26130$as_echo "$ac_ct_OBJCOPY" >&6; }
26131else
26132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26133$as_echo "no" >&6; }
26134fi
26135
26136
26137  test -n "$ac_ct_OBJCOPY" && break
26138done
26139
26140  if test "x$ac_ct_OBJCOPY" = x; then
26141    OBJCOPY=""
26142  else
26143    case $cross_compiling:$ac_tool_warned in
26144yes:)
26145{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26146$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26147ac_tool_warned=yes ;;
26148esac
26149    OBJCOPY=$ac_ct_OBJCOPY
26150  fi
26151fi
26152
26153    # Only call fixup if objcopy was found.
26154    if test -n "$OBJCOPY"; then
26155
26156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26157
26158  # First separate the path from the arguments. This will split at the first
26159  # space.
26160  complete="$OBJCOPY"
26161  path="${complete%% *}"
26162  tmp="$complete EOL"
26163  arguments="${tmp#* }"
26164
26165  # Input might be given as Windows format, start by converting to
26166  # unix format.
26167  new_path=`$CYGPATH -u "$path"`
26168
26169  # Now try to locate executable using which
26170  new_path=`$WHICH "$new_path" 2> /dev/null`
26171  # bat and cmd files are not always considered executable in cygwin causing which
26172  # to not find them
26173  if test "x$new_path" = x \
26174           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26175           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26176    new_path=`$CYGPATH -u "$path"`
26177  fi
26178  if test "x$new_path" = x; then
26179    # Oops. Which didn't find the executable.
26180    # The splitting of arguments from the executable at a space might have been incorrect,
26181    # since paths with space are more likely in Windows. Give it another try with the whole
26182    # argument.
26183    path="$complete"
26184    arguments="EOL"
26185    new_path=`$CYGPATH -u "$path"`
26186    new_path=`$WHICH "$new_path" 2> /dev/null`
26187    # bat and cmd files are not always considered executable in cygwin causing which
26188    # to not find them
26189    if test "x$new_path" = x \
26190             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26191             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26192      new_path=`$CYGPATH -u "$path"`
26193    fi
26194    if test "x$new_path" = x; then
26195      # It's still not found. Now this is an unrecoverable error.
26196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26197$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26198      has_space=`$ECHO "$complete" | $GREP " "`
26199      if test "x$has_space" != x; then
26200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26202      fi
26203      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26204    fi
26205  fi
26206
26207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26210  # "foo.exe" is OK but "foo" is an error.
26211  #
26212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26213  # It is also a way to make sure we got the proper file name for the real test later on.
26214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26215  if test "x$test_shortpath" = x; then
26216    # Short path failed, file does not exist as specified.
26217    # Try adding .exe or .cmd
26218    if test -f "${new_path}.exe"; then
26219       input_to_shortpath="${new_path}.exe"
26220    elif test -f "${new_path}.cmd"; then
26221       input_to_shortpath="${new_path}.cmd"
26222    else
26223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26224$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26227      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26228    fi
26229  else
26230    input_to_shortpath="$new_path"
26231  fi
26232
26233  # Call helper function which possibly converts this using DOS-style short mode.
26234  # If so, the updated path is stored in $new_path.
26235  new_path="$input_to_shortpath"
26236
26237  input_path="$input_to_shortpath"
26238  # Check if we need to convert this using DOS-style short mode. If the path
26239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26240  # take no chances and rewrite it.
26241  # Note: m4 eats our [], so we need to use [ and ] instead.
26242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26243  if test "x$has_forbidden_chars" != x; then
26244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26248      # Going to short mode and back again did indeed matter. Since short mode is
26249      # case insensitive, let's make it lowercase to improve readability.
26250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26251      # Now convert it back to Unix-stile (cygpath)
26252      input_path=`$CYGPATH -u "$shortmode_path"`
26253      new_path="$input_path"
26254    fi
26255  fi
26256
26257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26258  if test "x$test_cygdrive_prefix" = x; then
26259    # As a simple fix, exclude /usr/bin since it's not a real path.
26260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26262      # a path prefixed by /cygdrive for fixpath to work.
26263      new_path="$CYGWIN_ROOT_PATH$input_path"
26264    fi
26265  fi
26266
26267  # remove trailing .exe if any
26268  new_path="${new_path/%.exe/}"
26269
26270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26271
26272  # First separate the path from the arguments. This will split at the first
26273  # space.
26274  complete="$OBJCOPY"
26275  path="${complete%% *}"
26276  tmp="$complete EOL"
26277  arguments="${tmp#* }"
26278
26279  # Input might be given as Windows format, start by converting to
26280  # unix format.
26281  new_path="$path"
26282
26283  windows_path="$new_path"
26284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26285    unix_path=`$CYGPATH -u "$windows_path"`
26286    new_path="$unix_path"
26287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26289    new_path="$unix_path"
26290  fi
26291
26292
26293  # Now try to locate executable using which
26294  new_path=`$WHICH "$new_path" 2> /dev/null`
26295
26296  if test "x$new_path" = x; then
26297    # Oops. Which didn't find the executable.
26298    # The splitting of arguments from the executable at a space might have been incorrect,
26299    # since paths with space are more likely in Windows. Give it another try with the whole
26300    # argument.
26301    path="$complete"
26302    arguments="EOL"
26303    new_path="$path"
26304
26305  windows_path="$new_path"
26306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26307    unix_path=`$CYGPATH -u "$windows_path"`
26308    new_path="$unix_path"
26309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26311    new_path="$unix_path"
26312  fi
26313
26314
26315    new_path=`$WHICH "$new_path" 2> /dev/null`
26316
26317    if test "x$new_path" = x; then
26318      # It's still not found. Now this is an unrecoverable error.
26319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26320$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26321      has_space=`$ECHO "$complete" | $GREP " "`
26322      if test "x$has_space" != x; then
26323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26325      fi
26326      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26327    fi
26328  fi
26329
26330  # Now new_path has a complete unix path to the binary
26331  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26332    # Keep paths in /bin as-is, but remove trailing .exe if any
26333    new_path="${new_path/%.exe/}"
26334    # Do not save /bin paths to all_fixpath_prefixes!
26335  else
26336    # Not in mixed or Windows style, start by that.
26337    new_path=`cmd //c echo $new_path`
26338
26339  input_path="$new_path"
26340  # Check if we need to convert this using DOS-style short mode. If the path
26341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26342  # take no chances and rewrite it.
26343  # Note: m4 eats our [], so we need to use [ and ] instead.
26344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26345  if test "x$has_forbidden_chars" != x; then
26346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26348  fi
26349
26350    # Output is in $new_path
26351
26352  windows_path="$new_path"
26353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26354    unix_path=`$CYGPATH -u "$windows_path"`
26355    new_path="$unix_path"
26356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26358    new_path="$unix_path"
26359  fi
26360
26361    # remove trailing .exe if any
26362    new_path="${new_path/%.exe/}"
26363
26364    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26365    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26366  fi
26367
26368  else
26369    # We're on a posix platform. Hooray! :)
26370    # First separate the path from the arguments. This will split at the first
26371    # space.
26372    complete="$OBJCOPY"
26373    path="${complete%% *}"
26374    tmp="$complete EOL"
26375    arguments="${tmp#* }"
26376
26377    # Cannot rely on the command "which" here since it doesn't always work.
26378    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26379    if test -z "$is_absolute_path"; then
26380      # Path to executable is not absolute. Find it.
26381      IFS_save="$IFS"
26382      IFS=:
26383      for p in $PATH; do
26384        if test -f "$p/$path" && test -x "$p/$path"; then
26385          new_path="$p/$path"
26386          break
26387        fi
26388      done
26389      IFS="$IFS_save"
26390    else
26391      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26392$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26393      new_path="$path"
26394    fi
26395
26396    if test "x$new_path" = x; then
26397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26398$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26399        has_space=`$ECHO "$complete" | $GREP " "`
26400        if test "x$has_space" != x; then
26401          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26402$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26403        fi
26404        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26405      fi
26406  fi
26407
26408      # Now join together the path and the arguments once again
26409      if test "x$arguments" != xEOL; then
26410        new_complete="$new_path ${arguments% *}"
26411      else
26412        new_complete="$new_path"
26413      fi
26414
26415  if test "x$complete" != "x$new_complete"; then
26416      OBJCOPY="$new_complete"
26417      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26418$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26419    fi
26420
26421    fi
26422fi
26423
26424if test -n "$ac_tool_prefix"; then
26425  for ac_prog in gobjdump objdump
26426  do
26427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26430$as_echo_n "checking for $ac_word... " >&6; }
26431if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26432  $as_echo_n "(cached) " >&6
26433else
26434  if test -n "$OBJDUMP"; then
26435  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26436else
26437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26438for as_dir in $PATH
26439do
26440  IFS=$as_save_IFS
26441  test -z "$as_dir" && as_dir=.
26442    for ac_exec_ext in '' $ac_executable_extensions; do
26443  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26444    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26446    break 2
26447  fi
26448done
26449  done
26450IFS=$as_save_IFS
26451
26452fi
26453fi
26454OBJDUMP=$ac_cv_prog_OBJDUMP
26455if test -n "$OBJDUMP"; then
26456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26457$as_echo "$OBJDUMP" >&6; }
26458else
26459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26460$as_echo "no" >&6; }
26461fi
26462
26463
26464    test -n "$OBJDUMP" && break
26465  done
26466fi
26467if test -z "$OBJDUMP"; then
26468  ac_ct_OBJDUMP=$OBJDUMP
26469  for ac_prog in gobjdump objdump
26470do
26471  # Extract the first word of "$ac_prog", so it can be a program name with args.
26472set dummy $ac_prog; ac_word=$2
26473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26474$as_echo_n "checking for $ac_word... " >&6; }
26475if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26476  $as_echo_n "(cached) " >&6
26477else
26478  if test -n "$ac_ct_OBJDUMP"; then
26479  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26480else
26481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26482for as_dir in $PATH
26483do
26484  IFS=$as_save_IFS
26485  test -z "$as_dir" && as_dir=.
26486    for ac_exec_ext in '' $ac_executable_extensions; do
26487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26488    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26490    break 2
26491  fi
26492done
26493  done
26494IFS=$as_save_IFS
26495
26496fi
26497fi
26498ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26499if test -n "$ac_ct_OBJDUMP"; then
26500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26501$as_echo "$ac_ct_OBJDUMP" >&6; }
26502else
26503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26504$as_echo "no" >&6; }
26505fi
26506
26507
26508  test -n "$ac_ct_OBJDUMP" && break
26509done
26510
26511  if test "x$ac_ct_OBJDUMP" = x; then
26512    OBJDUMP=""
26513  else
26514    case $cross_compiling:$ac_tool_warned in
26515yes:)
26516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26518ac_tool_warned=yes ;;
26519esac
26520    OBJDUMP=$ac_ct_OBJDUMP
26521  fi
26522fi
26523
26524if test "x$OBJDUMP" != x; then
26525  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26526
26527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26528
26529  # First separate the path from the arguments. This will split at the first
26530  # space.
26531  complete="$OBJDUMP"
26532  path="${complete%% *}"
26533  tmp="$complete EOL"
26534  arguments="${tmp#* }"
26535
26536  # Input might be given as Windows format, start by converting to
26537  # unix format.
26538  new_path=`$CYGPATH -u "$path"`
26539
26540  # Now try to locate executable using which
26541  new_path=`$WHICH "$new_path" 2> /dev/null`
26542  # bat and cmd files are not always considered executable in cygwin causing which
26543  # to not find them
26544  if test "x$new_path" = x \
26545           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26546           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26547    new_path=`$CYGPATH -u "$path"`
26548  fi
26549  if test "x$new_path" = x; then
26550    # Oops. Which didn't find the executable.
26551    # The splitting of arguments from the executable at a space might have been incorrect,
26552    # since paths with space are more likely in Windows. Give it another try with the whole
26553    # argument.
26554    path="$complete"
26555    arguments="EOL"
26556    new_path=`$CYGPATH -u "$path"`
26557    new_path=`$WHICH "$new_path" 2> /dev/null`
26558    # bat and cmd files are not always considered executable in cygwin causing which
26559    # to not find them
26560    if test "x$new_path" = x \
26561             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26562             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26563      new_path=`$CYGPATH -u "$path"`
26564    fi
26565    if test "x$new_path" = x; then
26566      # It's still not found. Now this is an unrecoverable error.
26567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26568$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26569      has_space=`$ECHO "$complete" | $GREP " "`
26570      if test "x$has_space" != x; then
26571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26573      fi
26574      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26575    fi
26576  fi
26577
26578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26581  # "foo.exe" is OK but "foo" is an error.
26582  #
26583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26584  # It is also a way to make sure we got the proper file name for the real test later on.
26585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26586  if test "x$test_shortpath" = x; then
26587    # Short path failed, file does not exist as specified.
26588    # Try adding .exe or .cmd
26589    if test -f "${new_path}.exe"; then
26590       input_to_shortpath="${new_path}.exe"
26591    elif test -f "${new_path}.cmd"; then
26592       input_to_shortpath="${new_path}.cmd"
26593    else
26594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26595$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26598      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26599    fi
26600  else
26601    input_to_shortpath="$new_path"
26602  fi
26603
26604  # Call helper function which possibly converts this using DOS-style short mode.
26605  # If so, the updated path is stored in $new_path.
26606  new_path="$input_to_shortpath"
26607
26608  input_path="$input_to_shortpath"
26609  # Check if we need to convert this using DOS-style short mode. If the path
26610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26611  # take no chances and rewrite it.
26612  # Note: m4 eats our [], so we need to use [ and ] instead.
26613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26614  if test "x$has_forbidden_chars" != x; then
26615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26619      # Going to short mode and back again did indeed matter. Since short mode is
26620      # case insensitive, let's make it lowercase to improve readability.
26621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26622      # Now convert it back to Unix-stile (cygpath)
26623      input_path=`$CYGPATH -u "$shortmode_path"`
26624      new_path="$input_path"
26625    fi
26626  fi
26627
26628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26629  if test "x$test_cygdrive_prefix" = x; then
26630    # As a simple fix, exclude /usr/bin since it's not a real path.
26631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26633      # a path prefixed by /cygdrive for fixpath to work.
26634      new_path="$CYGWIN_ROOT_PATH$input_path"
26635    fi
26636  fi
26637
26638  # remove trailing .exe if any
26639  new_path="${new_path/%.exe/}"
26640
26641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26642
26643  # First separate the path from the arguments. This will split at the first
26644  # space.
26645  complete="$OBJDUMP"
26646  path="${complete%% *}"
26647  tmp="$complete EOL"
26648  arguments="${tmp#* }"
26649
26650  # Input might be given as Windows format, start by converting to
26651  # unix format.
26652  new_path="$path"
26653
26654  windows_path="$new_path"
26655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26656    unix_path=`$CYGPATH -u "$windows_path"`
26657    new_path="$unix_path"
26658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26660    new_path="$unix_path"
26661  fi
26662
26663
26664  # Now try to locate executable using which
26665  new_path=`$WHICH "$new_path" 2> /dev/null`
26666
26667  if test "x$new_path" = x; then
26668    # Oops. Which didn't find the executable.
26669    # The splitting of arguments from the executable at a space might have been incorrect,
26670    # since paths with space are more likely in Windows. Give it another try with the whole
26671    # argument.
26672    path="$complete"
26673    arguments="EOL"
26674    new_path="$path"
26675
26676  windows_path="$new_path"
26677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26678    unix_path=`$CYGPATH -u "$windows_path"`
26679    new_path="$unix_path"
26680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26682    new_path="$unix_path"
26683  fi
26684
26685
26686    new_path=`$WHICH "$new_path" 2> /dev/null`
26687
26688    if test "x$new_path" = x; then
26689      # It's still not found. Now this is an unrecoverable error.
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26691$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26692      has_space=`$ECHO "$complete" | $GREP " "`
26693      if test "x$has_space" != x; then
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26696      fi
26697      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26698    fi
26699  fi
26700
26701  # Now new_path has a complete unix path to the binary
26702  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26703    # Keep paths in /bin as-is, but remove trailing .exe if any
26704    new_path="${new_path/%.exe/}"
26705    # Do not save /bin paths to all_fixpath_prefixes!
26706  else
26707    # Not in mixed or Windows style, start by that.
26708    new_path=`cmd //c echo $new_path`
26709
26710  input_path="$new_path"
26711  # Check if we need to convert this using DOS-style short mode. If the path
26712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26713  # take no chances and rewrite it.
26714  # Note: m4 eats our [], so we need to use [ and ] instead.
26715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26716  if test "x$has_forbidden_chars" != x; then
26717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26719  fi
26720
26721    # Output is in $new_path
26722
26723  windows_path="$new_path"
26724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26725    unix_path=`$CYGPATH -u "$windows_path"`
26726    new_path="$unix_path"
26727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26729    new_path="$unix_path"
26730  fi
26731
26732    # remove trailing .exe if any
26733    new_path="${new_path/%.exe/}"
26734
26735    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26736    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26737  fi
26738
26739  else
26740    # We're on a posix platform. Hooray! :)
26741    # First separate the path from the arguments. This will split at the first
26742    # space.
26743    complete="$OBJDUMP"
26744    path="${complete%% *}"
26745    tmp="$complete EOL"
26746    arguments="${tmp#* }"
26747
26748    # Cannot rely on the command "which" here since it doesn't always work.
26749    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26750    if test -z "$is_absolute_path"; then
26751      # Path to executable is not absolute. Find it.
26752      IFS_save="$IFS"
26753      IFS=:
26754      for p in $PATH; do
26755        if test -f "$p/$path" && test -x "$p/$path"; then
26756          new_path="$p/$path"
26757          break
26758        fi
26759      done
26760      IFS="$IFS_save"
26761    else
26762      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26763$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26764      new_path="$path"
26765    fi
26766
26767    if test "x$new_path" = x; then
26768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26769$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26770        has_space=`$ECHO "$complete" | $GREP " "`
26771        if test "x$has_space" != x; then
26772          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26774        fi
26775        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26776      fi
26777  fi
26778
26779      # Now join together the path and the arguments once again
26780      if test "x$arguments" != xEOL; then
26781        new_complete="$new_path ${arguments% *}"
26782      else
26783        new_complete="$new_path"
26784      fi
26785
26786  if test "x$complete" != "x$new_complete"; then
26787      OBJDUMP="$new_complete"
26788      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26789$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26790    fi
26791
26792fi
26793
26794if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26795   # Extract the first word of "lipo", so it can be a program name with args.
26796set dummy lipo; ac_word=$2
26797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26798$as_echo_n "checking for $ac_word... " >&6; }
26799if test "${ac_cv_path_LIPO+set}" = set; then :
26800  $as_echo_n "(cached) " >&6
26801else
26802  case $LIPO in
26803  [\\/]* | ?:[\\/]*)
26804  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26805  ;;
26806  *)
26807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26808for as_dir in $PATH
26809do
26810  IFS=$as_save_IFS
26811  test -z "$as_dir" && as_dir=.
26812    for ac_exec_ext in '' $ac_executable_extensions; do
26813  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26814    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26816    break 2
26817  fi
26818done
26819  done
26820IFS=$as_save_IFS
26821
26822  ;;
26823esac
26824fi
26825LIPO=$ac_cv_path_LIPO
26826if test -n "$LIPO"; then
26827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26828$as_echo "$LIPO" >&6; }
26829else
26830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26831$as_echo "no" >&6; }
26832fi
26833
26834
26835
26836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26837
26838  # First separate the path from the arguments. This will split at the first
26839  # space.
26840  complete="$LIPO"
26841  path="${complete%% *}"
26842  tmp="$complete EOL"
26843  arguments="${tmp#* }"
26844
26845  # Input might be given as Windows format, start by converting to
26846  # unix format.
26847  new_path=`$CYGPATH -u "$path"`
26848
26849  # Now try to locate executable using which
26850  new_path=`$WHICH "$new_path" 2> /dev/null`
26851  # bat and cmd files are not always considered executable in cygwin causing which
26852  # to not find them
26853  if test "x$new_path" = x \
26854           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26855           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26856    new_path=`$CYGPATH -u "$path"`
26857  fi
26858  if test "x$new_path" = x; then
26859    # Oops. Which didn't find the executable.
26860    # The splitting of arguments from the executable at a space might have been incorrect,
26861    # since paths with space are more likely in Windows. Give it another try with the whole
26862    # argument.
26863    path="$complete"
26864    arguments="EOL"
26865    new_path=`$CYGPATH -u "$path"`
26866    new_path=`$WHICH "$new_path" 2> /dev/null`
26867    # bat and cmd files are not always considered executable in cygwin causing which
26868    # to not find them
26869    if test "x$new_path" = x \
26870             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26871             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26872      new_path=`$CYGPATH -u "$path"`
26873    fi
26874    if test "x$new_path" = x; then
26875      # It's still not found. Now this is an unrecoverable error.
26876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26877$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26878      has_space=`$ECHO "$complete" | $GREP " "`
26879      if test "x$has_space" != x; then
26880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26882      fi
26883      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26884    fi
26885  fi
26886
26887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26890  # "foo.exe" is OK but "foo" is an error.
26891  #
26892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26893  # It is also a way to make sure we got the proper file name for the real test later on.
26894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26895  if test "x$test_shortpath" = x; then
26896    # Short path failed, file does not exist as specified.
26897    # Try adding .exe or .cmd
26898    if test -f "${new_path}.exe"; then
26899       input_to_shortpath="${new_path}.exe"
26900    elif test -f "${new_path}.cmd"; then
26901       input_to_shortpath="${new_path}.cmd"
26902    else
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26904$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26907      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26908    fi
26909  else
26910    input_to_shortpath="$new_path"
26911  fi
26912
26913  # Call helper function which possibly converts this using DOS-style short mode.
26914  # If so, the updated path is stored in $new_path.
26915  new_path="$input_to_shortpath"
26916
26917  input_path="$input_to_shortpath"
26918  # Check if we need to convert this using DOS-style short mode. If the path
26919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26920  # take no chances and rewrite it.
26921  # Note: m4 eats our [], so we need to use [ and ] instead.
26922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26923  if test "x$has_forbidden_chars" != x; then
26924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26928      # Going to short mode and back again did indeed matter. Since short mode is
26929      # case insensitive, let's make it lowercase to improve readability.
26930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26931      # Now convert it back to Unix-stile (cygpath)
26932      input_path=`$CYGPATH -u "$shortmode_path"`
26933      new_path="$input_path"
26934    fi
26935  fi
26936
26937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26938  if test "x$test_cygdrive_prefix" = x; then
26939    # As a simple fix, exclude /usr/bin since it's not a real path.
26940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26942      # a path prefixed by /cygdrive for fixpath to work.
26943      new_path="$CYGWIN_ROOT_PATH$input_path"
26944    fi
26945  fi
26946
26947  # remove trailing .exe if any
26948  new_path="${new_path/%.exe/}"
26949
26950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26951
26952  # First separate the path from the arguments. This will split at the first
26953  # space.
26954  complete="$LIPO"
26955  path="${complete%% *}"
26956  tmp="$complete EOL"
26957  arguments="${tmp#* }"
26958
26959  # Input might be given as Windows format, start by converting to
26960  # unix format.
26961  new_path="$path"
26962
26963  windows_path="$new_path"
26964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26965    unix_path=`$CYGPATH -u "$windows_path"`
26966    new_path="$unix_path"
26967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26969    new_path="$unix_path"
26970  fi
26971
26972
26973  # Now try to locate executable using which
26974  new_path=`$WHICH "$new_path" 2> /dev/null`
26975
26976  if test "x$new_path" = x; then
26977    # Oops. Which didn't find the executable.
26978    # The splitting of arguments from the executable at a space might have been incorrect,
26979    # since paths with space are more likely in Windows. Give it another try with the whole
26980    # argument.
26981    path="$complete"
26982    arguments="EOL"
26983    new_path="$path"
26984
26985  windows_path="$new_path"
26986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26987    unix_path=`$CYGPATH -u "$windows_path"`
26988    new_path="$unix_path"
26989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26991    new_path="$unix_path"
26992  fi
26993
26994
26995    new_path=`$WHICH "$new_path" 2> /dev/null`
26996
26997    if test "x$new_path" = x; then
26998      # It's still not found. Now this is an unrecoverable error.
26999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27000$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27001      has_space=`$ECHO "$complete" | $GREP " "`
27002      if test "x$has_space" != x; then
27003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27005      fi
27006      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27007    fi
27008  fi
27009
27010  # Now new_path has a complete unix path to the binary
27011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27012    # Keep paths in /bin as-is, but remove trailing .exe if any
27013    new_path="${new_path/%.exe/}"
27014    # Do not save /bin paths to all_fixpath_prefixes!
27015  else
27016    # Not in mixed or Windows style, start by that.
27017    new_path=`cmd //c echo $new_path`
27018
27019  input_path="$new_path"
27020  # Check if we need to convert this using DOS-style short mode. If the path
27021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27022  # take no chances and rewrite it.
27023  # Note: m4 eats our [], so we need to use [ and ] instead.
27024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27025  if test "x$has_forbidden_chars" != x; then
27026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27028  fi
27029
27030    # Output is in $new_path
27031
27032  windows_path="$new_path"
27033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27034    unix_path=`$CYGPATH -u "$windows_path"`
27035    new_path="$unix_path"
27036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27038    new_path="$unix_path"
27039  fi
27040
27041    # remove trailing .exe if any
27042    new_path="${new_path/%.exe/}"
27043
27044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27046  fi
27047
27048  else
27049    # We're on a posix platform. Hooray! :)
27050    # First separate the path from the arguments. This will split at the first
27051    # space.
27052    complete="$LIPO"
27053    path="${complete%% *}"
27054    tmp="$complete EOL"
27055    arguments="${tmp#* }"
27056
27057    # Cannot rely on the command "which" here since it doesn't always work.
27058    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27059    if test -z "$is_absolute_path"; then
27060      # Path to executable is not absolute. Find it.
27061      IFS_save="$IFS"
27062      IFS=:
27063      for p in $PATH; do
27064        if test -f "$p/$path" && test -x "$p/$path"; then
27065          new_path="$p/$path"
27066          break
27067        fi
27068      done
27069      IFS="$IFS_save"
27070    else
27071      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27072$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27073      new_path="$path"
27074    fi
27075
27076    if test "x$new_path" = x; then
27077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27078$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27079        has_space=`$ECHO "$complete" | $GREP " "`
27080        if test "x$has_space" != x; then
27081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27083        fi
27084        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27085      fi
27086  fi
27087
27088      # Now join together the path and the arguments once again
27089      if test "x$arguments" != xEOL; then
27090        new_complete="$new_path ${arguments% *}"
27091      else
27092        new_complete="$new_path"
27093      fi
27094
27095  if test "x$complete" != "x$new_complete"; then
27096      LIPO="$new_complete"
27097      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27098$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27099    fi
27100
27101fi
27102
27103# Restore old path without tools dir
27104PATH="$OLD_PATH"
27105
27106
27107# FIXME: Currently we must test this after paths but before flags. Fix!
27108
27109# And we can test some aspects on the target using configure macros.
27110
27111
27112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27113$as_echo_n "checking for ANSI C header files... " >&6; }
27114if test "${ac_cv_header_stdc+set}" = set; then :
27115  $as_echo_n "(cached) " >&6
27116else
27117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27118/* end confdefs.h.  */
27119#include <stdlib.h>
27120#include <stdarg.h>
27121#include <string.h>
27122#include <float.h>
27123
27124int
27125main ()
27126{
27127
27128  ;
27129  return 0;
27130}
27131_ACEOF
27132if ac_fn_cxx_try_compile "$LINENO"; then :
27133  ac_cv_header_stdc=yes
27134else
27135  ac_cv_header_stdc=no
27136fi
27137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27138
27139if test $ac_cv_header_stdc = yes; then
27140  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27142/* end confdefs.h.  */
27143#include <string.h>
27144
27145_ACEOF
27146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27147  $EGREP "memchr" >/dev/null 2>&1; then :
27148
27149else
27150  ac_cv_header_stdc=no
27151fi
27152rm -f conftest*
27153
27154fi
27155
27156if test $ac_cv_header_stdc = yes; then
27157  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27159/* end confdefs.h.  */
27160#include <stdlib.h>
27161
27162_ACEOF
27163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27164  $EGREP "free" >/dev/null 2>&1; then :
27165
27166else
27167  ac_cv_header_stdc=no
27168fi
27169rm -f conftest*
27170
27171fi
27172
27173if test $ac_cv_header_stdc = yes; then
27174  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27175  if test "$cross_compiling" = yes; then :
27176  :
27177else
27178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27179/* end confdefs.h.  */
27180#include <ctype.h>
27181#include <stdlib.h>
27182#if ((' ' & 0x0FF) == 0x020)
27183# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27184# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27185#else
27186# define ISLOWER(c) \
27187		   (('a' <= (c) && (c) <= 'i') \
27188		     || ('j' <= (c) && (c) <= 'r') \
27189		     || ('s' <= (c) && (c) <= 'z'))
27190# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27191#endif
27192
27193#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27194int
27195main ()
27196{
27197  int i;
27198  for (i = 0; i < 256; i++)
27199    if (XOR (islower (i), ISLOWER (i))
27200	|| toupper (i) != TOUPPER (i))
27201      return 2;
27202  return 0;
27203}
27204_ACEOF
27205if ac_fn_cxx_try_run "$LINENO"; then :
27206
27207else
27208  ac_cv_header_stdc=no
27209fi
27210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27211  conftest.$ac_objext conftest.beam conftest.$ac_ext
27212fi
27213
27214fi
27215fi
27216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27217$as_echo "$ac_cv_header_stdc" >&6; }
27218if test $ac_cv_header_stdc = yes; then
27219
27220$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27221
27222fi
27223
27224# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27225for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27226		  inttypes.h stdint.h unistd.h
27227do :
27228  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27229ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27230"
27231if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27232  cat >>confdefs.h <<_ACEOF
27233#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27234_ACEOF
27235
27236fi
27237
27238done
27239
27240
27241
27242###############################################################################
27243#
27244# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27245# (The JVM can use 32 or 64 bit Java pointers but that decision
27246# is made at runtime.)
27247#
27248if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27249  # Always specify -m flags on Solaris
27250
27251  # keep track of c/cxx flags that we added outselves...
27252  #   to prevent emitting warning...
27253  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27254  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27255  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27256
27257  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27258  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27259  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27260
27261  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27262  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27263  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27264
27265elif test "x$COMPILE_TYPE" = xreduced; then
27266  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27267    # Specify -m if running reduced on other Posix platforms
27268
27269  # keep track of c/cxx flags that we added outselves...
27270  #   to prevent emitting warning...
27271  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27272  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27273  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27274
27275  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27276  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27277  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27278
27279  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27280  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27281  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27282
27283  fi
27284fi
27285
27286# Make compilation sanity check
27287for ac_header in stdio.h
27288do :
27289  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27290if test "x$ac_cv_header_stdio_h" = x""yes; then :
27291  cat >>confdefs.h <<_ACEOF
27292#define HAVE_STDIO_H 1
27293_ACEOF
27294
27295else
27296
27297  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27298$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27299  if test "x$COMPILE_TYPE" = xreduced; then
27300    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27301$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27302  elif test "x$COMPILE_TYPE" = xcross; then
27303    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27304$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27305  fi
27306  as_fn_error $? "Cannot continue." "$LINENO" 5
27307
27308fi
27309
27310done
27311
27312
27313# The cast to long int works around a bug in the HP C Compiler
27314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27316# This bug is HP SR number 8606223364.
27317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27318$as_echo_n "checking size of int *... " >&6; }
27319if test "${ac_cv_sizeof_int_p+set}" = set; then :
27320  $as_echo_n "(cached) " >&6
27321else
27322  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27323
27324else
27325  if test "$ac_cv_type_int_p" = yes; then
27326     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27328as_fn_error 77 "cannot compute sizeof (int *)
27329See \`config.log' for more details" "$LINENO" 5 ; }
27330   else
27331     ac_cv_sizeof_int_p=0
27332   fi
27333fi
27334
27335fi
27336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27337$as_echo "$ac_cv_sizeof_int_p" >&6; }
27338
27339
27340
27341cat >>confdefs.h <<_ACEOF
27342#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27343_ACEOF
27344
27345
27346
27347if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27348  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27349  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27350fi
27351
27352if test "x$SIZEOF_INT_P" = x; then
27353    # The test failed, lets stick to the assumed value.
27354    { $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
27355$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27356else
27357    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27358
27359    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27360        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
27361    fi
27362fi
27363
27364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27365$as_echo_n "checking for target address size... " >&6; }
27366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27367$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27368
27369
27370###############################################################################
27371#
27372# Is the target little of big endian?
27373#
27374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27375$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27376if test "${ac_cv_c_bigendian+set}" = set; then :
27377  $as_echo_n "(cached) " >&6
27378else
27379  ac_cv_c_bigendian=unknown
27380    # See if we're dealing with a universal compiler.
27381    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27382/* end confdefs.h.  */
27383#ifndef __APPLE_CC__
27384	       not a universal capable compiler
27385	     #endif
27386	     typedef int dummy;
27387
27388_ACEOF
27389if ac_fn_cxx_try_compile "$LINENO"; then :
27390
27391	# Check for potential -arch flags.  It is not universal unless
27392	# there are at least two -arch flags with different values.
27393	ac_arch=
27394	ac_prev=
27395	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27396	 if test -n "$ac_prev"; then
27397	   case $ac_word in
27398	     i?86 | x86_64 | ppc | ppc64)
27399	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27400		 ac_arch=$ac_word
27401	       else
27402		 ac_cv_c_bigendian=universal
27403		 break
27404	       fi
27405	       ;;
27406	   esac
27407	   ac_prev=
27408	 elif test "x$ac_word" = "x-arch"; then
27409	   ac_prev=arch
27410	 fi
27411       done
27412fi
27413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27414    if test $ac_cv_c_bigendian = unknown; then
27415      # See if sys/param.h defines the BYTE_ORDER macro.
27416      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27417/* end confdefs.h.  */
27418#include <sys/types.h>
27419	     #include <sys/param.h>
27420
27421int
27422main ()
27423{
27424#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27425		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27426		     && LITTLE_ENDIAN)
27427	      bogus endian macros
27428	     #endif
27429
27430  ;
27431  return 0;
27432}
27433_ACEOF
27434if ac_fn_cxx_try_compile "$LINENO"; then :
27435  # It does; now see whether it defined to BIG_ENDIAN or not.
27436	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27437/* end confdefs.h.  */
27438#include <sys/types.h>
27439		#include <sys/param.h>
27440
27441int
27442main ()
27443{
27444#if BYTE_ORDER != BIG_ENDIAN
27445		 not big endian
27446		#endif
27447
27448  ;
27449  return 0;
27450}
27451_ACEOF
27452if ac_fn_cxx_try_compile "$LINENO"; then :
27453  ac_cv_c_bigendian=yes
27454else
27455  ac_cv_c_bigendian=no
27456fi
27457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27458fi
27459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27460    fi
27461    if test $ac_cv_c_bigendian = unknown; then
27462      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27463      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27464/* end confdefs.h.  */
27465#include <limits.h>
27466
27467int
27468main ()
27469{
27470#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27471	      bogus endian macros
27472	     #endif
27473
27474  ;
27475  return 0;
27476}
27477_ACEOF
27478if ac_fn_cxx_try_compile "$LINENO"; then :
27479  # It does; now see whether it defined to _BIG_ENDIAN or not.
27480	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27481/* end confdefs.h.  */
27482#include <limits.h>
27483
27484int
27485main ()
27486{
27487#ifndef _BIG_ENDIAN
27488		 not big endian
27489		#endif
27490
27491  ;
27492  return 0;
27493}
27494_ACEOF
27495if ac_fn_cxx_try_compile "$LINENO"; then :
27496  ac_cv_c_bigendian=yes
27497else
27498  ac_cv_c_bigendian=no
27499fi
27500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27501fi
27502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27503    fi
27504    if test $ac_cv_c_bigendian = unknown; then
27505      # Compile a test program.
27506      if test "$cross_compiling" = yes; then :
27507  # Try to guess by grepping values from an object file.
27508	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27509/* end confdefs.h.  */
27510short int ascii_mm[] =
27511		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27512		short int ascii_ii[] =
27513		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27514		int use_ascii (int i) {
27515		  return ascii_mm[i] + ascii_ii[i];
27516		}
27517		short int ebcdic_ii[] =
27518		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27519		short int ebcdic_mm[] =
27520		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27521		int use_ebcdic (int i) {
27522		  return ebcdic_mm[i] + ebcdic_ii[i];
27523		}
27524		extern int foo;
27525
27526int
27527main ()
27528{
27529return use_ascii (foo) == use_ebcdic (foo);
27530  ;
27531  return 0;
27532}
27533_ACEOF
27534if ac_fn_cxx_try_compile "$LINENO"; then :
27535  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27536	      ac_cv_c_bigendian=yes
27537	    fi
27538	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27539	      if test "$ac_cv_c_bigendian" = unknown; then
27540		ac_cv_c_bigendian=no
27541	      else
27542		# finding both strings is unlikely to happen, but who knows?
27543		ac_cv_c_bigendian=unknown
27544	      fi
27545	    fi
27546fi
27547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27548else
27549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27550/* end confdefs.h.  */
27551$ac_includes_default
27552int
27553main ()
27554{
27555
27556	     /* Are we little or big endian?  From Harbison&Steele.  */
27557	     union
27558	     {
27559	       long int l;
27560	       char c[sizeof (long int)];
27561	     } u;
27562	     u.l = 1;
27563	     return u.c[sizeof (long int) - 1] == 1;
27564
27565  ;
27566  return 0;
27567}
27568_ACEOF
27569if ac_fn_cxx_try_run "$LINENO"; then :
27570  ac_cv_c_bigendian=no
27571else
27572  ac_cv_c_bigendian=yes
27573fi
27574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27575  conftest.$ac_objext conftest.beam conftest.$ac_ext
27576fi
27577
27578    fi
27579fi
27580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27581$as_echo "$ac_cv_c_bigendian" >&6; }
27582 case $ac_cv_c_bigendian in #(
27583   yes)
27584     ENDIAN="big";; #(
27585   no)
27586     ENDIAN="little" ;; #(
27587   universal)
27588     ENDIAN="universal_endianness"
27589     ;; #(
27590   *)
27591     ENDIAN="unknown" ;;
27592 esac
27593
27594
27595if test "x$ENDIAN" = xuniversal_endianness; then
27596    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27597fi
27598if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27599    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
27600fi
27601
27602
27603# Configure flags for the tools
27604
27605
27606###############################################################################
27607#
27608# How to compile shared libraries.
27609#
27610
27611if test "x$GCC" = xyes; then
27612    COMPILER_NAME=gcc
27613    PICFLAG="-fPIC"
27614    LIBRARY_PREFIX=lib
27615    SHARED_LIBRARY='lib$1.so'
27616    STATIC_LIBRARY='lib$1.a'
27617    SHARED_LIBRARY_FLAGS="-shared"
27618    SHARED_LIBRARY_SUFFIX='.so'
27619    STATIC_LIBRARY_SUFFIX='.a'
27620    OBJ_SUFFIX='.o'
27621    EXE_SUFFIX=''
27622    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27623    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27624    C_FLAG_REORDER=''
27625    CXX_FLAG_REORDER=''
27626    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27627    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27628    LD="$CC"
27629    LDEXE="$CC"
27630    LDCXX="$CXX"
27631    LDEXECXX="$CXX"
27632    POST_STRIP_CMD="$STRIP -g"
27633
27634    # Linking is different on MacOSX
27635    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27636        # Might change in the future to clang.
27637        COMPILER_NAME=gcc
27638        SHARED_LIBRARY='lib$1.dylib'
27639        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27640        SHARED_LIBRARY_SUFFIX='.dylib'
27641        EXE_SUFFIX=''
27642        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27643        SET_SHARED_LIBRARY_MAPFILE=''
27644        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27645        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27646        POST_STRIP_CMD="$STRIP -S"
27647    fi
27648else
27649    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27650        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27651        COMPILER_NAME=ossc
27652        PICFLAG="-KPIC"
27653        LIBRARY_PREFIX=lib
27654        SHARED_LIBRARY='lib$1.so'
27655        STATIC_LIBRARY='lib$1.a'
27656        SHARED_LIBRARY_FLAGS="-G"
27657        SHARED_LIBRARY_SUFFIX='.so'
27658        STATIC_LIBRARY_SUFFIX='.a'
27659        OBJ_SUFFIX='.o'
27660        EXE_SUFFIX=''
27661        SET_SHARED_LIBRARY_NAME=''
27662        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27663	C_FLAG_REORDER='-xF'
27664	CXX_FLAG_REORDER='-xF'
27665        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27666        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27667        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27668        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27669        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27670        POST_STRIP_CMD="$STRIP -x"
27671        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27672    fi
27673    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27674        # If it is not gcc, then assume it is the MS Visual Studio compiler
27675        COMPILER_NAME=cl
27676        PICFLAG=""
27677        LIBRARY_PREFIX=
27678        SHARED_LIBRARY='$1.dll'
27679        STATIC_LIBRARY='$1.lib'
27680        SHARED_LIBRARY_FLAGS="-LD"
27681        SHARED_LIBRARY_SUFFIX='.dll'
27682        STATIC_LIBRARY_SUFFIX='.lib'
27683        OBJ_SUFFIX='.obj'
27684        EXE_SUFFIX='.exe'
27685        SET_SHARED_LIBRARY_NAME=''
27686        SET_SHARED_LIBRARY_MAPFILE=''
27687        SET_SHARED_LIBRARY_ORIGIN=''
27688        SET_EXECUTABLE_ORIGIN=''
27689    fi
27690fi
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709# The (cross) compiler is now configured, we can now test capabilities
27710# of the target platform.
27711
27712
27713
27714###############################################################################
27715#
27716# Setup the opt flags for different compilers
27717# and different operating systems.
27718#
27719
27720#
27721# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27722#
27723if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27724    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27725    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27726    CFLAGS="$CFLAGS -mstackrealign"
27727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27728$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27729    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27730/* end confdefs.h.  */
27731int main() { return 0; }
27732_ACEOF
27733if ac_fn_cxx_try_link "$LINENO"; then :
27734
27735		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27736$as_echo "yes" >&6; }
27737
27738else
27739
27740		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27741$as_echo "no" >&6; }
27742	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27743
27744fi
27745rm -f core conftest.err conftest.$ac_objext \
27746    conftest$ac_exeext conftest.$ac_ext
27747fi
27748
27749C_FLAG_DEPS="-MMD -MF"
27750CXX_FLAG_DEPS="-MMD -MF"
27751
27752case $COMPILER_TYPE in
27753  CC )
27754    D_FLAG="-g"
27755    case $COMPILER_NAME in
27756      gcc )
27757      	case $OPENJDK_TARGET_OS in
27758	  macosx )
27759	    # On MacOSX we optimize for size, something
27760	    # we should do for all platforms?
27761	    C_O_FLAG_HI="-Os"
27762	    C_O_FLAG_NORM="-Os"
27763	    C_O_FLAG_NONE=""
27764	    ;;
27765	  *)
27766	    C_O_FLAG_HI="-O3"
27767	    C_O_FLAG_NORM="-O2"
27768	    C_O_FLAG_NONE="-O0"
27769	    CFLAGS_DEBUG_SYMBOLS="-g"
27770	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27771	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27772	       CFLAGS_DEBUG_SYMBOLS="-g1"
27773	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27774	    fi
27775	    ;;
27776	esac
27777        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27778        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27779        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27780        ;;
27781      ossc )
27782        #
27783        # Forte has different names for this with their C++ compiler...
27784        #
27785        C_FLAG_DEPS="-xMMD -xMF"
27786        CXX_FLAG_DEPS="-xMMD -xMF"
27787
27788        # Extra options used with HIGHEST
27789        #
27790        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27791        #          done with care, there are some assumptions below that need to
27792        #          be understood about the use of pointers, and IEEE behavior.
27793        #
27794        # Use non-standard floating point mode (not IEEE 754)
27795        CC_HIGHEST="$CC_HIGHEST -fns"
27796        # Do some simplification of floating point arithmetic (not IEEE 754)
27797        CC_HIGHEST="$CC_HIGHEST -fsimple"
27798        # Use single precision floating point with 'float'
27799        CC_HIGHEST="$CC_HIGHEST -fsingle"
27800        # Assume memory references via basic pointer types do not alias
27801        #   (Source with excessing pointer casting and data access with mixed
27802        #    pointer types are not recommended)
27803        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27804        # Use intrinsic or inline versions for math/std functions
27805        #   (If you expect perfect errno behavior, do not use this)
27806        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27807        # Loop data dependency optimizations (need -xO3 or higher)
27808        CC_HIGHEST="$CC_HIGHEST -xdepend"
27809        # Pointer parameters to functions do not overlap
27810        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27811        #    If you pass in multiple pointers to the same data, do not use this)
27812        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27813        # Inline some library routines
27814        #   (If you expect perfect errno behavior, do not use this)
27815        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27816        # Use optimized math routines
27817        #   (If you expect perfect errno behavior, do not use this)
27818        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27819        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27820
27821        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27822          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27823          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27824        fi
27825
27826        case $OPENJDK_TARGET_CPU_ARCH in
27827          x86)
27828            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27829            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27830            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27831            C_O_FLAG_NONE="-xregs=no%frameptr"
27832            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27833            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27834            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27835            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27836            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27837               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27838               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27839            fi
27840            ;;
27841          sparc)
27842            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27843            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27844            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27845            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27846            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27847            C_O_FLAG_NONE=""
27848            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27849            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27850            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27851            CXX_O_FLAG_NONE=""
27852            ;;
27853        esac
27854
27855    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27856    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27857    esac
27858    ;;
27859  CL )
27860    D_FLAG=
27861    C_O_FLAG_HIGHEST="-O2"
27862    C_O_FLAG_HI="-O1"
27863    C_O_FLAG_NORM="-O1"
27864    C_O_FLAG_NONE="-Od"
27865    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27866    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27867    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27868    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27869    ;;
27870esac
27871
27872if test -z "$C_O_FLAG_HIGHEST"; then
27873   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27874fi
27875
27876if test -z "$CXX_O_FLAG_HIGHEST"; then
27877   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27878fi
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27894   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27895$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27896fi
27897
27898if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27899   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27900$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27901fi
27902
27903if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27904   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27905$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27906fi
27907
27908
27909# Check whether --with-extra-cflags was given.
27910if test "${with_extra_cflags+set}" = set; then :
27911  withval=$with_extra_cflags;
27912fi
27913
27914
27915
27916# Check whether --with-extra-cxxflags was given.
27917if test "${with_extra_cxxflags+set}" = set; then :
27918  withval=$with_extra_cxxflags;
27919fi
27920
27921
27922
27923# Check whether --with-extra-ldflags was given.
27924if test "${with_extra_ldflags+set}" = set; then :
27925  withval=$with_extra_ldflags;
27926fi
27927
27928
27929CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27930CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27931LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27932
27933# Hotspot needs these set in their legacy form
27934LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27935LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27936LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27937
27938
27939
27940
27941
27942###############################################################################
27943#
27944# Now setup the CFLAGS and LDFLAGS for the JDK build.
27945# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27946#
27947case $COMPILER_NAME in
27948      gcc )
27949      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27950                          -pipe \
27951                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27952	  case $OPENJDK_TARGET_CPU_ARCH in
27953	  arm )
27954            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27955	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27956	  ;;
27957	  ppc )
27958            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27959	  ;;
27960	  * )
27961	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27962	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27963          ;;
27964	  esac
27965          ;;
27966      ossc )
27967          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27968          case $OPENJDK_TARGET_CPU_ARCH in
27969          x86 )
27970            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27971       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27972          ;;
27973          esac
27974
27975      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27976      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27977
27978          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27979          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27980          ;;
27981      cl )
27982          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27983               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27984	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27985	       -DWIN32 -DIAL"
27986          case $OPENJDK_TARGET_CPU in
27987              x86 )
27988                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27989                  ;;
27990              x86_64 )
27991                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27992                  ;;
27993          esac
27994          ;;
27995esac
27996
27997###############################################################################
27998
27999CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28000
28001# The package path is used only on macosx?
28002PACKAGE_PATH=/opt/local
28003
28004
28005if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28006    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28007    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28008    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28009    #   Note: -Dmacro         is the same as    #define macro 1
28010    #         -Dmacro=	    is the same as    #define macro
28011    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28012        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28013    else
28014        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28015    fi
28016else
28017    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28018fi
28019if test "x$OPENJDK_TARGET_OS" = xlinux; then
28020    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28021fi
28022if test "x$OPENJDK_TARGET_OS" = xwindows; then
28023    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28024fi
28025if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28026    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28027fi
28028if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28029    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28030fi
28031if test "x$OPENJDK_TARGET_OS" = xbsd; then
28032    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28033fi
28034if test "x$DEBUG_LEVEL" = xrelease; then
28035    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28036    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28037        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28038    fi
28039else
28040    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28041fi
28042
28043CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28044CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28045
28046CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28047        -I${JDK_OUTPUTDIR}/include \
28048        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28049        -I${JDK_TOPDIR}/src/share/javavm/export \
28050        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28051        -I${JDK_TOPDIR}/src/share/native/common \
28052        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28053
28054# The shared libraries are compiled using the picflag.
28055CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28056CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28057
28058# Executable flags
28059CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28060CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28061
28062# Now this is odd. The JDK native libraries have to link against libjvm.so
28063# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28064# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28065# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28066# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28067# libraries will link to whatever is in memory. Yuck.
28068#
28069# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28070if test "x$COMPILER_NAME" = xcl; then
28071    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28072    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28073        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28074    fi
28075    # TODO: make -debug optional "--disable-full-debug-symbols"
28076    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28077    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28078    LDFLAGS_JDKLIB_SUFFIX=""
28079    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28080        LDFLAGS_STACK_SIZE=1048576
28081    else
28082        LDFLAGS_STACK_SIZE=327680
28083    fi
28084    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28085else
28086    if test "x$COMPILER_NAME" = xgcc; then
28087        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28088        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28089        if test -n "$HAS_GNU_HASH"; then
28090            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28091        fi
28092        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28093          # And since we now know that the linker is gnu, then add -z defs, to forbid
28094          # undefined symbols in object files.
28095          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28096          if test "x$DEBUG_LEVEL" = "xrelease"; then
28097              # When building release libraries, tell the linker optimize them.
28098              # Should this be supplied to the OSS linker as well?
28099              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28100          fi
28101        fi
28102    fi
28103    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28104                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28105
28106    # On some platforms (mac) the linker warns about non existing -L dirs.
28107    # Add server first if available. Linking aginst client does not always produce the same results.
28108    # Only add client dir if client is being built. Default to server for other variants.
28109    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28110        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28111    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28112        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28113    else
28114        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28115    fi
28116
28117    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28118    if test "x$COMPILER_NAME" = xossc; then
28119        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28120    fi
28121
28122    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28123    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28124        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28125    fi
28126fi
28127
28128# Adjust flags according to debug level.
28129case $DEBUG_LEVEL in
28130      fastdebug )
28131              CFLAGS="$CFLAGS $D_FLAG"
28132              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28133              ;;
28134      slowdebug )
28135              CFLAGS="$CFLAGS $D_FLAG"
28136	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28137	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28138	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28139	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28140              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28141              ;;
28142esac
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158# Setup debug symbols (need objcopy from the toolchain for that)
28159
28160#
28161# ENABLE_DEBUG_SYMBOLS
28162# This must be done after the toolchain is setup, since we're looking at objcopy.
28163#
28164# Check whether --enable-debug-symbols was given.
28165if test "${enable_debug_symbols+set}" = set; then :
28166  enableval=$enable_debug_symbols;
28167fi
28168
28169
28170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28171$as_echo_n "checking if we should generate debug symbols... " >&6; }
28172
28173if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28174   # explicit enabling of enable-debug-symbols and can't find objcopy
28175   #   this is an error
28176   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28177fi
28178
28179if test "x$enable_debug_symbols" = "xyes"; then
28180  ENABLE_DEBUG_SYMBOLS=true
28181elif test "x$enable_debug_symbols" = "xno"; then
28182  ENABLE_DEBUG_SYMBOLS=false
28183else
28184  # default on macosx is false
28185  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28186    ENABLE_DEBUG_SYMBOLS=false
28187  # Default is on if objcopy is found, otherwise off
28188  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28189    ENABLE_DEBUG_SYMBOLS=true
28190  else
28191    ENABLE_DEBUG_SYMBOLS=false
28192  fi
28193fi
28194
28195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28196$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28197
28198#
28199# ZIP_DEBUGINFO_FILES
28200#
28201# Check whether --enable-zip-debug-info was given.
28202if test "${enable_zip_debug_info+set}" = set; then :
28203  enableval=$enable_zip_debug_info;
28204fi
28205
28206
28207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28208$as_echo_n "checking if we should zip debug-info files... " >&6; }
28209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28210$as_echo "${enable_zip_debug_info}" >&6; }
28211
28212if test "x${enable_zip_debug_info}" = "xno"; then
28213   ZIP_DEBUGINFO_FILES=false
28214else
28215   ZIP_DEBUGINFO_FILES=true
28216fi
28217
28218
28219
28220
28221
28222
28223
28224###############################################################################
28225#
28226# Check dependencies for external and internal libraries.
28227#
28228###############################################################################
28229
28230
28231
28232###############################################################################
28233#
28234# OS specific settings that we never will need to probe.
28235#
28236if test "x$OPENJDK_TARGET_OS" = xlinux; then
28237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28238$as_echo_n "checking what is not needed on Linux?... " >&6; }
28239    PULSE_NOT_NEEDED=yes
28240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28241$as_echo "pulse" >&6; }
28242fi
28243
28244if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28246$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28247    ALSA_NOT_NEEDED=yes
28248    PULSE_NOT_NEEDED=yes
28249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28250$as_echo "alsa pulse" >&6; }
28251fi
28252
28253if test "x$OPENJDK_TARGET_OS" = xwindows; then
28254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28255$as_echo_n "checking what is not needed on Windows?... " >&6; }
28256    CUPS_NOT_NEEDED=yes
28257    ALSA_NOT_NEEDED=yes
28258    PULSE_NOT_NEEDED=yes
28259    X11_NOT_NEEDED=yes
28260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28261$as_echo "alsa cups pulse x11" >&6; }
28262fi
28263
28264if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28266$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28267    ALSA_NOT_NEEDED=yes
28268    PULSE_NOT_NEEDED=yes
28269    X11_NOT_NEEDED=yes
28270    FREETYPE2_NOT_NEEDED=yes
28271    # If the java runtime framework is disabled, then we need X11.
28272    # This will be adjusted below.
28273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28274$as_echo "alsa pulse x11" >&6; }
28275fi
28276
28277if test "x$OPENJDK_TARGET_OS" = xbsd; then
28278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28279$as_echo_n "checking what is not needed on bsd?... " >&6; }
28280    ALSA_NOT_NEEDED=yes
28281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28282$as_echo "alsa" >&6; }
28283fi
28284
28285if test "x$OPENJDK" = "xfalse"; then
28286    FREETYPE2_NOT_NEEDED=yes
28287fi
28288
28289if test "x$SUPPORT_HEADFUL" = xno; then
28290    X11_NOT_NEEDED=yes
28291fi
28292
28293###############################################################################
28294#
28295# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28296# that uses this API.
28297#
28298# Check whether --enable-macosx-runtime-support was given.
28299if test "${enable_macosx_runtime_support+set}" = set; then :
28300  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28301else
28302  MACOSX_RUNTIME_SUPPORT="no"
28303fi
28304
28305
28306USE_MACOSX_RUNTIME_SUPPORT=no
28307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28308$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28309if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28310    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28311        MACOSX_RUNTIME_SUPPORT=yes
28312        USE_MACOSX_RUNTIME_SUPPORT=yes
28313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28314$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28315    else
28316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28317$as_echo "yes, but explicitly disabled." >&6; }
28318    fi
28319else
28320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28321$as_echo "no" >&6; }
28322fi
28323
28324if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28326$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28327    X11_NOT_NEEDED=
28328    FREETYPE2_NOT_NEEDED=
28329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28330$as_echo "alsa pulse" >&6; }
28331fi
28332
28333
28334
28335
28336###############################################################################
28337#
28338# Check for X Windows
28339#
28340
28341# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28342# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28343# --x-libraries for the sysroot, if that seems to be correct.
28344if test "x$SYS_ROOT" != "x/"; then
28345  if test "x$x_includes" = xNONE; then
28346    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28347      x_includes="$SYS_ROOT/usr/X11R6/include"
28348    fi
28349  fi
28350  if test "x$x_libraries" = xNONE; then
28351    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28352      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28353    fi
28354  fi
28355fi
28356
28357# Now let autoconf do it's magic
28358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28359$as_echo_n "checking for X... " >&6; }
28360
28361
28362# Check whether --with-x was given.
28363if test "${with_x+set}" = set; then :
28364  withval=$with_x;
28365fi
28366
28367# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28368if test "x$with_x" = xno; then
28369  # The user explicitly disabled X.
28370  have_x=disabled
28371else
28372  case $x_includes,$x_libraries in #(
28373    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28374    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28375  $as_echo_n "(cached) " >&6
28376else
28377  # One or both of the vars are not set, and there is no cached value.
28378ac_x_includes=no ac_x_libraries=no
28379rm -f -r conftest.dir
28380if mkdir conftest.dir; then
28381  cd conftest.dir
28382  cat >Imakefile <<'_ACEOF'
28383incroot:
28384	@echo incroot='${INCROOT}'
28385usrlibdir:
28386	@echo usrlibdir='${USRLIBDIR}'
28387libdir:
28388	@echo libdir='${LIBDIR}'
28389_ACEOF
28390  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28391    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28392    for ac_var in incroot usrlibdir libdir; do
28393      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28394    done
28395    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28396    for ac_extension in a so sl dylib la dll; do
28397      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28398	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28399	ac_im_usrlibdir=$ac_im_libdir; break
28400      fi
28401    done
28402    # Screen out bogus values from the imake configuration.  They are
28403    # bogus both because they are the default anyway, and because
28404    # using them would break gcc on systems where it needs fixed includes.
28405    case $ac_im_incroot in
28406	/usr/include) ac_x_includes= ;;
28407	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28408    esac
28409    case $ac_im_usrlibdir in
28410	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28411	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28412    esac
28413  fi
28414  cd ..
28415  rm -f -r conftest.dir
28416fi
28417
28418# Standard set of common directories for X headers.
28419# Check X11 before X11Rn because it is often a symlink to the current release.
28420ac_x_header_dirs='
28421/usr/X11/include
28422/usr/X11R7/include
28423/usr/X11R6/include
28424/usr/X11R5/include
28425/usr/X11R4/include
28426
28427/usr/include/X11
28428/usr/include/X11R7
28429/usr/include/X11R6
28430/usr/include/X11R5
28431/usr/include/X11R4
28432
28433/usr/local/X11/include
28434/usr/local/X11R7/include
28435/usr/local/X11R6/include
28436/usr/local/X11R5/include
28437/usr/local/X11R4/include
28438
28439/usr/local/include/X11
28440/usr/local/include/X11R7
28441/usr/local/include/X11R6
28442/usr/local/include/X11R5
28443/usr/local/include/X11R4
28444
28445/usr/X386/include
28446/usr/x386/include
28447/usr/XFree86/include/X11
28448
28449/usr/include
28450/usr/local/include
28451/usr/unsupported/include
28452/usr/athena/include
28453/usr/local/x11r5/include
28454/usr/lpp/Xamples/include
28455
28456/usr/openwin/include
28457/usr/openwin/share/include'
28458
28459if test "$ac_x_includes" = no; then
28460  # Guess where to find include files, by looking for Xlib.h.
28461  # First, try using that file with no special directory specified.
28462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28463/* end confdefs.h.  */
28464#include <X11/Xlib.h>
28465_ACEOF
28466if ac_fn_cxx_try_cpp "$LINENO"; then :
28467  # We can compile using X headers with no special include directory.
28468ac_x_includes=
28469else
28470  for ac_dir in $ac_x_header_dirs; do
28471  if test -r "$ac_dir/X11/Xlib.h"; then
28472    ac_x_includes=$ac_dir
28473    break
28474  fi
28475done
28476fi
28477rm -f conftest.err conftest.i conftest.$ac_ext
28478fi # $ac_x_includes = no
28479
28480if test "$ac_x_libraries" = no; then
28481  # Check for the libraries.
28482  # See if we find them without any special options.
28483  # Don't add to $LIBS permanently.
28484  ac_save_LIBS=$LIBS
28485  LIBS="-lX11 $LIBS"
28486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28487/* end confdefs.h.  */
28488#include <X11/Xlib.h>
28489int
28490main ()
28491{
28492XrmInitialize ()
28493  ;
28494  return 0;
28495}
28496_ACEOF
28497if ac_fn_cxx_try_link "$LINENO"; then :
28498  LIBS=$ac_save_LIBS
28499# We can link X programs with no special library path.
28500ac_x_libraries=
28501else
28502  LIBS=$ac_save_LIBS
28503for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28504do
28505  # Don't even attempt the hair of trying to link an X program!
28506  for ac_extension in a so sl dylib la dll; do
28507    if test -r "$ac_dir/libX11.$ac_extension"; then
28508      ac_x_libraries=$ac_dir
28509      break 2
28510    fi
28511  done
28512done
28513fi
28514rm -f core conftest.err conftest.$ac_objext \
28515    conftest$ac_exeext conftest.$ac_ext
28516fi # $ac_x_libraries = no
28517
28518case $ac_x_includes,$ac_x_libraries in #(
28519  no,* | *,no | *\'*)
28520    # Didn't find X, or a directory has "'" in its name.
28521    ac_cv_have_x="have_x=no";; #(
28522  *)
28523    # Record where we found X for the cache.
28524    ac_cv_have_x="have_x=yes\
28525	ac_x_includes='$ac_x_includes'\
28526	ac_x_libraries='$ac_x_libraries'"
28527esac
28528fi
28529;; #(
28530    *) have_x=yes;;
28531  esac
28532  eval "$ac_cv_have_x"
28533fi # $with_x != no
28534
28535if test "$have_x" != yes; then
28536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28537$as_echo "$have_x" >&6; }
28538  no_x=yes
28539else
28540  # If each of the values was on the command line, it overrides each guess.
28541  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28542  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28543  # Update the cache value to reflect the command line values.
28544  ac_cv_have_x="have_x=yes\
28545	ac_x_includes='$x_includes'\
28546	ac_x_libraries='$x_libraries'"
28547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28548$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28549fi
28550
28551if test "$no_x" = yes; then
28552  # Not all programs may use this symbol, but it does not hurt to define it.
28553
28554$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28555
28556  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28557else
28558  if test -n "$x_includes"; then
28559    X_CFLAGS="$X_CFLAGS -I$x_includes"
28560  fi
28561
28562  # It would also be nice to do this for all -L options, not just this one.
28563  if test -n "$x_libraries"; then
28564    X_LIBS="$X_LIBS -L$x_libraries"
28565    # For Solaris; some versions of Sun CC require a space after -R and
28566    # others require no space.  Words are not sufficient . . . .
28567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28568$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28569    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28570    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28571    ac_cxx_werror_flag=yes
28572    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28573/* end confdefs.h.  */
28574
28575int
28576main ()
28577{
28578
28579  ;
28580  return 0;
28581}
28582_ACEOF
28583if ac_fn_cxx_try_link "$LINENO"; then :
28584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28585$as_echo "no" >&6; }
28586       X_LIBS="$X_LIBS -R$x_libraries"
28587else
28588  LIBS="$ac_xsave_LIBS -R $x_libraries"
28589       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28590/* end confdefs.h.  */
28591
28592int
28593main ()
28594{
28595
28596  ;
28597  return 0;
28598}
28599_ACEOF
28600if ac_fn_cxx_try_link "$LINENO"; then :
28601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28602$as_echo "yes" >&6; }
28603	  X_LIBS="$X_LIBS -R $x_libraries"
28604else
28605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28606$as_echo "neither works" >&6; }
28607fi
28608rm -f core conftest.err conftest.$ac_objext \
28609    conftest$ac_exeext conftest.$ac_ext
28610fi
28611rm -f core conftest.err conftest.$ac_objext \
28612    conftest$ac_exeext conftest.$ac_ext
28613    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28614    LIBS=$ac_xsave_LIBS
28615  fi
28616
28617  # Check for system-dependent libraries X programs must link with.
28618  # Do this before checking for the system-independent R6 libraries
28619  # (-lICE), since we may need -lsocket or whatever for X linking.
28620
28621  if test "$ISC" = yes; then
28622    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28623  else
28624    # Martyn Johnson says this is needed for Ultrix, if the X
28625    # libraries were built with DECnet support.  And Karl Berry says
28626    # the Alpha needs dnet_stub (dnet does not exist).
28627    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28628    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28629/* end confdefs.h.  */
28630
28631/* Override any GCC internal prototype to avoid an error.
28632   Use char because int might match the return type of a GCC
28633   builtin and then its argument prototype would still apply.  */
28634#ifdef __cplusplus
28635extern "C"
28636#endif
28637char XOpenDisplay ();
28638int
28639main ()
28640{
28641return XOpenDisplay ();
28642  ;
28643  return 0;
28644}
28645_ACEOF
28646if ac_fn_cxx_try_link "$LINENO"; then :
28647
28648else
28649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28650$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28651if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28652  $as_echo_n "(cached) " >&6
28653else
28654  ac_check_lib_save_LIBS=$LIBS
28655LIBS="-ldnet  $LIBS"
28656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28657/* end confdefs.h.  */
28658
28659/* Override any GCC internal prototype to avoid an error.
28660   Use char because int might match the return type of a GCC
28661   builtin and then its argument prototype would still apply.  */
28662#ifdef __cplusplus
28663extern "C"
28664#endif
28665char dnet_ntoa ();
28666int
28667main ()
28668{
28669return dnet_ntoa ();
28670  ;
28671  return 0;
28672}
28673_ACEOF
28674if ac_fn_cxx_try_link "$LINENO"; then :
28675  ac_cv_lib_dnet_dnet_ntoa=yes
28676else
28677  ac_cv_lib_dnet_dnet_ntoa=no
28678fi
28679rm -f core conftest.err conftest.$ac_objext \
28680    conftest$ac_exeext conftest.$ac_ext
28681LIBS=$ac_check_lib_save_LIBS
28682fi
28683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28684$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28685if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28686  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28687fi
28688
28689    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28691$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28692if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28693  $as_echo_n "(cached) " >&6
28694else
28695  ac_check_lib_save_LIBS=$LIBS
28696LIBS="-ldnet_stub  $LIBS"
28697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28698/* end confdefs.h.  */
28699
28700/* Override any GCC internal prototype to avoid an error.
28701   Use char because int might match the return type of a GCC
28702   builtin and then its argument prototype would still apply.  */
28703#ifdef __cplusplus
28704extern "C"
28705#endif
28706char dnet_ntoa ();
28707int
28708main ()
28709{
28710return dnet_ntoa ();
28711  ;
28712  return 0;
28713}
28714_ACEOF
28715if ac_fn_cxx_try_link "$LINENO"; then :
28716  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28717else
28718  ac_cv_lib_dnet_stub_dnet_ntoa=no
28719fi
28720rm -f core conftest.err conftest.$ac_objext \
28721    conftest$ac_exeext conftest.$ac_ext
28722LIBS=$ac_check_lib_save_LIBS
28723fi
28724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28725$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28726if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28727  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28728fi
28729
28730    fi
28731fi
28732rm -f core conftest.err conftest.$ac_objext \
28733    conftest$ac_exeext conftest.$ac_ext
28734    LIBS="$ac_xsave_LIBS"
28735
28736    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28737    # to get the SysV transport functions.
28738    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28739    # needs -lnsl.
28740    # The nsl library prevents programs from opening the X display
28741    # on Irix 5.2, according to T.E. Dickey.
28742    # The functions gethostbyname, getservbyname, and inet_addr are
28743    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28744    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28745if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28746
28747fi
28748
28749    if test $ac_cv_func_gethostbyname = no; then
28750      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28751$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28752if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28753  $as_echo_n "(cached) " >&6
28754else
28755  ac_check_lib_save_LIBS=$LIBS
28756LIBS="-lnsl  $LIBS"
28757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28758/* end confdefs.h.  */
28759
28760/* Override any GCC internal prototype to avoid an error.
28761   Use char because int might match the return type of a GCC
28762   builtin and then its argument prototype would still apply.  */
28763#ifdef __cplusplus
28764extern "C"
28765#endif
28766char gethostbyname ();
28767int
28768main ()
28769{
28770return gethostbyname ();
28771  ;
28772  return 0;
28773}
28774_ACEOF
28775if ac_fn_cxx_try_link "$LINENO"; then :
28776  ac_cv_lib_nsl_gethostbyname=yes
28777else
28778  ac_cv_lib_nsl_gethostbyname=no
28779fi
28780rm -f core conftest.err conftest.$ac_objext \
28781    conftest$ac_exeext conftest.$ac_ext
28782LIBS=$ac_check_lib_save_LIBS
28783fi
28784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28785$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28786if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28787  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28788fi
28789
28790      if test $ac_cv_lib_nsl_gethostbyname = no; then
28791	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28792$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28793if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28794  $as_echo_n "(cached) " >&6
28795else
28796  ac_check_lib_save_LIBS=$LIBS
28797LIBS="-lbsd  $LIBS"
28798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28799/* end confdefs.h.  */
28800
28801/* Override any GCC internal prototype to avoid an error.
28802   Use char because int might match the return type of a GCC
28803   builtin and then its argument prototype would still apply.  */
28804#ifdef __cplusplus
28805extern "C"
28806#endif
28807char gethostbyname ();
28808int
28809main ()
28810{
28811return gethostbyname ();
28812  ;
28813  return 0;
28814}
28815_ACEOF
28816if ac_fn_cxx_try_link "$LINENO"; then :
28817  ac_cv_lib_bsd_gethostbyname=yes
28818else
28819  ac_cv_lib_bsd_gethostbyname=no
28820fi
28821rm -f core conftest.err conftest.$ac_objext \
28822    conftest$ac_exeext conftest.$ac_ext
28823LIBS=$ac_check_lib_save_LIBS
28824fi
28825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28826$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28827if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28828  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28829fi
28830
28831      fi
28832    fi
28833
28834    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28835    # socket/setsockopt and other routines are undefined under SCO ODT
28836    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28837    # on later versions), says Simon Leinen: it contains gethostby*
28838    # variants that don't use the name server (or something).  -lsocket
28839    # must be given before -lnsl if both are needed.  We assume that
28840    # if connect needs -lnsl, so does gethostbyname.
28841    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28842if test "x$ac_cv_func_connect" = x""yes; then :
28843
28844fi
28845
28846    if test $ac_cv_func_connect = no; then
28847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28848$as_echo_n "checking for connect in -lsocket... " >&6; }
28849if test "${ac_cv_lib_socket_connect+set}" = set; then :
28850  $as_echo_n "(cached) " >&6
28851else
28852  ac_check_lib_save_LIBS=$LIBS
28853LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28855/* end confdefs.h.  */
28856
28857/* Override any GCC internal prototype to avoid an error.
28858   Use char because int might match the return type of a GCC
28859   builtin and then its argument prototype would still apply.  */
28860#ifdef __cplusplus
28861extern "C"
28862#endif
28863char connect ();
28864int
28865main ()
28866{
28867return connect ();
28868  ;
28869  return 0;
28870}
28871_ACEOF
28872if ac_fn_cxx_try_link "$LINENO"; then :
28873  ac_cv_lib_socket_connect=yes
28874else
28875  ac_cv_lib_socket_connect=no
28876fi
28877rm -f core conftest.err conftest.$ac_objext \
28878    conftest$ac_exeext conftest.$ac_ext
28879LIBS=$ac_check_lib_save_LIBS
28880fi
28881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28882$as_echo "$ac_cv_lib_socket_connect" >&6; }
28883if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28884  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28885fi
28886
28887    fi
28888
28889    # Guillermo Gomez says -lposix is necessary on A/UX.
28890    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28891if test "x$ac_cv_func_remove" = x""yes; then :
28892
28893fi
28894
28895    if test $ac_cv_func_remove = no; then
28896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28897$as_echo_n "checking for remove in -lposix... " >&6; }
28898if test "${ac_cv_lib_posix_remove+set}" = set; then :
28899  $as_echo_n "(cached) " >&6
28900else
28901  ac_check_lib_save_LIBS=$LIBS
28902LIBS="-lposix  $LIBS"
28903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28904/* end confdefs.h.  */
28905
28906/* Override any GCC internal prototype to avoid an error.
28907   Use char because int might match the return type of a GCC
28908   builtin and then its argument prototype would still apply.  */
28909#ifdef __cplusplus
28910extern "C"
28911#endif
28912char remove ();
28913int
28914main ()
28915{
28916return remove ();
28917  ;
28918  return 0;
28919}
28920_ACEOF
28921if ac_fn_cxx_try_link "$LINENO"; then :
28922  ac_cv_lib_posix_remove=yes
28923else
28924  ac_cv_lib_posix_remove=no
28925fi
28926rm -f core conftest.err conftest.$ac_objext \
28927    conftest$ac_exeext conftest.$ac_ext
28928LIBS=$ac_check_lib_save_LIBS
28929fi
28930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28931$as_echo "$ac_cv_lib_posix_remove" >&6; }
28932if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28933  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28934fi
28935
28936    fi
28937
28938    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28939    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28940if test "x$ac_cv_func_shmat" = x""yes; then :
28941
28942fi
28943
28944    if test $ac_cv_func_shmat = no; then
28945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28946$as_echo_n "checking for shmat in -lipc... " >&6; }
28947if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28948  $as_echo_n "(cached) " >&6
28949else
28950  ac_check_lib_save_LIBS=$LIBS
28951LIBS="-lipc  $LIBS"
28952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28953/* end confdefs.h.  */
28954
28955/* Override any GCC internal prototype to avoid an error.
28956   Use char because int might match the return type of a GCC
28957   builtin and then its argument prototype would still apply.  */
28958#ifdef __cplusplus
28959extern "C"
28960#endif
28961char shmat ();
28962int
28963main ()
28964{
28965return shmat ();
28966  ;
28967  return 0;
28968}
28969_ACEOF
28970if ac_fn_cxx_try_link "$LINENO"; then :
28971  ac_cv_lib_ipc_shmat=yes
28972else
28973  ac_cv_lib_ipc_shmat=no
28974fi
28975rm -f core conftest.err conftest.$ac_objext \
28976    conftest$ac_exeext conftest.$ac_ext
28977LIBS=$ac_check_lib_save_LIBS
28978fi
28979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28980$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28981if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28982  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28983fi
28984
28985    fi
28986  fi
28987
28988  # Check for libraries that X11R6 Xt/Xaw programs need.
28989  ac_save_LDFLAGS=$LDFLAGS
28990  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28991  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28992  # check for ICE first), but we must link in the order -lSM -lICE or
28993  # we get undefined symbols.  So assume we have SM if we have ICE.
28994  # These have to be linked with before -lX11, unlike the other
28995  # libraries we check for below, so use a different variable.
28996  # John Interrante, Karl Berry
28997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28998$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28999if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29000  $as_echo_n "(cached) " >&6
29001else
29002  ac_check_lib_save_LIBS=$LIBS
29003LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29005/* end confdefs.h.  */
29006
29007/* Override any GCC internal prototype to avoid an error.
29008   Use char because int might match the return type of a GCC
29009   builtin and then its argument prototype would still apply.  */
29010#ifdef __cplusplus
29011extern "C"
29012#endif
29013char IceConnectionNumber ();
29014int
29015main ()
29016{
29017return IceConnectionNumber ();
29018  ;
29019  return 0;
29020}
29021_ACEOF
29022if ac_fn_cxx_try_link "$LINENO"; then :
29023  ac_cv_lib_ICE_IceConnectionNumber=yes
29024else
29025  ac_cv_lib_ICE_IceConnectionNumber=no
29026fi
29027rm -f core conftest.err conftest.$ac_objext \
29028    conftest$ac_exeext conftest.$ac_ext
29029LIBS=$ac_check_lib_save_LIBS
29030fi
29031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29032$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29033if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29034  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29035fi
29036
29037  LDFLAGS=$ac_save_LDFLAGS
29038
29039fi
29040
29041
29042if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29043
29044    # Print a helpful message on how to acquire the necessary build dependency.
29045    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29046    MISSING_DEPENDENCY=x11
29047    PKGHANDLER_COMMAND=
29048
29049    case $PKGHANDLER in
29050	apt-get)
29051                apt_help     $MISSING_DEPENDENCY ;;
29052    yum)
29053                yum_help     $MISSING_DEPENDENCY ;;
29054	port)
29055                port_help    $MISSING_DEPENDENCY ;;
29056	pkgutil)
29057                pkgutil_help $MISSING_DEPENDENCY ;;
29058	pkgadd)
29059                pkgadd_help  $MISSING_DEPENDENCY ;;
29060    * )
29061      break ;;
29062    esac
29063
29064    if test "x$PKGHANDLER_COMMAND" != x; then
29065        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29066    fi
29067
29068    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29069fi
29070
29071# Some of the old makefiles require a setting of OPENWIN_HOME
29072# Since the X11R6 directory has disappeared on later Linuxes,
29073# we need to probe for it.
29074if test "x$OPENJDK_TARGET_OS" = xlinux; then
29075    if test -d "$SYS_ROOT/usr/X11R6"; then
29076        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29077    fi
29078    if test -d "$SYS_ROOT/usr/include/X11"; then
29079        OPENWIN_HOME="$SYS_ROOT/usr"
29080    fi
29081fi
29082if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29083    OPENWIN_HOME="/usr/openwin"
29084fi
29085
29086
29087
29088#
29089# Weird Sol10 something check...TODO change to try compile
29090#
29091if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29092  if test "`uname -r`" = "5.10"; then
29093     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29094     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29095     fi
29096  fi
29097fi
29098
29099ac_ext=c
29100ac_cpp='$CPP $CPPFLAGS'
29101ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29102ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29103ac_compiler_gnu=$ac_cv_c_compiler_gnu
29104
29105OLD_CFLAGS="$CFLAGS"
29106CFLAGS="$CFLAGS $X_CFLAGS"
29107
29108# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29109for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29110do :
29111  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29112ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29113                   # include <X11/Xutil.h>
29114
29115"
29116if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29117  cat >>confdefs.h <<_ACEOF
29118#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29119_ACEOF
29120 X11_A_OK=yes
29121else
29122  X11_A_OK=no
29123fi
29124
29125done
29126
29127
29128CFLAGS="$OLD_CFLAGS"
29129ac_ext=cpp
29130ac_cpp='$CXXCPP $CPPFLAGS'
29131ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29132ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29133ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29134
29135
29136if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29137
29138    # Print a helpful message on how to acquire the necessary build dependency.
29139    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29140    MISSING_DEPENDENCY=x11
29141    PKGHANDLER_COMMAND=
29142
29143    case $PKGHANDLER in
29144	apt-get)
29145                apt_help     $MISSING_DEPENDENCY ;;
29146    yum)
29147                yum_help     $MISSING_DEPENDENCY ;;
29148	port)
29149                port_help    $MISSING_DEPENDENCY ;;
29150	pkgutil)
29151                pkgutil_help $MISSING_DEPENDENCY ;;
29152	pkgadd)
29153                pkgadd_help  $MISSING_DEPENDENCY ;;
29154    * )
29155      break ;;
29156    esac
29157
29158    if test "x$PKGHANDLER_COMMAND" != x; then
29159        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29160    fi
29161
29162    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29163fi
29164
29165
29166
29167
29168
29169
29170###############################################################################
29171#
29172# The common unix printing system cups is used to print from java.
29173#
29174
29175# Check whether --with-cups was given.
29176if test "${with_cups+set}" = set; then :
29177  withval=$with_cups;
29178fi
29179
29180
29181# Check whether --with-cups-include was given.
29182if test "${with_cups_include+set}" = set; then :
29183  withval=$with_cups_include;
29184fi
29185
29186
29187if test "x$CUPS_NOT_NEEDED" = xyes; then
29188	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29189		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29190$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29191	fi
29192	CUPS_CFLAGS=
29193else
29194	CUPS_FOUND=no
29195
29196	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29197	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29198	fi
29199
29200	if test "x${with_cups}" != x; then
29201	    CUPS_CFLAGS="-I${with_cups}/include"
29202	    CUPS_FOUND=yes
29203	fi
29204	if test "x${with_cups_include}" != x; then
29205	    CUPS_CFLAGS="-I${with_cups_include}"
29206	    CUPS_FOUND=yes
29207	fi
29208	if test "x$CUPS_FOUND" = xno; then
29209
29210
29211    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29212        # Source the builddeps file again, to make sure it uses the latest variables!
29213        . $builddepsfile
29214        # Look for a target and build machine specific resource!
29215        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29216        if test "x$resource" = x; then
29217            # Ok, lets instead look for a target specific resource
29218            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29219        fi
29220        if test "x$resource" = x; then
29221            # Ok, lets instead look for a build specific resource
29222            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29223        fi
29224        if test "x$resource" = x; then
29225            # Ok, lets instead look for a generic resource
29226            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29227            resource=${builddep_cups}
29228        fi
29229        if test "x$resource" != x; then
29230            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29231$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29232	    # If the resource in the builddeps.conf file is an existing directory,
29233	    # for example /java/linux/cups
29234	    if test -d ${resource}; then
29235	       depdir=${resource}
29236	    else
29237
29238# cups is for example mymodule
29239# $resource is for example libs/general/libmymod_1_2_3.zip
29240# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29241# $with_builddeps_dir is for example /localhome/builddeps
29242# depdir is the name of the variable into which we store the depdir, eg MYMOD
29243# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29244# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29245    filename=`basename $resource`
29246    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29247    filebase=${filename%%.*}
29248    extension=${filename#*.}
29249    installdir=$with_builddeps_dir/$filebase
29250    if test ! -f $installdir/$filename.unpacked; then
29251        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29252$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29253        if test ! -d $installdir; then
29254            mkdir -p $installdir
29255        fi
29256        if test ! -d $installdir; then
29257            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29258        fi
29259        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29260        touch $tmpfile
29261        if test ! -f $tmpfile; then
29262            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29263        fi
29264
29265    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29266    # $tmpfile is the local file name for the downloaded file.
29267    VALID_TOOL=no
29268    if test "x$BDEPS_FTP" = xwget; then
29269       VALID_TOOL=yes
29270       wget -O $tmpfile $with_builddeps_server/$resource
29271    fi
29272    if test "x$BDEPS_FTP" = xlftp; then
29273       VALID_TOOL=yes
29274       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29275    fi
29276    if test "x$BDEPS_FTP" = xftp; then
29277        VALID_TOOL=yes
29278        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29279        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29280        FTPUSERPWD=${FTPSERVER%%@*}
29281        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29282            FTPUSER=${userpwd%%:*}
29283            FTPPWD=${userpwd#*@}
29284            FTPSERVER=${FTPSERVER#*@}
29285        else
29286            FTPUSER=ftp
29287            FTPPWD=ftp
29288        fi
29289        # the "pass" command does not work on some
29290        # ftp clients (read ftp.exe) but if it works,
29291        # passive mode is better!
29292        (\
29293            echo "user $FTPUSER $FTPPWD"        ;\
29294            echo "pass"                         ;\
29295            echo "bin"                          ;\
29296            echo "get $FTPPATH $tmpfile"              ;\
29297        ) | ftp -in $FTPSERVER
29298    fi
29299    if test "x$VALID_TOOL" != xyes; then
29300       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29301    fi
29302
29303        mv $tmpfile $installdir/$filename
29304        if test ! -s $installdir/$filename; then
29305            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29306        fi
29307        case "$extension" in
29308            zip)  echo "Unzipping $installdir/$filename..."
29309               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29310            ;;
29311            tar.gz) echo "Untaring $installdir/$filename..."
29312               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29313            ;;
29314            tgz) echo "Untaring $installdir/$filename..."
29315               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29316            ;;
29317            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29318            ;;
29319        esac
29320    fi
29321    if test -f $installdir/$filename.unpacked; then
29322        depdir=$installdir
29323    fi
29324
29325	    fi
29326            # Source the builddeps file again, because in the previous command, the depdir
29327            # was updated to point at the current build dependency install directory.
29328            . $builddepsfile
29329            # Now extract variables from the builddeps.conf files.
29330            theroot=${builddep_cups_ROOT}
29331            thecflags=${builddep_cups_CFLAGS}
29332            thelibs=${builddep_cups_LIBS}
29333            if test "x$depdir" = x; then
29334                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29335            fi
29336            CUPS=$depdir
29337            if test "x$theroot" != x; then
29338               CUPS="$theroot"
29339            fi
29340            if test "x$thecflags" != x; then
29341               CUPS_CFLAGS="$thecflags"
29342            fi
29343            if test "x$thelibs" != x; then
29344               CUPS_LIBS="$thelibs"
29345            fi
29346            CUPS_FOUND=yes
29347
29348        fi
29349
29350    fi
29351
29352	fi
29353	if test "x$CUPS_FOUND" = xno; then
29354	    # Are the cups headers installed in the default /usr/include location?
29355	    for ac_header in cups/cups.h cups/ppd.h
29356do :
29357  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29358ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29359if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29360  cat >>confdefs.h <<_ACEOF
29361#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29362_ACEOF
29363 CUPS_FOUND=yes
29364	                      CUPS_CFLAGS=
29365	                      DEFAULT_CUPS=yes
29366fi
29367
29368done
29369
29370	fi
29371	if test "x$CUPS_FOUND" = xno; then
29372	    # Getting nervous now? Lets poke around for standard Solaris third-party
29373	    # package installation locations.
29374	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29375$as_echo_n "checking for cups headers... " >&6; }
29376	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29377	       # An SFW package seems to be installed!
29378	       CUPS_FOUND=yes
29379	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29380	    elif test -s /opt/csw/include/cups/cups.h; then
29381	       # A CSW package seems to be installed!
29382	       CUPS_FOUND=yes
29383	       CUPS_CFLAGS="-I/opt/csw/include"
29384	    fi
29385	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29386$as_echo "$CUPS_FOUND" >&6; }
29387	fi
29388	if test "x$CUPS_FOUND" = xno; then
29389
29390    # Print a helpful message on how to acquire the necessary build dependency.
29391    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29392    MISSING_DEPENDENCY=cups
29393    PKGHANDLER_COMMAND=
29394
29395    case $PKGHANDLER in
29396	apt-get)
29397                apt_help     $MISSING_DEPENDENCY ;;
29398    yum)
29399                yum_help     $MISSING_DEPENDENCY ;;
29400	port)
29401                port_help    $MISSING_DEPENDENCY ;;
29402	pkgutil)
29403                pkgutil_help $MISSING_DEPENDENCY ;;
29404	pkgadd)
29405                pkgadd_help  $MISSING_DEPENDENCY ;;
29406    * )
29407      break ;;
29408    esac
29409
29410    if test "x$PKGHANDLER_COMMAND" != x; then
29411        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29412    fi
29413
29414	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29415	fi
29416fi
29417
29418
29419
29420
29421
29422
29423###############################################################################
29424#
29425# The ubiquitous freetype2 library is used to render fonts.
29426#
29427
29428# Check whether --with-freetype was given.
29429if test "${with_freetype+set}" = set; then :
29430  withval=$with_freetype;
29431fi
29432
29433
29434# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29435USING_SYSTEM_FT_LIB=false
29436
29437if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29438	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29439		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29440$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29441	fi
29442	FREETYPE2_CFLAGS=
29443	FREETYPE2_LIBS=
29444        FREETYPE2_LIB_PATH=
29445else
29446	FREETYPE2_FOUND=no
29447
29448	if test "x$with_freetype" != x; then
29449
29450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29451
29452  # Input might be given as Windows format, start by converting to
29453  # unix format.
29454  path="$with_freetype"
29455  new_path=`$CYGPATH -u "$path"`
29456
29457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29460  # "foo.exe" is OK but "foo" is an error.
29461  #
29462  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29463  # It is also a way to make sure we got the proper file name for the real test later on.
29464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29465  if test "x$test_shortpath" = x; then
29466    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29467$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29468    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29469  fi
29470
29471  # Call helper function which possibly converts this using DOS-style short mode.
29472  # If so, the updated path is stored in $new_path.
29473
29474  input_path="$new_path"
29475  # Check if we need to convert this using DOS-style short mode. If the path
29476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29477  # take no chances and rewrite it.
29478  # Note: m4 eats our [], so we need to use [ and ] instead.
29479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29480  if test "x$has_forbidden_chars" != x; then
29481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29485      # Going to short mode and back again did indeed matter. Since short mode is
29486      # case insensitive, let's make it lowercase to improve readability.
29487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29488      # Now convert it back to Unix-stile (cygpath)
29489      input_path=`$CYGPATH -u "$shortmode_path"`
29490      new_path="$input_path"
29491    fi
29492  fi
29493
29494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29495  if test "x$test_cygdrive_prefix" = x; then
29496    # As a simple fix, exclude /usr/bin since it's not a real path.
29497    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29499      # a path prefixed by /cygdrive for fixpath to work.
29500      new_path="$CYGWIN_ROOT_PATH$input_path"
29501    fi
29502  fi
29503
29504
29505  if test "x$path" != "x$new_path"; then
29506    with_freetype="$new_path"
29507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29508$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29509  fi
29510
29511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29512
29513  path="$with_freetype"
29514  has_colon=`$ECHO $path | $GREP ^.:`
29515  new_path="$path"
29516  if test "x$has_colon" = x; then
29517    # Not in mixed or Windows style, start by that.
29518    new_path=`cmd //c echo $path`
29519  fi
29520
29521
29522  input_path="$new_path"
29523  # Check if we need to convert this using DOS-style short mode. If the path
29524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29525  # take no chances and rewrite it.
29526  # Note: m4 eats our [], so we need to use [ and ] instead.
29527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29528  if test "x$has_forbidden_chars" != x; then
29529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29531  fi
29532
29533
29534  windows_path="$new_path"
29535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29536    unix_path=`$CYGPATH -u "$windows_path"`
29537    new_path="$unix_path"
29538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29540    new_path="$unix_path"
29541  fi
29542
29543  if test "x$path" != "x$new_path"; then
29544    with_freetype="$new_path"
29545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29546$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29547  fi
29548
29549  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29550  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29551
29552  else
29553    # We're on a posix platform. Hooray! :)
29554    path="$with_freetype"
29555
29556    if test ! -f "$path" && test ! -d "$path"; then
29557      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29558    fi
29559
29560    has_space=`$ECHO "$path" | $GREP " "`
29561    if test "x$has_space" != x; then
29562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29563$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29564      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29565    fi
29566  fi
29567
29568	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29569            FREETYPE2_LIB_PATH="$with_freetype/lib"
29570            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29571                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29572                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29573            fi
29574            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29575                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29576            fi
29577	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29578            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29579                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29580            fi
29581 	    FREETYPE2_FOUND=yes
29582   	    if test "x$FREETYPE2_FOUND" = xyes; then
29583	        # Verify that the directories exist
29584                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29585		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29586		fi
29587	        # List the contents of the lib.
29588		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29589                if test "x$FREETYPELIB" = x; then
29590		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29591		fi
29592	        # Check one h-file
29593                if ! test -s "$with_freetype/include/ft2build.h"; then
29594		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29595		fi
29596            fi
29597        fi
29598	if test "x$FREETYPE2_FOUND" = xno; then
29599
29600
29601    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29602        # Source the builddeps file again, to make sure it uses the latest variables!
29603        . $builddepsfile
29604        # Look for a target and build machine specific resource!
29605        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29606        if test "x$resource" = x; then
29607            # Ok, lets instead look for a target specific resource
29608            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29609        fi
29610        if test "x$resource" = x; then
29611            # Ok, lets instead look for a build specific resource
29612            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29613        fi
29614        if test "x$resource" = x; then
29615            # Ok, lets instead look for a generic resource
29616            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29617            resource=${builddep_freetype2}
29618        fi
29619        if test "x$resource" != x; then
29620            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29621$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29622	    # If the resource in the builddeps.conf file is an existing directory,
29623	    # for example /java/linux/cups
29624	    if test -d ${resource}; then
29625	       depdir=${resource}
29626	    else
29627
29628# freetype2 is for example mymodule
29629# $resource is for example libs/general/libmymod_1_2_3.zip
29630# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29631# $with_builddeps_dir is for example /localhome/builddeps
29632# depdir is the name of the variable into which we store the depdir, eg MYMOD
29633# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29634# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29635    filename=`basename $resource`
29636    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29637    filebase=${filename%%.*}
29638    extension=${filename#*.}
29639    installdir=$with_builddeps_dir/$filebase
29640    if test ! -f $installdir/$filename.unpacked; then
29641        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29642$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29643        if test ! -d $installdir; then
29644            mkdir -p $installdir
29645        fi
29646        if test ! -d $installdir; then
29647            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29648        fi
29649        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29650        touch $tmpfile
29651        if test ! -f $tmpfile; then
29652            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29653        fi
29654
29655    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29656    # $tmpfile is the local file name for the downloaded file.
29657    VALID_TOOL=no
29658    if test "x$BDEPS_FTP" = xwget; then
29659       VALID_TOOL=yes
29660       wget -O $tmpfile $with_builddeps_server/$resource
29661    fi
29662    if test "x$BDEPS_FTP" = xlftp; then
29663       VALID_TOOL=yes
29664       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29665    fi
29666    if test "x$BDEPS_FTP" = xftp; then
29667        VALID_TOOL=yes
29668        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29669        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29670        FTPUSERPWD=${FTPSERVER%%@*}
29671        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29672            FTPUSER=${userpwd%%:*}
29673            FTPPWD=${userpwd#*@}
29674            FTPSERVER=${FTPSERVER#*@}
29675        else
29676            FTPUSER=ftp
29677            FTPPWD=ftp
29678        fi
29679        # the "pass" command does not work on some
29680        # ftp clients (read ftp.exe) but if it works,
29681        # passive mode is better!
29682        (\
29683            echo "user $FTPUSER $FTPPWD"        ;\
29684            echo "pass"                         ;\
29685            echo "bin"                          ;\
29686            echo "get $FTPPATH $tmpfile"              ;\
29687        ) | ftp -in $FTPSERVER
29688    fi
29689    if test "x$VALID_TOOL" != xyes; then
29690       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29691    fi
29692
29693        mv $tmpfile $installdir/$filename
29694        if test ! -s $installdir/$filename; then
29695            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29696        fi
29697        case "$extension" in
29698            zip)  echo "Unzipping $installdir/$filename..."
29699               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29700            ;;
29701            tar.gz) echo "Untaring $installdir/$filename..."
29702               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29703            ;;
29704            tgz) echo "Untaring $installdir/$filename..."
29705               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29706            ;;
29707            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29708            ;;
29709        esac
29710    fi
29711    if test -f $installdir/$filename.unpacked; then
29712        depdir=$installdir
29713    fi
29714
29715	    fi
29716            # Source the builddeps file again, because in the previous command, the depdir
29717            # was updated to point at the current build dependency install directory.
29718            . $builddepsfile
29719            # Now extract variables from the builddeps.conf files.
29720            theroot=${builddep_freetype2_ROOT}
29721            thecflags=${builddep_freetype2_CFLAGS}
29722            thelibs=${builddep_freetype2_LIBS}
29723            if test "x$depdir" = x; then
29724                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29725            fi
29726            FREETYPE2=$depdir
29727            if test "x$theroot" != x; then
29728               FREETYPE2="$theroot"
29729            fi
29730            if test "x$thecflags" != x; then
29731               FREETYPE2_CFLAGS="$thecflags"
29732            fi
29733            if test "x$thelibs" != x; then
29734               FREETYPE2_LIBS="$thelibs"
29735            fi
29736            FREETYPE2_FOUND=yes
29737            else FREETYPE2_FOUND=no
29738
29739        fi
29740        else FREETYPE2_FOUND=no
29741
29742    fi
29743
29744            USING_SYSTEM_FT_LIB=true
29745	fi
29746	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29747            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29748
29749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29750
29751  # Input might be given as Windows format, start by converting to
29752  # unix format.
29753  path="$FREETYPELOCATION"
29754  new_path=`$CYGPATH -u "$path"`
29755
29756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29759  # "foo.exe" is OK but "foo" is an error.
29760  #
29761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29762  # It is also a way to make sure we got the proper file name for the real test later on.
29763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29764  if test "x$test_shortpath" = x; then
29765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29766$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29767    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29768  fi
29769
29770  # Call helper function which possibly converts this using DOS-style short mode.
29771  # If so, the updated path is stored in $new_path.
29772
29773  input_path="$new_path"
29774  # Check if we need to convert this using DOS-style short mode. If the path
29775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29776  # take no chances and rewrite it.
29777  # Note: m4 eats our [], so we need to use [ and ] instead.
29778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29779  if test "x$has_forbidden_chars" != x; then
29780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29784      # Going to short mode and back again did indeed matter. Since short mode is
29785      # case insensitive, let's make it lowercase to improve readability.
29786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29787      # Now convert it back to Unix-stile (cygpath)
29788      input_path=`$CYGPATH -u "$shortmode_path"`
29789      new_path="$input_path"
29790    fi
29791  fi
29792
29793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29794  if test "x$test_cygdrive_prefix" = x; then
29795    # As a simple fix, exclude /usr/bin since it's not a real path.
29796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29798      # a path prefixed by /cygdrive for fixpath to work.
29799      new_path="$CYGWIN_ROOT_PATH$input_path"
29800    fi
29801  fi
29802
29803
29804  if test "x$path" != "x$new_path"; then
29805    FREETYPELOCATION="$new_path"
29806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29807$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29808  fi
29809
29810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29811
29812  path="$FREETYPELOCATION"
29813  has_colon=`$ECHO $path | $GREP ^.:`
29814  new_path="$path"
29815  if test "x$has_colon" = x; then
29816    # Not in mixed or Windows style, start by that.
29817    new_path=`cmd //c echo $path`
29818  fi
29819
29820
29821  input_path="$new_path"
29822  # Check if we need to convert this using DOS-style short mode. If the path
29823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29824  # take no chances and rewrite it.
29825  # Note: m4 eats our [], so we need to use [ and ] instead.
29826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29827  if test "x$has_forbidden_chars" != x; then
29828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29830  fi
29831
29832
29833  windows_path="$new_path"
29834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29835    unix_path=`$CYGPATH -u "$windows_path"`
29836    new_path="$unix_path"
29837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29839    new_path="$unix_path"
29840  fi
29841
29842  if test "x$path" != "x$new_path"; then
29843    FREETYPELOCATION="$new_path"
29844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29845$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29846  fi
29847
29848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29850
29851  else
29852    # We're on a posix platform. Hooray! :)
29853    path="$FREETYPELOCATION"
29854
29855    if test ! -f "$path" && test ! -d "$path"; then
29856      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29857    fi
29858
29859    has_space=`$ECHO "$path" | $GREP " "`
29860    if test "x$has_space" != x; then
29861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29862$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29863      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29864    fi
29865  fi
29866
29867	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29868$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29869	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29870	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29871	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29872 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29873                if ! test -s "$FREETYPE2_LIBS"; then
29874		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29875		fi
29876                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29877		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29878		fi
29879                USING_SYSTEM_FT_LIB=true
29880                FREETYPE2_FOUND=yes
29881	    fi
29882	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29883$as_echo "$FREETYPE2_FOUND" >&6; }
29884        fi
29885	if test "x$FREETYPE2_FOUND" = xno; then
29886
29887pkg_failed=no
29888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29889$as_echo_n "checking for FREETYPE2... " >&6; }
29890
29891if test -n "$FREETYPE2_CFLAGS"; then
29892    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29893 elif test -n "$PKG_CONFIG"; then
29894    if test -n "$PKG_CONFIG" && \
29895    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29896  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29897  ac_status=$?
29898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29899  test $ac_status = 0; }; then
29900  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29901else
29902  pkg_failed=yes
29903fi
29904 else
29905    pkg_failed=untried
29906fi
29907if test -n "$FREETYPE2_LIBS"; then
29908    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29909 elif test -n "$PKG_CONFIG"; then
29910    if test -n "$PKG_CONFIG" && \
29911    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29912  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29913  ac_status=$?
29914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29915  test $ac_status = 0; }; then
29916  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29917else
29918  pkg_failed=yes
29919fi
29920 else
29921    pkg_failed=untried
29922fi
29923
29924
29925
29926if test $pkg_failed = yes; then
29927
29928if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29929        _pkg_short_errors_supported=yes
29930else
29931        _pkg_short_errors_supported=no
29932fi
29933        if test $_pkg_short_errors_supported = yes; then
29934	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29935        else
29936	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29937        fi
29938	# Put the nasty error message in config.log where it belongs
29939	echo "$FREETYPE2_PKG_ERRORS" >&5
29940
29941	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29942$as_echo "no" >&6; }
29943                FREETYPE2_FOUND=no
29944elif test $pkg_failed = untried; then
29945	FREETYPE2_FOUND=no
29946else
29947	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29948	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29950$as_echo "yes" >&6; }
29951	FREETYPE2_FOUND=yes
29952fi
29953            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29954            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29955            USING_SYSTEM_FT_LIB=true
29956            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29957            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29958              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29959            fi
29960	fi
29961	if test "x$FREETYPE2_FOUND" = xno; then
29962	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29963$as_echo_n "checking for freetype in some standard locations... " >&6; }
29964
29965	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29966	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29967	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29968	    fi
29969	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29970	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29971	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29972	    fi
29973
29974	    PREV_CXXCFLAGS="$CXXFLAGS"
29975	    PREV_LDFLAGS="$LDFLAGS"
29976	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29977	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29978	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29979/* end confdefs.h.  */
29980#include<ft2build.h>
29981	                    #include FT_FREETYPE_H
29982	                   int main() { return 0; }
29983
29984_ACEOF
29985if ac_fn_cxx_try_link "$LINENO"; then :
29986
29987	                      # Yes, the default cflags and libs did the trick.
29988	                      FREETYPE2_FOUND=yes
29989	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29990	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29991
29992else
29993
29994	                      FREETYPE2_FOUND=no
29995
29996fi
29997rm -f core conftest.err conftest.$ac_objext \
29998    conftest$ac_exeext conftest.$ac_ext
29999            CXXCFLAGS="$PREV_CXXFLAGS"
30000	    LDFLAGS="$PREV_LDFLAGS"
30001	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30002$as_echo "$FREETYPE2_FOUND" >&6; }
30003            USING_SYSTEM_FT_LIB=true
30004	fi
30005	if test "x$FREETYPE2_FOUND" = xno; then
30006
30007    # Print a helpful message on how to acquire the necessary build dependency.
30008    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30009    MISSING_DEPENDENCY=freetype2
30010    PKGHANDLER_COMMAND=
30011
30012    case $PKGHANDLER in
30013	apt-get)
30014                apt_help     $MISSING_DEPENDENCY ;;
30015    yum)
30016                yum_help     $MISSING_DEPENDENCY ;;
30017	port)
30018                port_help    $MISSING_DEPENDENCY ;;
30019	pkgutil)
30020                pkgutil_help $MISSING_DEPENDENCY ;;
30021	pkgadd)
30022                pkgadd_help  $MISSING_DEPENDENCY ;;
30023    * )
30024      break ;;
30025    esac
30026
30027    if test "x$PKGHANDLER_COMMAND" != x; then
30028        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30029    fi
30030
30031		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30032	fi
30033
30034        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30035            # AC_CHECK_LIB does not support use of cl.exe
30036            PREV_LDFLAGS="$LDFLAGS"
30037            LDFLAGS="$FREETYPE2_LIBS"
30038            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30039$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30040if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30041  $as_echo_n "(cached) " >&6
30042else
30043  ac_check_lib_save_LIBS=$LIBS
30044LIBS="-lfreetype  $LIBS"
30045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30046/* end confdefs.h.  */
30047
30048/* Override any GCC internal prototype to avoid an error.
30049   Use char because int might match the return type of a GCC
30050   builtin and then its argument prototype would still apply.  */
30051#ifdef __cplusplus
30052extern "C"
30053#endif
30054char FT_Init_FreeType ();
30055int
30056main ()
30057{
30058return FT_Init_FreeType ();
30059  ;
30060  return 0;
30061}
30062_ACEOF
30063if ac_fn_cxx_try_link "$LINENO"; then :
30064  ac_cv_lib_freetype_FT_Init_FreeType=yes
30065else
30066  ac_cv_lib_freetype_FT_Init_FreeType=no
30067fi
30068rm -f core conftest.err conftest.$ac_objext \
30069    conftest$ac_exeext conftest.$ac_ext
30070LIBS=$ac_check_lib_save_LIBS
30071fi
30072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30073$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30074if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30075  FREETYPE2_FOUND=true
30076else
30077  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30078fi
30079
30080            LDFLAGS="$PREV_LDFLAGS"
30081        fi
30082fi
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092###############################################################################
30093#
30094# Check for alsa headers and libraries. Used on Linux/GNU systems.
30095#
30096
30097# Check whether --with-alsa was given.
30098if test "${with_alsa+set}" = set; then :
30099  withval=$with_alsa;
30100fi
30101
30102
30103# Check whether --with-alsa-include was given.
30104if test "${with_alsa_include+set}" = set; then :
30105  withval=$with_alsa_include;
30106fi
30107
30108
30109# Check whether --with-alsa-lib was given.
30110if test "${with_alsa_lib+set}" = set; then :
30111  withval=$with_alsa_lib;
30112fi
30113
30114
30115if test "x$ALSA_NOT_NEEDED" = xyes; then
30116	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30117		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30118$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30119	fi
30120	ALSA_CFLAGS=
30121	ALSA_LIBS=
30122else
30123	ALSA_FOUND=no
30124
30125	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30126	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30127	fi
30128
30129	if test "x${with_alsa}" != x; then
30130	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30131	    ALSA_CFLAGS="-I${with_alsa}/include"
30132	    ALSA_FOUND=yes
30133	fi
30134	if test "x${with_alsa_include}" != x; then
30135	    ALSA_CFLAGS="-I${with_alsa_include}"
30136	    ALSA_FOUND=yes
30137	fi
30138	if test "x${with_alsa_lib}" != x; then
30139	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30140	    ALSA_FOUND=yes
30141	fi
30142	if test "x$ALSA_FOUND" = xno; then
30143
30144
30145    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30146        # Source the builddeps file again, to make sure it uses the latest variables!
30147        . $builddepsfile
30148        # Look for a target and build machine specific resource!
30149        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30150        if test "x$resource" = x; then
30151            # Ok, lets instead look for a target specific resource
30152            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30153        fi
30154        if test "x$resource" = x; then
30155            # Ok, lets instead look for a build specific resource
30156            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30157        fi
30158        if test "x$resource" = x; then
30159            # Ok, lets instead look for a generic resource
30160            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30161            resource=${builddep_alsa}
30162        fi
30163        if test "x$resource" != x; then
30164            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30165$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30166	    # If the resource in the builddeps.conf file is an existing directory,
30167	    # for example /java/linux/cups
30168	    if test -d ${resource}; then
30169	       depdir=${resource}
30170	    else
30171
30172# alsa is for example mymodule
30173# $resource is for example libs/general/libmymod_1_2_3.zip
30174# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30175# $with_builddeps_dir is for example /localhome/builddeps
30176# depdir is the name of the variable into which we store the depdir, eg MYMOD
30177# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30178# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30179    filename=`basename $resource`
30180    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30181    filebase=${filename%%.*}
30182    extension=${filename#*.}
30183    installdir=$with_builddeps_dir/$filebase
30184    if test ! -f $installdir/$filename.unpacked; then
30185        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30186$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30187        if test ! -d $installdir; then
30188            mkdir -p $installdir
30189        fi
30190        if test ! -d $installdir; then
30191            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30192        fi
30193        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30194        touch $tmpfile
30195        if test ! -f $tmpfile; then
30196            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30197        fi
30198
30199    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30200    # $tmpfile is the local file name for the downloaded file.
30201    VALID_TOOL=no
30202    if test "x$BDEPS_FTP" = xwget; then
30203       VALID_TOOL=yes
30204       wget -O $tmpfile $with_builddeps_server/$resource
30205    fi
30206    if test "x$BDEPS_FTP" = xlftp; then
30207       VALID_TOOL=yes
30208       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30209    fi
30210    if test "x$BDEPS_FTP" = xftp; then
30211        VALID_TOOL=yes
30212        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30213        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30214        FTPUSERPWD=${FTPSERVER%%@*}
30215        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30216            FTPUSER=${userpwd%%:*}
30217            FTPPWD=${userpwd#*@}
30218            FTPSERVER=${FTPSERVER#*@}
30219        else
30220            FTPUSER=ftp
30221            FTPPWD=ftp
30222        fi
30223        # the "pass" command does not work on some
30224        # ftp clients (read ftp.exe) but if it works,
30225        # passive mode is better!
30226        (\
30227            echo "user $FTPUSER $FTPPWD"        ;\
30228            echo "pass"                         ;\
30229            echo "bin"                          ;\
30230            echo "get $FTPPATH $tmpfile"              ;\
30231        ) | ftp -in $FTPSERVER
30232    fi
30233    if test "x$VALID_TOOL" != xyes; then
30234       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30235    fi
30236
30237        mv $tmpfile $installdir/$filename
30238        if test ! -s $installdir/$filename; then
30239            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30240        fi
30241        case "$extension" in
30242            zip)  echo "Unzipping $installdir/$filename..."
30243               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30244            ;;
30245            tar.gz) echo "Untaring $installdir/$filename..."
30246               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30247            ;;
30248            tgz) echo "Untaring $installdir/$filename..."
30249               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30250            ;;
30251            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30252            ;;
30253        esac
30254    fi
30255    if test -f $installdir/$filename.unpacked; then
30256        depdir=$installdir
30257    fi
30258
30259	    fi
30260            # Source the builddeps file again, because in the previous command, the depdir
30261            # was updated to point at the current build dependency install directory.
30262            . $builddepsfile
30263            # Now extract variables from the builddeps.conf files.
30264            theroot=${builddep_alsa_ROOT}
30265            thecflags=${builddep_alsa_CFLAGS}
30266            thelibs=${builddep_alsa_LIBS}
30267            if test "x$depdir" = x; then
30268                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30269            fi
30270            ALSA=$depdir
30271            if test "x$theroot" != x; then
30272               ALSA="$theroot"
30273            fi
30274            if test "x$thecflags" != x; then
30275               ALSA_CFLAGS="$thecflags"
30276            fi
30277            if test "x$thelibs" != x; then
30278               ALSA_LIBS="$thelibs"
30279            fi
30280            ALSA_FOUND=yes
30281            else ALSA_FOUND=no
30282
30283        fi
30284        else ALSA_FOUND=no
30285
30286    fi
30287
30288	fi
30289	if test "x$ALSA_FOUND" = xno; then
30290
30291pkg_failed=no
30292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30293$as_echo_n "checking for ALSA... " >&6; }
30294
30295if test -n "$ALSA_CFLAGS"; then
30296    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30297 elif test -n "$PKG_CONFIG"; then
30298    if test -n "$PKG_CONFIG" && \
30299    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30300  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30301  ac_status=$?
30302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30303  test $ac_status = 0; }; then
30304  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30305else
30306  pkg_failed=yes
30307fi
30308 else
30309    pkg_failed=untried
30310fi
30311if test -n "$ALSA_LIBS"; then
30312    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30313 elif test -n "$PKG_CONFIG"; then
30314    if test -n "$PKG_CONFIG" && \
30315    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30316  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30317  ac_status=$?
30318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30319  test $ac_status = 0; }; then
30320  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30321else
30322  pkg_failed=yes
30323fi
30324 else
30325    pkg_failed=untried
30326fi
30327
30328
30329
30330if test $pkg_failed = yes; then
30331
30332if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30333        _pkg_short_errors_supported=yes
30334else
30335        _pkg_short_errors_supported=no
30336fi
30337        if test $_pkg_short_errors_supported = yes; then
30338	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30339        else
30340	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30341        fi
30342	# Put the nasty error message in config.log where it belongs
30343	echo "$ALSA_PKG_ERRORS" >&5
30344
30345	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30346$as_echo "no" >&6; }
30347                ALSA_FOUND=no
30348elif test $pkg_failed = untried; then
30349	ALSA_FOUND=no
30350else
30351	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30352	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30354$as_echo "yes" >&6; }
30355	ALSA_FOUND=yes
30356fi
30357	fi
30358	if test "x$ALSA_FOUND" = xno; then
30359	    for ac_header in alsa/asoundlib.h
30360do :
30361  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30362if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30363  cat >>confdefs.h <<_ACEOF
30364#define HAVE_ALSA_ASOUNDLIB_H 1
30365_ACEOF
30366 ALSA_FOUND=yes
30367	                      ALSA_CFLAGS=-Iignoreme
30368	                      ALSA_LIBS=-lasound
30369	                      DEFAULT_ALSA=yes
30370else
30371  ALSA_FOUND=no
30372fi
30373
30374done
30375
30376	fi
30377	if test "x$ALSA_FOUND" = xno; then
30378
30379    # Print a helpful message on how to acquire the necessary build dependency.
30380    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30381    MISSING_DEPENDENCY=alsa
30382    PKGHANDLER_COMMAND=
30383
30384    case $PKGHANDLER in
30385	apt-get)
30386                apt_help     $MISSING_DEPENDENCY ;;
30387    yum)
30388                yum_help     $MISSING_DEPENDENCY ;;
30389	port)
30390                port_help    $MISSING_DEPENDENCY ;;
30391	pkgutil)
30392                pkgutil_help $MISSING_DEPENDENCY ;;
30393	pkgadd)
30394                pkgadd_help  $MISSING_DEPENDENCY ;;
30395    * )
30396      break ;;
30397    esac
30398
30399    if test "x$PKGHANDLER_COMMAND" != x; then
30400        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30401    fi
30402
30403	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30404	fi
30405fi
30406
30407
30408
30409
30410
30411
30412
30413###############################################################################
30414#
30415# Check for the jpeg library
30416#
30417
30418USE_EXTERNAL_LIBJPEG=true
30419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30420$as_echo_n "checking for main in -ljpeg... " >&6; }
30421if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30422  $as_echo_n "(cached) " >&6
30423else
30424  ac_check_lib_save_LIBS=$LIBS
30425LIBS="-ljpeg  $LIBS"
30426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30427/* end confdefs.h.  */
30428
30429
30430int
30431main ()
30432{
30433return main ();
30434  ;
30435  return 0;
30436}
30437_ACEOF
30438if ac_fn_cxx_try_link "$LINENO"; then :
30439  ac_cv_lib_jpeg_main=yes
30440else
30441  ac_cv_lib_jpeg_main=no
30442fi
30443rm -f core conftest.err conftest.$ac_objext \
30444    conftest$ac_exeext conftest.$ac_ext
30445LIBS=$ac_check_lib_save_LIBS
30446fi
30447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30448$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30449if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30450  cat >>confdefs.h <<_ACEOF
30451#define HAVE_LIBJPEG 1
30452_ACEOF
30453
30454  LIBS="-ljpeg $LIBS"
30455
30456else
30457   USE_EXTERNAL_LIBJPEG=false
30458               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30459$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30460
30461fi
30462
30463
30464
30465###############################################################################
30466#
30467# Check for the gif library
30468#
30469
30470USE_EXTERNAL_LIBJPEG=true
30471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30472$as_echo_n "checking for main in -lgif... " >&6; }
30473if test "${ac_cv_lib_gif_main+set}" = set; then :
30474  $as_echo_n "(cached) " >&6
30475else
30476  ac_check_lib_save_LIBS=$LIBS
30477LIBS="-lgif  $LIBS"
30478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30479/* end confdefs.h.  */
30480
30481
30482int
30483main ()
30484{
30485return main ();
30486  ;
30487  return 0;
30488}
30489_ACEOF
30490if ac_fn_cxx_try_link "$LINENO"; then :
30491  ac_cv_lib_gif_main=yes
30492else
30493  ac_cv_lib_gif_main=no
30494fi
30495rm -f core conftest.err conftest.$ac_objext \
30496    conftest$ac_exeext conftest.$ac_ext
30497LIBS=$ac_check_lib_save_LIBS
30498fi
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30500$as_echo "$ac_cv_lib_gif_main" >&6; }
30501if test "x$ac_cv_lib_gif_main" = x""yes; then :
30502  cat >>confdefs.h <<_ACEOF
30503#define HAVE_LIBGIF 1
30504_ACEOF
30505
30506  LIBS="-lgif $LIBS"
30507
30508else
30509   USE_EXTERNAL_LIBGIF=false
30510               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30511$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30512
30513fi
30514
30515
30516
30517###############################################################################
30518#
30519# Check for the zlib library
30520#
30521
30522
30523# Check whether --with-zlib was given.
30524if test "${with_zlib+set}" = set; then :
30525  withval=$with_zlib;
30526fi
30527
30528
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30530$as_echo_n "checking for compress in -lz... " >&6; }
30531if test "${ac_cv_lib_z_compress+set}" = set; then :
30532  $as_echo_n "(cached) " >&6
30533else
30534  ac_check_lib_save_LIBS=$LIBS
30535LIBS="-lz  $LIBS"
30536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30537/* end confdefs.h.  */
30538
30539/* Override any GCC internal prototype to avoid an error.
30540   Use char because int might match the return type of a GCC
30541   builtin and then its argument prototype would still apply.  */
30542#ifdef __cplusplus
30543extern "C"
30544#endif
30545char compress ();
30546int
30547main ()
30548{
30549return compress ();
30550  ;
30551  return 0;
30552}
30553_ACEOF
30554if ac_fn_cxx_try_link "$LINENO"; then :
30555  ac_cv_lib_z_compress=yes
30556else
30557  ac_cv_lib_z_compress=no
30558fi
30559rm -f core conftest.err conftest.$ac_objext \
30560    conftest$ac_exeext conftest.$ac_ext
30561LIBS=$ac_check_lib_save_LIBS
30562fi
30563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30564$as_echo "$ac_cv_lib_z_compress" >&6; }
30565if test "x$ac_cv_lib_z_compress" = x""yes; then :
30566   ZLIB_FOUND=yes
30567else
30568   ZLIB_FOUND=no
30569fi
30570
30571
30572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30573$as_echo_n "checking for which zlib to use... " >&6; }
30574
30575DEFAULT_ZLIB=bundled
30576if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30577#
30578# On macosx default is system...on others default is
30579#
30580    DEFAULT_ZLIB=system
30581fi
30582
30583if test "x${ZLIB_FOUND}" != "xyes"; then
30584#
30585# If we don't find any system...set default to bundled
30586#
30587    DEFAULT_ZLIB=bundled
30588fi
30589
30590#
30591# If user didn't specify, use DEFAULT_ZLIB
30592#
30593if test "x${with_zlib}" = "x"; then
30594    with_zlib=${DEFAULT_ZLIB}
30595fi
30596
30597if test "x${with_zlib}" = "xbundled"; then
30598    USE_EXTERNAL_LIBZ=false
30599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30600$as_echo "bundled" >&6; }
30601elif test "x${with_zlib}" = "xsystem"; then
30602    if test "x${ZLIB_FOUND}" = "xyes"; then
30603        USE_EXTERNAL_LIBZ=true
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30605$as_echo "system" >&6; }
30606    else
30607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30608$as_echo "system not found" >&6; }
30609        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30610    fi
30611else
30612    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30613fi
30614
30615
30616
30617###############################################################################
30618LIBZIP_CAN_USE_MMAP=true
30619
30620
30621
30622###############################################################################
30623#
30624# Check if altzone exists in time.h
30625#
30626
30627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30628/* end confdefs.h.  */
30629#include <time.h>
30630int
30631main ()
30632{
30633return (int)altzone;
30634  ;
30635  return 0;
30636}
30637_ACEOF
30638if ac_fn_cxx_try_link "$LINENO"; then :
30639  has_altzone=yes
30640else
30641  has_altzone=no
30642fi
30643rm -f core conftest.err conftest.$ac_objext \
30644    conftest$ac_exeext conftest.$ac_ext
30645if test "x$has_altzone" = xyes; then
30646
30647$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30648
30649fi
30650
30651###############################################################################
30652#
30653# Check the maths library
30654#
30655
30656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30657$as_echo_n "checking for cos in -lm... " >&6; }
30658if test "${ac_cv_lib_m_cos+set}" = set; then :
30659  $as_echo_n "(cached) " >&6
30660else
30661  ac_check_lib_save_LIBS=$LIBS
30662LIBS="-lm  $LIBS"
30663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30664/* end confdefs.h.  */
30665
30666/* Override any GCC internal prototype to avoid an error.
30667   Use char because int might match the return type of a GCC
30668   builtin and then its argument prototype would still apply.  */
30669#ifdef __cplusplus
30670extern "C"
30671#endif
30672char cos ();
30673int
30674main ()
30675{
30676return cos ();
30677  ;
30678  return 0;
30679}
30680_ACEOF
30681if ac_fn_cxx_try_link "$LINENO"; then :
30682  ac_cv_lib_m_cos=yes
30683else
30684  ac_cv_lib_m_cos=no
30685fi
30686rm -f core conftest.err conftest.$ac_objext \
30687    conftest$ac_exeext conftest.$ac_ext
30688LIBS=$ac_check_lib_save_LIBS
30689fi
30690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30691$as_echo "$ac_cv_lib_m_cos" >&6; }
30692if test "x$ac_cv_lib_m_cos" = x""yes; then :
30693  cat >>confdefs.h <<_ACEOF
30694#define HAVE_LIBM 1
30695_ACEOF
30696
30697  LIBS="-lm $LIBS"
30698
30699else
30700
30701                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30702$as_echo "$as_me: Maths library was not found" >&6;}
30703
30704fi
30705
30706
30707
30708###############################################################################
30709#
30710# Check for libdl.so
30711
30712save_LIBS="$LIBS"
30713LIBS=""
30714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30715$as_echo_n "checking for dlopen in -ldl... " >&6; }
30716if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30717  $as_echo_n "(cached) " >&6
30718else
30719  ac_check_lib_save_LIBS=$LIBS
30720LIBS="-ldl  $LIBS"
30721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30722/* end confdefs.h.  */
30723
30724/* Override any GCC internal prototype to avoid an error.
30725   Use char because int might match the return type of a GCC
30726   builtin and then its argument prototype would still apply.  */
30727#ifdef __cplusplus
30728extern "C"
30729#endif
30730char dlopen ();
30731int
30732main ()
30733{
30734return dlopen ();
30735  ;
30736  return 0;
30737}
30738_ACEOF
30739if ac_fn_cxx_try_link "$LINENO"; then :
30740  ac_cv_lib_dl_dlopen=yes
30741else
30742  ac_cv_lib_dl_dlopen=no
30743fi
30744rm -f core conftest.err conftest.$ac_objext \
30745    conftest$ac_exeext conftest.$ac_ext
30746LIBS=$ac_check_lib_save_LIBS
30747fi
30748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30749$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30750if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30751  cat >>confdefs.h <<_ACEOF
30752#define HAVE_LIBDL 1
30753_ACEOF
30754
30755  LIBS="-ldl $LIBS"
30756
30757fi
30758
30759LIBDL="$LIBS"
30760
30761LIBS="$save_LIBS"
30762
30763
30764
30765###############################################################################
30766#
30767# statically link libstdc++ before C++ ABI is stablized on Linux unless
30768# dynamic build is configured on command line.
30769#
30770
30771# Check whether --with-stdc++lib was given.
30772if test "${with_stdc__lib+set}" = set; then :
30773  withval=$with_stdc__lib;
30774    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30775        && test "x$with_stdc__lib" != xdefault; then
30776      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30777    fi
30778
30779else
30780  with_stdc__lib=default
30781
30782fi
30783
30784
30785if test "x$OPENJDK_TARGET_OS" = xlinux; then
30786    # Test if -lstdc++ works.
30787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30788$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30789    ac_ext=cpp
30790ac_cpp='$CXXCPP $CPPFLAGS'
30791ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30792ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30793ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30794
30795    OLD_CXXFLAGS="$CXXFLAGS"
30796    CXXFLAGS="$CXXFLAGS -lstdc++"
30797    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30798/* end confdefs.h.  */
30799
30800int
30801main ()
30802{
30803return 0;
30804  ;
30805  return 0;
30806}
30807_ACEOF
30808if ac_fn_cxx_try_link "$LINENO"; then :
30809  has_dynamic_libstdcxx=yes
30810else
30811  has_dynamic_libstdcxx=no
30812fi
30813rm -f core conftest.err conftest.$ac_objext \
30814    conftest$ac_exeext conftest.$ac_ext
30815    CXXFLAGS="$OLD_CXXFLAGS"
30816    ac_ext=cpp
30817ac_cpp='$CXXCPP $CPPFLAGS'
30818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30821
30822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30823$as_echo "$has_dynamic_libstdcxx" >&6; }
30824
30825    # Test if stdc++ can be linked statically.
30826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30827$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30828    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30829    ac_ext=cpp
30830ac_cpp='$CXXCPP $CPPFLAGS'
30831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30834
30835    OLD_LIBS="$LIBS"
30836    OLD_CXX="$CXX"
30837    LIBS="$STATIC_STDCXX_FLAGS"
30838    CXX="$CC"
30839    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30840/* end confdefs.h.  */
30841
30842int
30843main ()
30844{
30845return 0;
30846  ;
30847  return 0;
30848}
30849_ACEOF
30850if ac_fn_cxx_try_link "$LINENO"; then :
30851  has_static_libstdcxx=yes
30852else
30853  has_static_libstdcxx=no
30854fi
30855rm -f core conftest.err conftest.$ac_objext \
30856    conftest$ac_exeext conftest.$ac_ext
30857    LIBS="$OLD_LIBS"
30858    CXX="$OLD_CXX"
30859    ac_ext=cpp
30860ac_cpp='$CXXCPP $CPPFLAGS'
30861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30864
30865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30866$as_echo "$has_static_libstdcxx" >&6; }
30867
30868    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30869        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30870    fi
30871
30872    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30873        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30874    fi
30875
30876    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30877        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30878    fi
30879
30880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30881$as_echo_n "checking how to link with libstdc++... " >&6; }
30882    # If dynamic was requested, it's available since it would fail above otherwise.
30883    # If dynamic wasn't requested, go with static unless it isn't available.
30884    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30885        LIBCXX="$LIBCXX -lstdc++"
30886        LDCXX="$CXX"
30887        STATIC_CXX_SETTING="STATIC_CXX=false"
30888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30889$as_echo "dynamic" >&6; }
30890    else
30891        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30892        LDCXX="$CC"
30893        STATIC_CXX_SETTING="STATIC_CXX=true"
30894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30895$as_echo "static" >&6; }
30896    fi
30897fi
30898
30899
30900# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30901if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30902    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30903fi
30904
30905# TODO better (platform agnostic) test
30906if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30907    LIBCXX="-lstdc++"
30908fi
30909
30910
30911
30912
30913
30914# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30915
30916# When using cygwin or msys, we need a wrapper binary that renames
30917# /cygdrive/c/ arguments into c:/ arguments and peeks into
30918# @files and rewrites these too! This wrapper binary is
30919# called fixpath.
30920FIXPATH=
30921if test "x$OPENJDK_BUILD_OS" = xwindows; then
30922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30923$as_echo_n "checking if fixpath can be created... " >&6; }
30924    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30925    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30926    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30927      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30928      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30929      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30930      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30931    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30932      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30933      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30934
30935      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30936      # @ was chosen as separator to minimize risk of other tools messing around with it
30937      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30938      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30939
30940      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30941    fi
30942    rm -f $OUTPUT_ROOT/fixpath*
30943    cd $OUTPUT_ROOT
30944    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30945    cd $CURDIR
30946
30947    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30949$as_echo "no" >&6; }
30950        cat $OUTPUT_ROOT/fixpath1.log
30951        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30952    fi
30953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30954$as_echo "yes" >&6; }
30955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30956$as_echo_n "checking if fixpath.exe works... " >&6; }
30957    cd $OUTPUT_ROOT
30958    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30959    cd $CURDIR
30960    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30962$as_echo "no" >&6; }
30963        cat $OUTPUT_ROOT/fixpath2.log
30964        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30965    fi
30966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30967$as_echo "yes" >&6; }
30968    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30969fi
30970
30971
30972
30973
30974###############################################################################
30975#
30976# We need to do some final tweaking, when everything else is done.
30977#
30978###############################################################################
30979
30980
30981HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30982
30983
30984# The name of the Service Agent jar.
30985SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30986if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30987    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30988fi
30989
30990
30991
30992
30993###############################################################################
30994#
30995# Configure parts of the build that only affect the build performance,
30996# not the result.
30997#
30998###############################################################################
30999
31000
31001# How many cores do we have on this build system?
31002
31003# Check whether --with-num-cores was given.
31004if test "${with_num_cores+set}" = set; then :
31005  withval=$with_num_cores;
31006fi
31007
31008if test "x$with_num_cores" = x; then
31009    # The number of cores were not specified, try to probe them.
31010
31011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31012$as_echo_n "checking for number of cores... " >&6; }
31013    NUM_CORES=1
31014    FOUND_CORES=no
31015
31016    if test -f /proc/cpuinfo; then
31017        # Looks like a Linux (or cygwin) system
31018        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31019        FOUND_CORES=yes
31020    elif test -x /usr/sbin/psrinfo; then
31021        # Looks like a Solaris system
31022        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31023        FOUND_CORES=yes
31024    elif test -x /usr/sbin/system_profiler; then
31025        # Looks like a MacOSX system
31026        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31027        FOUND_CORES=yes
31028    elif test -n "$NUMBER_OF_PROCESSORS"; then
31029        # On windows, look in the env
31030        NUM_CORES=$NUMBER_OF_PROCESSORS
31031        FOUND_CORES=yes
31032    fi
31033
31034    # For c/c++ code we run twice as many concurrent build
31035    # jobs than we have cores, otherwise we will stall on io.
31036    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31037
31038    if test "x$FOUND_CORES" = xyes; then
31039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31040$as_echo "$NUM_CORES" >&6; }
31041    else
31042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31043$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31045$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31046    fi
31047
31048
31049else
31050    NUM_CORES=$with_num_cores
31051    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31052fi
31053
31054
31055
31056
31057# How much memory do we have on this build system?
31058
31059# Check whether --with-memory-size was given.
31060if test "${with_memory_size+set}" = set; then :
31061  withval=$with_memory_size;
31062fi
31063
31064if test "x$with_memory_size" = x; then
31065    # The memory size was not specified, try to probe it.
31066
31067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31068$as_echo_n "checking for memory size... " >&6; }
31069    # Default to 1024 MB
31070    MEMORY_SIZE=1024
31071    FOUND_MEM=no
31072
31073    if test -f /proc/meminfo; then
31074        # Looks like a Linux (or cygwin) system
31075        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31076        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31077        FOUND_MEM=yes
31078    elif test -x /usr/sbin/prtconf; then
31079        # Looks like a Solaris system
31080        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31081        FOUND_MEM=yes
31082    elif test -x /usr/sbin/system_profiler; then
31083        # Looks like a MacOSX system
31084        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31085        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31086        FOUND_MEM=yes
31087    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31088        # Windows, but without cygwin
31089        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31090        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31091        FOUND_MEM=yes
31092    fi
31093
31094    if test "x$FOUND_MEM" = xyes; then
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31096$as_echo "$MEMORY_SIZE MB" >&6; }
31097    else
31098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31099$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31101$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31102    fi
31103
31104else
31105    MEMORY_SIZE=$with_memory_size
31106fi
31107
31108
31109
31110# Setup smart javac (after cores and memory have been setup)
31111
31112
31113# Check whether --with-sjavac-server-java was given.
31114if test "${with_sjavac_server_java+set}" = set; then :
31115  withval=$with_sjavac_server_java;
31116fi
31117
31118
31119if test "x$with_sjavac_server_java" != x; then
31120    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31121    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31122    if test "x$FOUND_VERSION" = x; then
31123        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31124    fi
31125else
31126    SJAVAC_SERVER_JAVA=""
31127    # Hotspot specific options.
31128
31129    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31130    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31131    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31132    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31133    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31134        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31135    fi
31136
31137    # JRockit specific options.
31138
31139    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31140    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31141    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31142    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31143    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31144        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31145    fi
31146
31147    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31148fi
31149
31150
31151
31152# Check whether --with-sjavac-server-cores was given.
31153if test "${with_sjavac_server_cores+set}" = set; then :
31154  withval=$with_sjavac_server_cores;
31155fi
31156
31157if test "x$with_sjavac_server_cores" != x; then
31158    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31159else
31160    if test "$NUM_CORES" -gt 16; then
31161        # We set this arbitrary limit because we want to limit the heap
31162        # size of the javac server.
31163        # In the future we will make the javac compilers in the server
31164        # share more and more state, thus enabling us to use more and
31165        # more concurrent threads in the server.
31166        SJAVAC_SERVER_CORES="16"
31167    else
31168        SJAVAC_SERVER_CORES="$NUM_CORES"
31169    fi
31170
31171    if test "$MEMORY_SIZE" -gt "17000"; then
31172        MAX_HEAP_MEM=10000
31173
31174    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31175    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31176    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31177    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31178    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31179        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31180    fi
31181
31182
31183    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31184    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31185    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31186    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31187    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31188        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31189    fi
31190
31191    elif test "$MEMORY_SIZE" -gt "10000"; then
31192        MAX_HEAP_MEM=6000
31193
31194    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31195    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31196    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31197    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31198    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31199        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31200    fi
31201
31202
31203    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31204    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31205    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31206    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31207    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31208        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31209    fi
31210
31211    elif test "$MEMORY_SIZE" -gt "5000"; then
31212        MAX_HEAP_MEM=3000
31213
31214    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31215    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31216    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31217    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31218    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31219        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31220    fi
31221
31222
31223    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31224    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31225    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31226    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31227    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31228        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31229    fi
31230
31231    elif test "$MEMORY_SIZE" -gt "3800"; then
31232        MAX_HEAP_MEM=2500
31233
31234    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31235    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31236    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31237    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31238    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31239        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31240    fi
31241
31242    elif test "$MEMORY_SIZE" -gt "1900"; then
31243        MAX_HEAP_MEM=1200
31244
31245    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31246    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31247    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31248    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31249    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31250        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31251    fi
31252
31253    elif test "$MEMORY_SIZE" -gt "1000"; then
31254        MAX_HEAP_MEM=900
31255
31256    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31257    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31258    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31259    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31260    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31261        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31262    fi
31263
31264    else
31265        MAX_HEAP_MEM=512
31266
31267    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31268    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31269    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31270    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31271    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31272        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31273    fi
31274
31275    fi
31276
31277
31278    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31279    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31280    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31281    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31282    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31283        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31284    fi
31285
31286
31287    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31288    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31289    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31290    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31291    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31292        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31293    fi
31294
31295
31296    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31297    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31298    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31299    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31300    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31301        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31302    fi
31303
31304
31305    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31306    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31308$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31309        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31311$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31312    fi
31313fi
31314
31315
31316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31317$as_echo_n "checking whether to use sjavac... " >&6; }
31318# Check whether --enable-sjavac was given.
31319if test "${enable_sjavac+set}" = set; then :
31320  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31321else
31322  ENABLE_SJAVAC='no'
31323fi
31324
31325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31326$as_echo "$ENABLE_SJAVAC" >&6; }
31327
31328
31329if test "x$ENABLE_SJAVAC" = xyes; then
31330    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31331else
31332    SJAVAC_SERVER_DIR=
31333fi
31334
31335
31336
31337
31338# Can the C/C++ compiler use precompiled headers?
31339
31340
31341###############################################################################
31342#
31343# Can the C/C++ compiler use precompiled headers?
31344#
31345# Check whether --enable-precompiled-headers was given.
31346if test "${enable_precompiled_headers+set}" = set; then :
31347  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31348else
31349  ENABLE_PRECOMPH=yes
31350fi
31351
31352
31353USE_PRECOMPILED_HEADER=1
31354if test "x$ENABLE_PRECOMPH" = xno; then
31355    USE_PRECOMPILED_HEADER=0
31356fi
31357
31358if test "x$ENABLE_PRECOMPH" = xyes; then
31359    # Check that the compiler actually supports precomp headers.
31360    if test "x$GCC" = xyes; then
31361         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31362$as_echo_n "checking that precompiled headers work... " >&6; }
31363         echo "int alfa();" > conftest.h
31364         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31365         if test ! -f conftest.hpp.gch; then
31366             USE_PRECOMPILED_HEADER=0
31367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31368$as_echo "no" >&6; }
31369         else
31370             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31371$as_echo "yes" >&6; }
31372         fi
31373         rm -f conftest.h conftest.hpp.gch
31374    fi
31375fi
31376
31377
31378
31379
31380# Setup use of ccache, if available
31381
31382    # Check whether --enable-ccache was given.
31383if test "${enable_ccache+set}" = set; then :
31384  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31385else
31386  ENABLE_CCACHE=yes
31387fi
31388
31389    if test "x$ENABLE_CCACHE" = xyes; then
31390        # Extract the first word of "ccache", so it can be a program name with args.
31391set dummy ccache; ac_word=$2
31392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31393$as_echo_n "checking for $ac_word... " >&6; }
31394if test "${ac_cv_path_CCACHE+set}" = set; then :
31395  $as_echo_n "(cached) " >&6
31396else
31397  case $CCACHE in
31398  [\\/]* | ?:[\\/]*)
31399  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31400  ;;
31401  *)
31402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31403for as_dir in $PATH
31404do
31405  IFS=$as_save_IFS
31406  test -z "$as_dir" && as_dir=.
31407    for ac_exec_ext in '' $ac_executable_extensions; do
31408  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31409    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31411    break 2
31412  fi
31413done
31414  done
31415IFS=$as_save_IFS
31416
31417  ;;
31418esac
31419fi
31420CCACHE=$ac_cv_path_CCACHE
31421if test -n "$CCACHE"; then
31422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31423$as_echo "$CCACHE" >&6; }
31424else
31425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31426$as_echo "no" >&6; }
31427fi
31428
31429
31430    else
31431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31432$as_echo_n "checking for ccache... " >&6; }
31433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31434$as_echo "explicitly disabled" >&6; }
31435        CCACHE=
31436    fi
31437
31438
31439
31440# Check whether --with-ccache-dir was given.
31441if test "${with_ccache_dir+set}" = set; then :
31442  withval=$with_ccache_dir;
31443fi
31444
31445
31446    if test "x$with_ccache_dir" != x; then
31447        # When using a non home ccache directory, assume the use is to share ccache files
31448        # with other users. Thus change the umask.
31449        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31450    fi
31451    CCACHE_FOUND=""
31452    if test "x$CCACHE" != x; then
31453
31454    if test "x$CCACHE" != x; then
31455        CCACHE_FOUND="true"
31456        # Only use ccache if it is 3.1.4 or later, which supports
31457        # precompiled headers.
31458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31459$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31460        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31461        if test "x$HAS_GOOD_CCACHE" = x; then
31462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31463$as_echo "no, disabling ccache" >&6; }
31464            CCACHE=
31465        else
31466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31467$as_echo "yes" >&6; }
31468            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31469$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31470            PUSHED_FLAGS="$CXXFLAGS"
31471            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31472            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31473/* end confdefs.h.  */
31474
31475int
31476main ()
31477{
31478
31479  ;
31480  return 0;
31481}
31482_ACEOF
31483if ac_fn_cxx_try_compile "$LINENO"; then :
31484  CC_KNOWS_CCACHE_TRICK=yes
31485else
31486  CC_KNOWS_CCACHE_TRICK=no
31487fi
31488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31489            CXXFLAGS="$PUSHED_FLAGS"
31490            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31491                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31492$as_echo "yes" >&6; }
31493            else
31494                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31495$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31496                CCACHE=
31497            fi
31498        fi
31499    fi
31500
31501    if test "x$CCACHE" != x; then
31502        CCACHE_SLOPPINESS=time_macros
31503        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31504        CCACHE_FLAGS=-fpch-preprocess
31505
31506        if test "x$SET_CCACHE_DIR" != x; then
31507            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31508	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31509        fi
31510    fi
31511
31512    fi
31513
31514
31515###############################################################################
31516#
31517# And now the finish...
31518#
31519###############################################################################
31520
31521# Check for some common pitfalls
31522
31523
31524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31525$as_echo_n "checking if build directory is on local disk... " >&6; }
31526
31527	# df -l lists only local disks; if the given directory is not found then
31528	# a non-zero exit code is given
31529  if test "x$DF" = x; then
31530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31531      # msys does not have df; use Windows "net use" instead.
31532      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31533      if test "x$IS_NETWORK_DISK" = x; then
31534        OUTPUT_DIR_IS_LOCAL="yes"
31535      else
31536        OUTPUT_DIR_IS_LOCAL="no"
31537      fi
31538    else
31539      # No df here, say it's local
31540      OUTPUT_DIR_IS_LOCAL="yes"
31541    fi
31542  else
31543    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31544      OUTPUT_DIR_IS_LOCAL="yes"
31545    else
31546      OUTPUT_DIR_IS_LOCAL="no"
31547    fi
31548  fi
31549
31550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31551$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31552
31553# Check if the user has any old-style ALT_ variables set.
31554FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31555
31556# Before generating output files, test if they exist. If they do, this is a reconfigure.
31557# Since we can't properly handle the dependencies for this, warn the user about the situation
31558if test -e $OUTPUT_ROOT/spec.gmk; then
31559  IS_RECONFIGURE=yes
31560else
31561  IS_RECONFIGURE=no
31562fi
31563
31564if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31565  HIDE_PERFORMANCE_HINTS=yes
31566else
31567  HIDE_PERFORMANCE_HINTS=no
31568  # Hide it the next time around...
31569  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31570fi
31571
31572
31573
31574# At the end, call the custom hook. (Dummy macro if no custom sources available)
31575
31576
31577# We're messing a bit with internal autoconf variables to put the config.status
31578# in the output directory instead of the current directory.
31579CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31580# Create the actual output files. Now the main work of configure is done.
31581cat >confcache <<\_ACEOF
31582# This file is a shell script that caches the results of configure
31583# tests run on this system so they can be shared between configure
31584# scripts and configure runs, see configure's option --config-cache.
31585# It is not useful on other systems.  If it contains results you don't
31586# want to keep, you may remove or edit it.
31587#
31588# config.status only pays attention to the cache file if you give it
31589# the --recheck option to rerun configure.
31590#
31591# `ac_cv_env_foo' variables (set or unset) will be overridden when
31592# loading this file, other *unset* `ac_cv_foo' will be assigned the
31593# following values.
31594
31595_ACEOF
31596
31597# The following way of writing the cache mishandles newlines in values,
31598# but we know of no workaround that is simple, portable, and efficient.
31599# So, we kill variables containing newlines.
31600# Ultrix sh set writes to stderr and can't be redirected directly,
31601# and sets the high bit in the cache file unless we assign to the vars.
31602(
31603  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31604    eval ac_val=\$$ac_var
31605    case $ac_val in #(
31606    *${as_nl}*)
31607      case $ac_var in #(
31608      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31609$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31610      esac
31611      case $ac_var in #(
31612      _ | IFS | as_nl) ;; #(
31613      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31614      *) { eval $ac_var=; unset $ac_var;} ;;
31615      esac ;;
31616    esac
31617  done
31618
31619  (set) 2>&1 |
31620    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31621    *${as_nl}ac_space=\ *)
31622      # `set' does not quote correctly, so add quotes: double-quote
31623      # substitution turns \\\\ into \\, and sed turns \\ into \.
31624      sed -n \
31625	"s/'/'\\\\''/g;
31626	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31627      ;; #(
31628    *)
31629      # `set' quotes correctly as required by POSIX, so do not add quotes.
31630      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31631      ;;
31632    esac |
31633    sort
31634) |
31635  sed '
31636     /^ac_cv_env_/b end
31637     t clear
31638     :clear
31639     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31640     t end
31641     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31642     :end' >>confcache
31643if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31644  if test -w "$cache_file"; then
31645    test "x$cache_file" != "x/dev/null" &&
31646      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31647$as_echo "$as_me: updating cache $cache_file" >&6;}
31648    cat confcache >$cache_file
31649  else
31650    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31651$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31652  fi
31653fi
31654rm -f confcache
31655
31656test "x$prefix" = xNONE && prefix=$ac_default_prefix
31657# Let make expand exec_prefix.
31658test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31659
31660DEFS=-DHAVE_CONFIG_H
31661
31662ac_libobjs=
31663ac_ltlibobjs=
31664U=
31665for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31666  # 1. Remove the extension, and $U if already installed.
31667  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31668  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31669  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31670  #    will be set to the directory where LIBOBJS objects are built.
31671  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31672  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31673done
31674LIBOBJS=$ac_libobjs
31675
31676LTLIBOBJS=$ac_ltlibobjs
31677
31678
31679
31680: ${CONFIG_STATUS=./config.status}
31681ac_write_fail=0
31682ac_clean_files_save=$ac_clean_files
31683ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31684{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31685$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31686as_write_fail=0
31687cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31688#! $SHELL
31689# Generated by $as_me.
31690# Run this file to recreate the current configuration.
31691# Compiler output produced by configure, useful for debugging
31692# configure, is in config.log if it exists.
31693
31694debug=false
31695ac_cs_recheck=false
31696ac_cs_silent=false
31697
31698SHELL=\${CONFIG_SHELL-$SHELL}
31699export SHELL
31700_ASEOF
31701cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31702## -------------------- ##
31703## M4sh Initialization. ##
31704## -------------------- ##
31705
31706# Be more Bourne compatible
31707DUALCASE=1; export DUALCASE # for MKS sh
31708if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31709  emulate sh
31710  NULLCMD=:
31711  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31712  # is contrary to our usage.  Disable this feature.
31713  alias -g '${1+"$@"}'='"$@"'
31714  setopt NO_GLOB_SUBST
31715else
31716  case `(set -o) 2>/dev/null` in #(
31717  *posix*) :
31718    set -o posix ;; #(
31719  *) :
31720     ;;
31721esac
31722fi
31723
31724
31725as_nl='
31726'
31727export as_nl
31728# Printing a long string crashes Solaris 7 /usr/bin/printf.
31729as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31730as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31731as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31732# Prefer a ksh shell builtin over an external printf program on Solaris,
31733# but without wasting forks for bash or zsh.
31734if test -z "$BASH_VERSION$ZSH_VERSION" \
31735    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31736  as_echo='print -r --'
31737  as_echo_n='print -rn --'
31738elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31739  as_echo='printf %s\n'
31740  as_echo_n='printf %s'
31741else
31742  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31743    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31744    as_echo_n='/usr/ucb/echo -n'
31745  else
31746    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31747    as_echo_n_body='eval
31748      arg=$1;
31749      case $arg in #(
31750      *"$as_nl"*)
31751	expr "X$arg" : "X\\(.*\\)$as_nl";
31752	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31753      esac;
31754      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31755    '
31756    export as_echo_n_body
31757    as_echo_n='sh -c $as_echo_n_body as_echo'
31758  fi
31759  export as_echo_body
31760  as_echo='sh -c $as_echo_body as_echo'
31761fi
31762
31763# The user is always right.
31764if test "${PATH_SEPARATOR+set}" != set; then
31765  PATH_SEPARATOR=:
31766  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31767    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31768      PATH_SEPARATOR=';'
31769  }
31770fi
31771
31772
31773# IFS
31774# We need space, tab and new line, in precisely that order.  Quoting is
31775# there to prevent editors from complaining about space-tab.
31776# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31777# splitting by setting IFS to empty value.)
31778IFS=" ""	$as_nl"
31779
31780# Find who we are.  Look in the path if we contain no directory separator.
31781case $0 in #((
31782  *[\\/]* ) as_myself=$0 ;;
31783  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31784for as_dir in $PATH
31785do
31786  IFS=$as_save_IFS
31787  test -z "$as_dir" && as_dir=.
31788    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31789  done
31790IFS=$as_save_IFS
31791
31792     ;;
31793esac
31794# We did not find ourselves, most probably we were run as `sh COMMAND'
31795# in which case we are not to be found in the path.
31796if test "x$as_myself" = x; then
31797  as_myself=$0
31798fi
31799if test ! -f "$as_myself"; then
31800  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31801  exit 1
31802fi
31803
31804# Unset variables that we do not need and which cause bugs (e.g. in
31805# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31806# suppresses any "Segmentation fault" message there.  '((' could
31807# trigger a bug in pdksh 5.2.14.
31808for as_var in BASH_ENV ENV MAIL MAILPATH
31809do eval test x\${$as_var+set} = xset \
31810  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31811done
31812PS1='$ '
31813PS2='> '
31814PS4='+ '
31815
31816# NLS nuisances.
31817LC_ALL=C
31818export LC_ALL
31819LANGUAGE=C
31820export LANGUAGE
31821
31822# CDPATH.
31823(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31824
31825
31826# as_fn_error STATUS ERROR [LINENO LOG_FD]
31827# ----------------------------------------
31828# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31829# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31830# script with STATUS, using 1 if that was 0.
31831as_fn_error ()
31832{
31833  as_status=$1; test $as_status -eq 0 && as_status=1
31834  if test "$4"; then
31835    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31836    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31837  fi
31838  $as_echo "$as_me: error: $2" >&2
31839  as_fn_exit $as_status
31840} # as_fn_error
31841
31842
31843# as_fn_set_status STATUS
31844# -----------------------
31845# Set $? to STATUS, without forking.
31846as_fn_set_status ()
31847{
31848  return $1
31849} # as_fn_set_status
31850
31851# as_fn_exit STATUS
31852# -----------------
31853# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31854as_fn_exit ()
31855{
31856  set +e
31857  as_fn_set_status $1
31858  exit $1
31859} # as_fn_exit
31860
31861# as_fn_unset VAR
31862# ---------------
31863# Portably unset VAR.
31864as_fn_unset ()
31865{
31866  { eval $1=; unset $1;}
31867}
31868as_unset=as_fn_unset
31869# as_fn_append VAR VALUE
31870# ----------------------
31871# Append the text in VALUE to the end of the definition contained in VAR. Take
31872# advantage of any shell optimizations that allow amortized linear growth over
31873# repeated appends, instead of the typical quadratic growth present in naive
31874# implementations.
31875if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31876  eval 'as_fn_append ()
31877  {
31878    eval $1+=\$2
31879  }'
31880else
31881  as_fn_append ()
31882  {
31883    eval $1=\$$1\$2
31884  }
31885fi # as_fn_append
31886
31887# as_fn_arith ARG...
31888# ------------------
31889# Perform arithmetic evaluation on the ARGs, and store the result in the
31890# global $as_val. Take advantage of shells that can avoid forks. The arguments
31891# must be portable across $(()) and expr.
31892if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31893  eval 'as_fn_arith ()
31894  {
31895    as_val=$(( $* ))
31896  }'
31897else
31898  as_fn_arith ()
31899  {
31900    as_val=`expr "$@" || test $? -eq 1`
31901  }
31902fi # as_fn_arith
31903
31904
31905if expr a : '\(a\)' >/dev/null 2>&1 &&
31906   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31907  as_expr=expr
31908else
31909  as_expr=false
31910fi
31911
31912if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31913  as_basename=basename
31914else
31915  as_basename=false
31916fi
31917
31918if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31919  as_dirname=dirname
31920else
31921  as_dirname=false
31922fi
31923
31924as_me=`$as_basename -- "$0" ||
31925$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31926	 X"$0" : 'X\(//\)$' \| \
31927	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31928$as_echo X/"$0" |
31929    sed '/^.*\/\([^/][^/]*\)\/*$/{
31930	    s//\1/
31931	    q
31932	  }
31933	  /^X\/\(\/\/\)$/{
31934	    s//\1/
31935	    q
31936	  }
31937	  /^X\/\(\/\).*/{
31938	    s//\1/
31939	    q
31940	  }
31941	  s/.*/./; q'`
31942
31943# Avoid depending upon Character Ranges.
31944as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31945as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31946as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31947as_cr_digits='0123456789'
31948as_cr_alnum=$as_cr_Letters$as_cr_digits
31949
31950ECHO_C= ECHO_N= ECHO_T=
31951case `echo -n x` in #(((((
31952-n*)
31953  case `echo 'xy\c'` in
31954  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31955  xy)  ECHO_C='\c';;
31956  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31957       ECHO_T='	';;
31958  esac;;
31959*)
31960  ECHO_N='-n';;
31961esac
31962
31963rm -f conf$$ conf$$.exe conf$$.file
31964if test -d conf$$.dir; then
31965  rm -f conf$$.dir/conf$$.file
31966else
31967  rm -f conf$$.dir
31968  mkdir conf$$.dir 2>/dev/null
31969fi
31970if (echo >conf$$.file) 2>/dev/null; then
31971  if ln -s conf$$.file conf$$ 2>/dev/null; then
31972    as_ln_s='ln -s'
31973    # ... but there are two gotchas:
31974    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31975    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31976    # In both cases, we have to default to `cp -p'.
31977    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31978      as_ln_s='cp -p'
31979  elif ln conf$$.file conf$$ 2>/dev/null; then
31980    as_ln_s=ln
31981  else
31982    as_ln_s='cp -p'
31983  fi
31984else
31985  as_ln_s='cp -p'
31986fi
31987rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31988rmdir conf$$.dir 2>/dev/null
31989
31990
31991# as_fn_mkdir_p
31992# -------------
31993# Create "$as_dir" as a directory, including parents if necessary.
31994as_fn_mkdir_p ()
31995{
31996
31997  case $as_dir in #(
31998  -*) as_dir=./$as_dir;;
31999  esac
32000  test -d "$as_dir" || eval $as_mkdir_p || {
32001    as_dirs=
32002    while :; do
32003      case $as_dir in #(
32004      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32005      *) as_qdir=$as_dir;;
32006      esac
32007      as_dirs="'$as_qdir' $as_dirs"
32008      as_dir=`$as_dirname -- "$as_dir" ||
32009$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32010	 X"$as_dir" : 'X\(//\)[^/]' \| \
32011	 X"$as_dir" : 'X\(//\)$' \| \
32012	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32013$as_echo X"$as_dir" |
32014    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32015	    s//\1/
32016	    q
32017	  }
32018	  /^X\(\/\/\)[^/].*/{
32019	    s//\1/
32020	    q
32021	  }
32022	  /^X\(\/\/\)$/{
32023	    s//\1/
32024	    q
32025	  }
32026	  /^X\(\/\).*/{
32027	    s//\1/
32028	    q
32029	  }
32030	  s/.*/./; q'`
32031      test -d "$as_dir" && break
32032    done
32033    test -z "$as_dirs" || eval "mkdir $as_dirs"
32034  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32035
32036
32037} # as_fn_mkdir_p
32038if mkdir -p . 2>/dev/null; then
32039  as_mkdir_p='mkdir -p "$as_dir"'
32040else
32041  test -d ./-p && rmdir ./-p
32042  as_mkdir_p=false
32043fi
32044
32045if test -x / >/dev/null 2>&1; then
32046  as_test_x='test -x'
32047else
32048  if ls -dL / >/dev/null 2>&1; then
32049    as_ls_L_option=L
32050  else
32051    as_ls_L_option=
32052  fi
32053  as_test_x='
32054    eval sh -c '\''
32055      if test -d "$1"; then
32056	test -d "$1/.";
32057      else
32058	case $1 in #(
32059	-*)set "./$1";;
32060	esac;
32061	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32062	???[sx]*):;;*)false;;esac;fi
32063    '\'' sh
32064  '
32065fi
32066as_executable_p=$as_test_x
32067
32068# Sed expression to map a string onto a valid CPP name.
32069as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32070
32071# Sed expression to map a string onto a valid variable name.
32072as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32073
32074
32075exec 6>&1
32076## ----------------------------------- ##
32077## Main body of $CONFIG_STATUS script. ##
32078## ----------------------------------- ##
32079_ASEOF
32080test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32081
32082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32083# Save the log message, to keep $0 and so on meaningful, and to
32084# report actual input values of CONFIG_FILES etc. instead of their
32085# values after options handling.
32086ac_log="
32087This file was extended by OpenJDK $as_me jdk8, which was
32088generated by GNU Autoconf 2.67.  Invocation command line was
32089
32090  CONFIG_FILES    = $CONFIG_FILES
32091  CONFIG_HEADERS  = $CONFIG_HEADERS
32092  CONFIG_LINKS    = $CONFIG_LINKS
32093  CONFIG_COMMANDS = $CONFIG_COMMANDS
32094  $ $0 $@
32095
32096on `(hostname || uname -n) 2>/dev/null | sed 1q`
32097"
32098
32099_ACEOF
32100
32101case $ac_config_files in *"
32102"*) set x $ac_config_files; shift; ac_config_files=$*;;
32103esac
32104
32105case $ac_config_headers in *"
32106"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32107esac
32108
32109
32110cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32111# Files that config.status was made for.
32112config_files="$ac_config_files"
32113config_headers="$ac_config_headers"
32114
32115_ACEOF
32116
32117cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32118ac_cs_usage="\
32119\`$as_me' instantiates files and other configuration actions
32120from templates according to the current configuration.  Unless the files
32121and actions are specified as TAGs, all are instantiated by default.
32122
32123Usage: $0 [OPTION]... [TAG]...
32124
32125  -h, --help       print this help, then exit
32126  -V, --version    print version number and configuration settings, then exit
32127      --config     print configuration, then exit
32128  -q, --quiet, --silent
32129                   do not print progress messages
32130  -d, --debug      don't remove temporary files
32131      --recheck    update $as_me by reconfiguring in the same conditions
32132      --file=FILE[:TEMPLATE]
32133                   instantiate the configuration file FILE
32134      --header=FILE[:TEMPLATE]
32135                   instantiate the configuration header FILE
32136
32137Configuration files:
32138$config_files
32139
32140Configuration headers:
32141$config_headers
32142
32143Report bugs to <build-dev@openjdk.java.net>.
32144OpenJDK home page: <http://openjdk.java.net>."
32145
32146_ACEOF
32147cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32148ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32149ac_cs_version="\\
32150OpenJDK config.status jdk8
32151configured by $0, generated by GNU Autoconf 2.67,
32152  with options \\"\$ac_cs_config\\"
32153
32154Copyright (C) 2010 Free Software Foundation, Inc.
32155This config.status script is free software; the Free Software Foundation
32156gives unlimited permission to copy, distribute and modify it."
32157
32158ac_pwd='$ac_pwd'
32159srcdir='$srcdir'
32160AWK='$AWK'
32161test -n "\$AWK" || AWK=awk
32162_ACEOF
32163
32164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32165# The default lists apply if the user does not specify any file.
32166ac_need_defaults=:
32167while test $# != 0
32168do
32169  case $1 in
32170  --*=?*)
32171    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32172    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32173    ac_shift=:
32174    ;;
32175  --*=)
32176    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32177    ac_optarg=
32178    ac_shift=:
32179    ;;
32180  *)
32181    ac_option=$1
32182    ac_optarg=$2
32183    ac_shift=shift
32184    ;;
32185  esac
32186
32187  case $ac_option in
32188  # Handling of the options.
32189  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32190    ac_cs_recheck=: ;;
32191  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32192    $as_echo "$ac_cs_version"; exit ;;
32193  --config | --confi | --conf | --con | --co | --c )
32194    $as_echo "$ac_cs_config"; exit ;;
32195  --debug | --debu | --deb | --de | --d | -d )
32196    debug=: ;;
32197  --file | --fil | --fi | --f )
32198    $ac_shift
32199    case $ac_optarg in
32200    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32201    '') as_fn_error $? "missing file argument" ;;
32202    esac
32203    as_fn_append CONFIG_FILES " '$ac_optarg'"
32204    ac_need_defaults=false;;
32205  --header | --heade | --head | --hea )
32206    $ac_shift
32207    case $ac_optarg in
32208    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32209    esac
32210    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32211    ac_need_defaults=false;;
32212  --he | --h)
32213    # Conflict between --help and --header
32214    as_fn_error $? "ambiguous option: \`$1'
32215Try \`$0 --help' for more information.";;
32216  --help | --hel | -h )
32217    $as_echo "$ac_cs_usage"; exit ;;
32218  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32219  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32220    ac_cs_silent=: ;;
32221
32222  # This is an error.
32223  -*) as_fn_error $? "unrecognized option: \`$1'
32224Try \`$0 --help' for more information." ;;
32225
32226  *) as_fn_append ac_config_targets " $1"
32227     ac_need_defaults=false ;;
32228
32229  esac
32230  shift
32231done
32232
32233ac_configure_extra_args=
32234
32235if $ac_cs_silent; then
32236  exec 6>/dev/null
32237  ac_configure_extra_args="$ac_configure_extra_args --silent"
32238fi
32239
32240_ACEOF
32241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32242if \$ac_cs_recheck; then
32243  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32244  shift
32245  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32246  CONFIG_SHELL='$SHELL'
32247  export CONFIG_SHELL
32248  exec "\$@"
32249fi
32250
32251_ACEOF
32252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32253exec 5>>config.log
32254{
32255  echo
32256  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32257## Running $as_me. ##
32258_ASBOX
32259  $as_echo "$ac_log"
32260} >&5
32261
32262_ACEOF
32263cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32264_ACEOF
32265
32266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32267
32268# Handling of arguments.
32269for ac_config_target in $ac_config_targets
32270do
32271  case $ac_config_target in
32272    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32273    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32274    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32275    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32276    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32277    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32278    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32279
32280  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32281  esac
32282done
32283
32284
32285# If the user did not use the arguments to specify the items to instantiate,
32286# then the envvar interface is used.  Set only those that are not.
32287# We use the long form for the default assignment because of an extremely
32288# bizarre bug on SunOS 4.1.3.
32289if $ac_need_defaults; then
32290  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32291  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32292fi
32293
32294# Have a temporary directory for convenience.  Make it in the build tree
32295# simply because there is no reason against having it here, and in addition,
32296# creating and moving files from /tmp can sometimes cause problems.
32297# Hook for its removal unless debugging.
32298# Note that there is a small window in which the directory will not be cleaned:
32299# after its creation but before its name has been assigned to `$tmp'.
32300$debug ||
32301{
32302  tmp=
32303  trap 'exit_status=$?
32304  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32305' 0
32306  trap 'as_fn_exit 1' 1 2 13 15
32307}
32308# Create a (secure) tmp directory for tmp files.
32309
32310{
32311  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32312  test -n "$tmp" && test -d "$tmp"
32313}  ||
32314{
32315  tmp=./conf$$-$RANDOM
32316  (umask 077 && mkdir "$tmp")
32317} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32318
32319# Set up the scripts for CONFIG_FILES section.
32320# No need to generate them if there are no CONFIG_FILES.
32321# This happens for instance with `./config.status config.h'.
32322if test -n "$CONFIG_FILES"; then
32323
32324
32325ac_cr=`echo X | tr X '\015'`
32326# On cygwin, bash can eat \r inside `` if the user requested igncr.
32327# But we know of no other shell where ac_cr would be empty at this
32328# point, so we can use a bashism as a fallback.
32329if test "x$ac_cr" = x; then
32330  eval ac_cr=\$\'\\r\'
32331fi
32332ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32333if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32334  ac_cs_awk_cr='\\r'
32335else
32336  ac_cs_awk_cr=$ac_cr
32337fi
32338
32339echo 'BEGIN {' >"$tmp/subs1.awk" &&
32340_ACEOF
32341
32342
32343{
32344  echo "cat >conf$$subs.awk <<_ACEOF" &&
32345  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32346  echo "_ACEOF"
32347} >conf$$subs.sh ||
32348  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32349ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32350ac_delim='%!_!# '
32351for ac_last_try in false false false false false :; do
32352  . ./conf$$subs.sh ||
32353    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32354
32355  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32356  if test $ac_delim_n = $ac_delim_num; then
32357    break
32358  elif $ac_last_try; then
32359    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32360  else
32361    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32362  fi
32363done
32364rm -f conf$$subs.sh
32365
32366cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32367cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32368_ACEOF
32369sed -n '
32370h
32371s/^/S["/; s/!.*/"]=/
32372p
32373g
32374s/^[^!]*!//
32375:repl
32376t repl
32377s/'"$ac_delim"'$//
32378t delim
32379:nl
32380h
32381s/\(.\{148\}\)..*/\1/
32382t more1
32383s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32384p
32385n
32386b repl
32387:more1
32388s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32389p
32390g
32391s/.\{148\}//
32392t nl
32393:delim
32394h
32395s/\(.\{148\}\)..*/\1/
32396t more2
32397s/["\\]/\\&/g; s/^/"/; s/$/"/
32398p
32399b
32400:more2
32401s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32402p
32403g
32404s/.\{148\}//
32405t delim
32406' <conf$$subs.awk | sed '
32407/^[^""]/{
32408  N
32409  s/\n//
32410}
32411' >>$CONFIG_STATUS || ac_write_fail=1
32412rm -f conf$$subs.awk
32413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32414_ACAWK
32415cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32416  for (key in S) S_is_set[key] = 1
32417  FS = ""
32418
32419}
32420{
32421  line = $ 0
32422  nfields = split(line, field, "@")
32423  substed = 0
32424  len = length(field[1])
32425  for (i = 2; i < nfields; i++) {
32426    key = field[i]
32427    keylen = length(key)
32428    if (S_is_set[key]) {
32429      value = S[key]
32430      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32431      len += length(value) + length(field[++i])
32432      substed = 1
32433    } else
32434      len += 1 + keylen
32435  }
32436
32437  print line
32438}
32439
32440_ACAWK
32441_ACEOF
32442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32443if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32444  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32445else
32446  cat
32447fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32448  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32449_ACEOF
32450
32451# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32452# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32453# trailing colons and then remove the whole line if VPATH becomes empty
32454# (actually we leave an empty line to preserve line numbers).
32455if test "x$srcdir" = x.; then
32456  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32457h
32458s///
32459s/^/:/
32460s/[	 ]*$/:/
32461s/:\$(srcdir):/:/g
32462s/:\${srcdir}:/:/g
32463s/:@srcdir@:/:/g
32464s/^:*//
32465s/:*$//
32466x
32467s/\(=[	 ]*\).*/\1/
32468G
32469s/\n//
32470s/^[^=]*=[	 ]*$//
32471}'
32472fi
32473
32474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32475fi # test -n "$CONFIG_FILES"
32476
32477# Set up the scripts for CONFIG_HEADERS section.
32478# No need to generate them if there are no CONFIG_HEADERS.
32479# This happens for instance with `./config.status Makefile'.
32480if test -n "$CONFIG_HEADERS"; then
32481cat >"$tmp/defines.awk" <<\_ACAWK ||
32482BEGIN {
32483_ACEOF
32484
32485# Transform confdefs.h into an awk script `defines.awk', embedded as
32486# here-document in config.status, that substitutes the proper values into
32487# config.h.in to produce config.h.
32488
32489# Create a delimiter string that does not exist in confdefs.h, to ease
32490# handling of long lines.
32491ac_delim='%!_!# '
32492for ac_last_try in false false :; do
32493  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32494  if test -z "$ac_t"; then
32495    break
32496  elif $ac_last_try; then
32497    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32498  else
32499    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32500  fi
32501done
32502
32503# For the awk script, D is an array of macro values keyed by name,
32504# likewise P contains macro parameters if any.  Preserve backslash
32505# newline sequences.
32506
32507ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32508sed -n '
32509s/.\{148\}/&'"$ac_delim"'/g
32510t rset
32511:rset
32512s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32513t def
32514d
32515:def
32516s/\\$//
32517t bsnl
32518s/["\\]/\\&/g
32519s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32520D["\1"]=" \3"/p
32521s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32522d
32523:bsnl
32524s/["\\]/\\&/g
32525s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32526D["\1"]=" \3\\\\\\n"\\/p
32527t cont
32528s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32529t cont
32530d
32531:cont
32532n
32533s/.\{148\}/&'"$ac_delim"'/g
32534t clear
32535:clear
32536s/\\$//
32537t bsnlc
32538s/["\\]/\\&/g; s/^/"/; s/$/"/p
32539d
32540:bsnlc
32541s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32542b cont
32543' <confdefs.h | sed '
32544s/'"$ac_delim"'/"\\\
32545"/g' >>$CONFIG_STATUS || ac_write_fail=1
32546
32547cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32548  for (key in D) D_is_set[key] = 1
32549  FS = ""
32550}
32551/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32552  line = \$ 0
32553  split(line, arg, " ")
32554  if (arg[1] == "#") {
32555    defundef = arg[2]
32556    mac1 = arg[3]
32557  } else {
32558    defundef = substr(arg[1], 2)
32559    mac1 = arg[2]
32560  }
32561  split(mac1, mac2, "(") #)
32562  macro = mac2[1]
32563  prefix = substr(line, 1, index(line, defundef) - 1)
32564  if (D_is_set[macro]) {
32565    # Preserve the white space surrounding the "#".
32566    print prefix "define", macro P[macro] D[macro]
32567    next
32568  } else {
32569    # Replace #undef with comments.  This is necessary, for example,
32570    # in the case of _POSIX_SOURCE, which is predefined and required
32571    # on some systems where configure will not decide to define it.
32572    if (defundef == "undef") {
32573      print "/*", prefix defundef, macro, "*/"
32574      next
32575    }
32576  }
32577}
32578{ print }
32579_ACAWK
32580_ACEOF
32581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32582  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32583fi # test -n "$CONFIG_HEADERS"
32584
32585
32586eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32587shift
32588for ac_tag
32589do
32590  case $ac_tag in
32591  :[FHLC]) ac_mode=$ac_tag; continue;;
32592  esac
32593  case $ac_mode$ac_tag in
32594  :[FHL]*:*);;
32595  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32596  :[FH]-) ac_tag=-:-;;
32597  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32598  esac
32599  ac_save_IFS=$IFS
32600  IFS=:
32601  set x $ac_tag
32602  IFS=$ac_save_IFS
32603  shift
32604  ac_file=$1
32605  shift
32606
32607  case $ac_mode in
32608  :L) ac_source=$1;;
32609  :[FH])
32610    ac_file_inputs=
32611    for ac_f
32612    do
32613      case $ac_f in
32614      -) ac_f="$tmp/stdin";;
32615      *) # Look for the file first in the build tree, then in the source tree
32616	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32617	 # because $ac_f cannot contain `:'.
32618	 test -f "$ac_f" ||
32619	   case $ac_f in
32620	   [\\/$]*) false;;
32621	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32622	   esac ||
32623	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32624      esac
32625      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32626      as_fn_append ac_file_inputs " '$ac_f'"
32627    done
32628
32629    # Let's still pretend it is `configure' which instantiates (i.e., don't
32630    # use $as_me), people would be surprised to read:
32631    #    /* config.h.  Generated by config.status.  */
32632    configure_input='Generated from '`
32633	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32634	`' by configure.'
32635    if test x"$ac_file" != x-; then
32636      configure_input="$ac_file.  $configure_input"
32637      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32638$as_echo "$as_me: creating $ac_file" >&6;}
32639    fi
32640    # Neutralize special characters interpreted by sed in replacement strings.
32641    case $configure_input in #(
32642    *\&* | *\|* | *\\* )
32643       ac_sed_conf_input=`$as_echo "$configure_input" |
32644       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32645    *) ac_sed_conf_input=$configure_input;;
32646    esac
32647
32648    case $ac_tag in
32649    *:-:* | *:-) cat >"$tmp/stdin" \
32650      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32651    esac
32652    ;;
32653  esac
32654
32655  ac_dir=`$as_dirname -- "$ac_file" ||
32656$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32657	 X"$ac_file" : 'X\(//\)[^/]' \| \
32658	 X"$ac_file" : 'X\(//\)$' \| \
32659	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32660$as_echo X"$ac_file" |
32661    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32662	    s//\1/
32663	    q
32664	  }
32665	  /^X\(\/\/\)[^/].*/{
32666	    s//\1/
32667	    q
32668	  }
32669	  /^X\(\/\/\)$/{
32670	    s//\1/
32671	    q
32672	  }
32673	  /^X\(\/\).*/{
32674	    s//\1/
32675	    q
32676	  }
32677	  s/.*/./; q'`
32678  as_dir="$ac_dir"; as_fn_mkdir_p
32679  ac_builddir=.
32680
32681case "$ac_dir" in
32682.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32683*)
32684  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32685  # A ".." for each directory in $ac_dir_suffix.
32686  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32687  case $ac_top_builddir_sub in
32688  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32689  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32690  esac ;;
32691esac
32692ac_abs_top_builddir=$ac_pwd
32693ac_abs_builddir=$ac_pwd$ac_dir_suffix
32694# for backward compatibility:
32695ac_top_builddir=$ac_top_build_prefix
32696
32697case $srcdir in
32698  .)  # We are building in place.
32699    ac_srcdir=.
32700    ac_top_srcdir=$ac_top_builddir_sub
32701    ac_abs_top_srcdir=$ac_pwd ;;
32702  [\\/]* | ?:[\\/]* )  # Absolute name.
32703    ac_srcdir=$srcdir$ac_dir_suffix;
32704    ac_top_srcdir=$srcdir
32705    ac_abs_top_srcdir=$srcdir ;;
32706  *) # Relative name.
32707    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32708    ac_top_srcdir=$ac_top_build_prefix$srcdir
32709    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32710esac
32711ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32712
32713
32714  case $ac_mode in
32715  :F)
32716  #
32717  # CONFIG_FILE
32718  #
32719
32720_ACEOF
32721
32722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32723# If the template does not know about datarootdir, expand it.
32724# FIXME: This hack should be removed a few years after 2.60.
32725ac_datarootdir_hack=; ac_datarootdir_seen=
32726ac_sed_dataroot='
32727/datarootdir/ {
32728  p
32729  q
32730}
32731/@datadir@/p
32732/@docdir@/p
32733/@infodir@/p
32734/@localedir@/p
32735/@mandir@/p'
32736case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32737*datarootdir*) ac_datarootdir_seen=yes;;
32738*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32739  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32740$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32741_ACEOF
32742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32743  ac_datarootdir_hack='
32744  s&@datadir@&$datadir&g
32745  s&@docdir@&$docdir&g
32746  s&@infodir@&$infodir&g
32747  s&@localedir@&$localedir&g
32748  s&@mandir@&$mandir&g
32749  s&\\\${datarootdir}&$datarootdir&g' ;;
32750esac
32751_ACEOF
32752
32753# Neutralize VPATH when `$srcdir' = `.'.
32754# Shell code in configure.ac might set extrasub.
32755# FIXME: do we really want to maintain this feature?
32756cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32757ac_sed_extra="$ac_vpsub
32758$extrasub
32759_ACEOF
32760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32761:t
32762/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32763s|@configure_input@|$ac_sed_conf_input|;t t
32764s&@top_builddir@&$ac_top_builddir_sub&;t t
32765s&@top_build_prefix@&$ac_top_build_prefix&;t t
32766s&@srcdir@&$ac_srcdir&;t t
32767s&@abs_srcdir@&$ac_abs_srcdir&;t t
32768s&@top_srcdir@&$ac_top_srcdir&;t t
32769s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32770s&@builddir@&$ac_builddir&;t t
32771s&@abs_builddir@&$ac_abs_builddir&;t t
32772s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32773$ac_datarootdir_hack
32774"
32775eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32776  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32777
32778test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32779  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32780  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32781  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32782which seems to be undefined.  Please make sure it is defined" >&5
32783$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32784which seems to be undefined.  Please make sure it is defined" >&2;}
32785
32786  rm -f "$tmp/stdin"
32787  case $ac_file in
32788  -) cat "$tmp/out" && rm -f "$tmp/out";;
32789  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32790  esac \
32791  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32792 ;;
32793  :H)
32794  #
32795  # CONFIG_HEADER
32796  #
32797  if test x"$ac_file" != x-; then
32798    {
32799      $as_echo "/* $configure_input  */" \
32800      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32801    } >"$tmp/config.h" \
32802      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32803    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32804      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32805$as_echo "$as_me: $ac_file is unchanged" >&6;}
32806    else
32807      rm -f "$ac_file"
32808      mv "$tmp/config.h" "$ac_file" \
32809	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32810    fi
32811  else
32812    $as_echo "/* $configure_input  */" \
32813      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32814      || as_fn_error $? "could not create -" "$LINENO" 5
32815  fi
32816 ;;
32817
32818
32819  esac
32820
32821done # for ac_tag
32822
32823
32824as_fn_exit 0
32825_ACEOF
32826ac_clean_files=$ac_clean_files_save
32827
32828test $ac_write_fail = 0 ||
32829  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32830
32831
32832# configure is writing to config.log, and then calls config.status.
32833# config.status does its own redirection, appending to config.log.
32834# Unfortunately, on DOS this fails, as config.log is still kept open
32835# by configure, so config.status won't be able to write to it; its
32836# output is simply discarded.  So we exec the FD to /dev/null,
32837# effectively closing config.log, so it can be properly (re)opened and
32838# appended to by config.status.  When coming back to configure, we
32839# need to make the FD available again.
32840if test "$no_create" != yes; then
32841  ac_cs_success=:
32842  ac_config_status_args=
32843  test "$silent" = yes &&
32844    ac_config_status_args="$ac_config_status_args --quiet"
32845  exec 5>/dev/null
32846  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32847  exec 5>>config.log
32848  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32849  # would make configure fail if this is the last instruction.
32850  $ac_cs_success || as_fn_exit 1
32851fi
32852if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32853  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32854$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32855fi
32856
32857
32858# Make the compare script executable
32859$CHMOD +x $OUTPUT_ROOT/compare.sh
32860
32861# Finally output some useful information to the user
32862
32863# Finally output some useful information to the user
32864
32865if test "x$CCACHE_FOUND" != x; then
32866	if  test "x$HAS_GOOD_CCACHE" = x; then
32867		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32868		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32869	else
32870		CCACHE_STATUS="installed and in use"
32871	fi
32872else
32873	if test "x$GCC" = xyes; then
32874		CCACHE_STATUS="not installed (consider installing)"
32875		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32876	else
32877		CCACHE_STATUS="not available for your system"
32878	fi
32879fi
32880
32881printf "\n"
32882printf "====================================================\n"
32883printf "A new configuration has been successfully created in\n"
32884printf "$OUTPUT_ROOT\n"
32885if test "x$CONFIGURE_COMMAND_LINE" != x; then
32886	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32887else
32888	printf "using default settings.\n"
32889fi
32890
32891printf "\n"
32892printf "Configuration summary:\n"
32893printf "* Debug level:    $DEBUG_LEVEL\n"
32894printf "* JDK variant:    $JDK_VARIANT\n"
32895printf "* JVM variants:   $with_jvm_variants\n"
32896printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32897
32898printf "\n"
32899printf "Tools summary:\n"
32900if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32901  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32902fi
32903printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32904printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32905printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32906
32907printf "\n"
32908printf "Build performance summary:\n"
32909printf "* Cores to use:   $NUM_CORES\n"
32910printf "* Memory limit:   $MEMORY_SIZE MB\n"
32911printf "* ccache status:  $CCACHE_STATUS\n"
32912printf "\n"
32913
32914if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32915	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32916	printf "$CCACHE_HELP_MSG\n"
32917
32918    # Print a helpful message on how to acquire the necessary build dependency.
32919    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32920    MISSING_DEPENDENCY=ccache
32921    PKGHANDLER_COMMAND=
32922
32923    case $PKGHANDLER in
32924	apt-get)
32925                apt_help     $MISSING_DEPENDENCY ;;
32926    yum)
32927                yum_help     $MISSING_DEPENDENCY ;;
32928	port)
32929                port_help    $MISSING_DEPENDENCY ;;
32930	pkgutil)
32931                pkgutil_help $MISSING_DEPENDENCY ;;
32932	pkgadd)
32933                pkgadd_help  $MISSING_DEPENDENCY ;;
32934    * )
32935      break ;;
32936    esac
32937
32938    if test "x$PKGHANDLER_COMMAND" != x; then
32939        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32940    fi
32941
32942	printf "$HELP_MSG\n"
32943	printf "\n"
32944fi
32945
32946if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32947	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32948	printf "will result in longer build times.\n"
32949	printf "\n"
32950fi
32951
32952if test "x$FOUND_ALT_VARIABLES" != "x"; then
32953	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32954	printf "These are not respected, and will be ignored. It is recommended\n"
32955	printf "that you clean your environment. The following variables are set:\n"
32956	printf "$FOUND_ALT_VARIABLES\n"
32957	printf "\n"
32958fi
32959
32960if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32961	printf "WARNING: Your build output directory is not on a local disk.\n"
32962	printf "This will severely degrade build performance!\n"
32963	printf "It is recommended that you create an output directory on a local disk,\n"
32964	printf "and run the configure script again from that directory.\n"
32965	printf "\n"
32966fi
32967
32968if test "x$IS_RECONFIGURE" = "xyes"; then
32969	printf "WARNING: The result of this configuration has overridden an older\n"
32970	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32971	printf "proper build. Failure to do so might result in strange build problems.\n"
32972	printf "\n"
32973fi
32974
32975